Search Results

Search found 30507 results on 1221 pages for 'android internet'.

Page 25/1221 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Slow internet browsing in Ubuntu

    - by Mark
    I have a dual boot set up with windows and ubuntu, when I'm using windows internet browsing is a lot faster than when I'm using ubuntu and I don't know why. It's like there's just a big latency rather than the maximum speed is lower, there's a big delay before anything happens when using Ubuntu, it happens with all websites all the time. I've never configured the internet connection because it just worked straight away. I have broadband connection through a router shared with some other computers, when we set up the router and internet connection everything was done with windows. Any ideas on what I could do to fix this? Thanks to anyone who replies.

    Read the article

  • Changed isp, Ubuntu 13.04 won't connect to the internet

    - by Lori
    I recently moved and changed internet service providers. my ubuntu 13.04 machine is unable to connect to the internet. I need help with the networking settings. The previous isp was Verizon dsl, current a cable company. Both connect via ethernet cable. The cable and router work on a windows machine, but not my ubuntu machine. The cable company doesn't support ubuntu or any linux operating systems. The computer seems to recognize the connection. When I unplug and plug in the cable I get a little window that says disconnected, connected. However, I can't connect to the internet in either Firefox or the Ubuntu software installer (tried this to see if it was a firefox issue, it wasn't). I tried shutting down and restarting, plugging and unplugging cables, etc.

    Read the article

  • Showing Live Wallpaper in a 1.6 target app by detecting if it's a 2.1 device?

    - by itamarw
    We're building an Android app with target SDK 1.6, so it will run on 1.6 devices and higher. We'd like to support Live Wallpapers, which we know is 2.1+ only. Is there a way to build one app with 1.6 SDK as the target, but detect if the device it's running on is 2.1, and only in that scenario call the live wallpaper API. We're trying to avoid having to build a separate 1.6 and 2.1 versions, and would like to be able to support Live Wallpapers for only 2.1 devices. So to be clear- 1 app, that can support 1.6 and higher, and support live wallpapers for 2.1 devices. Any way of doing this?

    Read the article

  • how to Set already running activity, when user clicks on app icon on home screen

    - by Praveenb
    I have Two activities One splash screen, Player screen. When user clicks on my app icon first splash screen is displayed and then player screen When player activity is running, if user returns to the home screen and then again clicks on app icon, the application is starting from the splash screen again. can any one please help me out how to do any one of below 1) I need to close current running activity and reload application. or 2) I need to resume to the player screen directly. Please give me an example or reference to follow, Im beginner in android programing Thanks In advance

    Read the article

  • Structure question over Local/Remote Services, Broadcast Receivers, and Intent Services

    - by Ryan
    I'm writing an android app that has a standard activity, but also needs to monitor incoming/outgoing calls and texts at all times. In addition, the app needs to notify users of information once a day without having the activity open. The information it notifies users of is stored in a database, so communication with the activity is not necessary. I've been researching for a week and still can't decide how to go about doing this. My instinct tells me I need a remote service that has a constantly running broadcast receiver, but every remote service example I see is overly complicated. Could anyone help me better understand what steps I need to take? Thanks in advance.

    Read the article

  • sidebar covers footer in internet explorer 6 and 7

    - by Datis
    i have designed a template for wordpress, the problem is that when sidebar gets longer some of it will cover the footer in internet explorer 6 and 7, the website address is : http://blog.baabak.ir (its in persian), but if you look at it in internet explorer 6,7 you will see the sidebar logo will cover the footer, for example in this page : http://blog.baabak.ir/?page%5Fid=141 but the website is ok in other browsers, whats the problem ?

    Read the article

  • Internet Explorer Rage?

    - by DMin
    I know Internet Explorer is a huge irritating thing for a lot of us - especially IE6. What is the most interesting/extreme thing you've done/fantasized-doing as a result of outrage for (re-)coding for Internet Explorer?

    Read the article

  • GCM: onMessage() from GCMIntentService is never called [migrated]

    - by Shrikant
    I am implementing GCM (Google Cloud Messaging- PUSH Notifications) in my application. I have followed all the steps given in GCM tutorial from developer.android.com My application's build target is pointing to Goolge API 8 (Android 2.2 version). I am able to get the register ID from GCM successfully, and I am passing this ID to my application server. So the registration step is performed successfully. Now when my application server sends a PUSH message to my device, the server gets the message as SUCCESS=1 FAILURE=0, etc., i.e. Server is sending message successfully, but my device never receives the message. After searching alot about this, I came to know that GCM pushes messages on port number 5228, 5229 or 5230. Initially, my device and laptop was restricted for some websites, but then I was granted all the permissions to access all websites, so I guess these port numbers are open for my device. So my question is: I never receive any PUSH message from GCM. My onMessage() from GCMIntenService class is never called. What could be the reason? Please see my following code and guide me accordingly: I have declared following in my manifest: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" /> <permission android:name="package.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <!-- App receives GCM messages. --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <!-- GCM connects to Google Services. --> <uses-permission android:name="android.permission.INTERNET" /> <!-- GCM requires a Google account. --> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <!-- Keeps the processor from sleeping when a message is received. --> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="package.permission.C2D_MESSAGE" /> <uses-permission android:name="android.permission.INTERNET" /> <receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> <category android:name="packageName" /> </intent-filter> </receiver> <receiver android:name=".ReceiveBroadcast" android:exported="false" > <intent-filter> <action android:name="GCM_RECEIVED_ACTION" /> </intent-filter> </receiver> <service android:name=".GCMIntentService" /> /** * @author Shrikant. * */ public class GCMIntentService extends GCMBaseIntentService { /** * The Sender ID used for GCM. */ public static final String SENDER_ID = "myProjectID"; /** * This field is used to call Web-Service for GCM. */ SendUserCredentialsGCM sendUserCredentialsGCM = null; public GCMIntentService() { super(SENDER_ID); sendUserCredentialsGCM = new SendUserCredentialsGCM(); } @Override protected void onRegistered(Context arg0, String registrationId) { Log.i(TAG, "Device registered: regId = " + registrationId); sendUserCredentialsGCM.sendRegistrationID(registrationId); } @Override protected void onUnregistered(Context context, String arg1) { Log.i(TAG, "unregistered = " + arg1); sendUserCredentialsGCM .unregisterFromGCM(LoginActivity.API_OR_BROWSER_KEY); } @Override protected void onMessage(Context context, Intent intent) { Log.e("GCM MESSAGE", "Message Recieved!!!"); String message = intent.getStringExtra("message"); if (message == null) { Log.e("NULL MESSAGE", "Message Not Recieved!!!"); } else { Log.i(TAG, "new message= " + message); sendGCMIntent(context, message); } } private void sendGCMIntent(Context context, String message) { Intent broadcastIntent = new Intent(); broadcastIntent.setAction("GCM_RECEIVED_ACTION"); broadcastIntent.putExtra("gcm", message); context.sendBroadcast(broadcastIntent); } @Override protected void onError(Context context, String errorId) { Log.e(TAG, "Received error: " + errorId); Toast.makeText(context, "PUSH Notification failed.", Toast.LENGTH_LONG) .show(); } @Override protected boolean onRecoverableError(Context context, String errorId) { return super.onRecoverableError(context, errorId); } }

    Read the article

  • TabHost NullPointerException in layout

    - by Chubbs
    I been following the Tab example provided by Google. I am trying to use the XML layout provided to setup a tab layout. I use this XML layout @ http://developer.android.com/guide/tutorials/views/hello-tabwidget.html <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/textview1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="this is a tab" /> <TextView android:id="@+id/textview2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="this is another tab" /> <TextView android:id="@+id/textview3" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="this is a third tab" /> </FrameLayout> </LinearLayout> </TabHost> When ever I switch the Layout tab in the Eclipse layout designer I get a NullPointerException: null error inside my Eclipse. This happens also when I try to drag and drop a TabHost, and then a TabWidget into an empty layout file. What am I doing wrong ? this seems pretty simple.

    Read the article

  • Hello, TabWidget each tab refer to new xml

    - by Clozecall
    Hey everyone I'm using Google's exmaple of Hello, TabWidget but altered it to look like this: main.xml: <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:text="@+layout/text" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <TextView android:id="@+id/textview2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="this is another tab" /> <TextView android:id="@+id/textview3" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="this is a third tab" /> </FrameLayout> </LinearLayout> java file: public class HelloTabWidget extends TabActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TabHost mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec("tab_test1").setIndicator("TAB 1").setContent(R.layout.text)); mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator("TAB 2").setContent(R.id.textview2)); mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator("TAB 3").setContent(R.id.textview3)); mTabHost.setCurrentTab(0); } } and here is the text.xml in res/layout: <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" > <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="This is Tab 1" /> What I'm basically trying to do is have each tab refer to its own xml file rather than all in main.xml, but the text in the first tab doesn't show up.

    Read the article

  • Detecting cause of RuntimeException: Unable to stop activity

    - by Pentium10
    I have a really weird error, and I don't know what is causing this. It happens when I leave the Activity. 05-16 12:26:20.360: ERROR/AndroidRuntime(11648): Uncaught handler: thread main exiting due to uncaught exception 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): java.lang.RuntimeException: Unable to stop activity {com.myapk/com.myapk.modules.viewPairing}: java.lang.NullPointerException 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3596) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3674) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.access$2800(ActivityThread.java:126) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1965) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.os.Handler.dispatchMessage(Handler.java:99) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.os.Looper.loop(Looper.java:123) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.main(ActivityThread.java:4595) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at java.lang.reflect.Method.invokeNative(Native Method) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at java.lang.reflect.Method.invoke(Method.java:521) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at dalvik.system.NativeStart.main(Native Method) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): Caused by: java.lang.NullPointerException 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.Activity.performStop(Activity.java:3848) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3591) 05-16 12:26:20.400: ERROR/AndroidRuntime(11648): ... 11 more

    Read the article

  • How do You Center a TextView in Layout?

    - by Ken
    I have a complex layout, part of which features a value centered over a label, with + and - buttons on either side of the value. I want the value to center between the buttons, whether it is "1" or "99". It looks fine when it's a 2-digit number like "99", but when it's a single digit the number is left-justified. How do I properly center that value? Here's the portion of my layout that does this: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@id/runway_label" android:layout_centerHorizontal="true" android:orientation="horizontal"> <ImageView android:id="@+id/dec_runway_button" android:src="@drawable/minus_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical"/> <TextView android:id="@+id/runway_value" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textStyle="bold" android:textSize="40.0sp" android:minWidth="50sp" android:layout_centerInParent="true" android:layout_gravity="center" android:shadowColor="#333333" android:shadowDx="2.0" android:shadowDy="2.0" android:shadowRadius="3.0" /> <ImageView android:id="@+id/inc_runway_button" android:src="@drawable/plus_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical"/> </LinearLayout>

    Read the article

  • Problems with Android Fragment back stack

    - by DexterMoon
    I've got a massive problem with the way the android fragment backstack seems to work and would be most grateful for any help that is offered. Imagine you have 3 Fragments [1] [2] [3] I want the user to be able to navigate [1] > [2] > [3] but on the way back (pressing back button) [3] > [1]. As I would have imagined this would be accomplished by not calling addToBackStack(..) when creating the transaction that brings fragment [2] into the fragment holder defined in XML. The reality of this seems as though that if I dont want [2] to appear again when user presses back button on [3], I must not call addToBackStack in the transaction that shows fragment [3]. This seems completely counter-intuitive (perhaps coming from the iOS world). Anyway if i do it this way, when I go from [1] > [2] and press back I arrive back at [1] as expected. If I go [1] > [2] > [3] and then press back I jump back to [1] (as expected). Now the strange behavior happens when I try and jump to [2] again from [1]. First of all [3] is briefly displayed before [2] comes into view. If I press back at this point [3] is displayed, and if I press back once again the app exits. Can anyone help me to understand whats going on here? And here is the layout xml file for my main activity: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <fragment android:id="@+id/headerFragment" android:layout_width="match_parent" android:layout_height="wrap_content" class="com.fragment_test.FragmentControls" > <!-- Preview: layout=@layout/details --> </fragment> <FrameLayout android:id="@+id/detailFragment" android:layout_width="match_parent" android:layout_height="fill_parent" /> Update This is the code I'm using to build by nav heirarchy Fragment frag; FragmentTransaction transaction; //Create The first fragment [1], add it to the view, BUT Dont add the transaction to the backstack frag = new Fragment1(); transaction = getSupportFragmentManager().beginTransaction(); transaction.replace(R.id.detailFragment, frag); transaction.commit(); //Create the second [2] fragment, add it to the view and add the transaction that replaces the first fragment to the backstack frag = new Fragment2(); transaction = getSupportFragmentManager().beginTransaction(); transaction.replace(R.id.detailFragment, frag); transaction.addToBackStack(null); transaction.commit(); //Create third fragment frag = new Fragment3(); transaction = getSupportFragmentManager().beginTransaction(); transaction.replace(R.id.detailFragment, frag); transaction.commit(); //END OF SETUP CODE------------------------- //NOW: //Press back once and then issue the following code: frag = new Fragment2(); transaction = getSupportFragmentManager().beginTransaction(); transaction.replace(R.id.detailFragment, frag); transaction.addToBackStack(null); transaction.commit(); //Now press back again and you end up at fragment [3] not [1] Many thanks

    Read the article

  • Android development in Unreal with an existing project

    - by user1238929
    I am currently using an Unreal 3 project that has been targeted for multiple devices. Originally, it was targeted for iOS and now I want to try and build it for Android. The project is capable of doing it and I am in the process of testing it. I think I have everything I need in order to build it and launch it for an android device that I have set up and connected to my PC and is recognized by the Android SDK ABD. I am currently trying to build and launch the game through the Unreal Frontend but when I try, I am getting stuck at getting the Unreal Frontend to find my Android device as a platform to debug, like it would with a PC, Xbox360, or PS3. Right now, I am just trying to launch the game to see if I can get it to simply run on an Android device, I'm going to worry about the packaging later. So I have two questions: Am I on the right track in looking at the Unreal Frontend to cook and launch the project on Android or should I look somewhere else? How do I get Unreal to recognize my Android device as a platform to launch on? I would even settle for recognizing an emulator, but that seems even harder.

    Read the article

  • ASP.NET MVC WebService - Security for Industrial Android Clients

    - by Chris Nevill
    I'm trying to design a system that will allow a bunch of Android devices to securely log into an ASP.NET MVC REST Web service. At present neither side are implemented. However there is an ASP.NET MVC website which the web service will site along side. This is currently using forms authentication. The idea will be that the Android devices will download data from the web service and then be able to work offline storing data in their own local databases, where users will be able to make updates to that data, and then syncing updates back to the main server where possible. The web service will be using HTTPS to prevent calls being intercepted and reduce the risk of calls being intercepted. The system is an industrial system and will not be in used by the general Android population. Instead only authorized Android devices will be authorized by the Web Service to make calls. As such I was thinking of using the Android devices serial number as a username and then a generated long password which the device will be able to pick up - once the device has been authorized server side. The device will also have user logins - but these will not be to log into the web service - just the device itself - since the device and user must be able to work offline. So usernames and passwords will be downloaded and stored on the devices themselves. My question is... what form of security is best setup on the web service? Should it use forms Authentication? Should the username and password just be passed in with each GET/POST call or should it start a session as I have with the website? The Android side causes more confusion. There seems to be a number of options here Spring-Android, Volley, Retrofit, LoopJ, Robo Spice which seems to use the aforementioned Spring, Retrofit or Google HttpClient. I'm struggling to find a simple example which authenticates with a forms based authentication system. Is this because I'm going about this wrong? Is there another option that would better suite this?

    Read the article

  • Share wireless Internet connection between Ubuntu 10.04 to Windows Vista through ethernet

    - by Artyom2033
    I am connected to the internet using a wireless connection on my laptop running ubuntu 10.04 and I want to share it to a desktop running windows Vista trough a Ethernet cable. How do I do that? I've try the "GUI Method via Network Manager (Ubuntu 9.10 and up)" on this page : https://help.ubuntu.com/community/Internet/ConnectionSharing but how to I access to it from Windows Vista? I didn't even know if it is shared. Thanks for the help

    Read the article

  • OpenVpn is working but no internet connection

    - by user3636476
    I'm using an OpenVpn connection in Ubuntu, it's working well but when I'm using it, my internet connection is not working. I edited my connections in network manager, I've been to the VPN tab, and edited the VPN configuration. In the IPv4 Settings tab, I clicked in the bottom right button "Routes" and I ticked "Use this connection only for resources on its network". When I'm doing this the internet access is working but the vpn is not any help please?

    Read the article

  • No internet access when I'm connect to my company's VPN

    - by Iago
    I googled my problem and I've read some questions in Ask Ubuntu, but I didn't solve my problem. I connect to a PPTP VPN server and it works well, but when I'm connected to that VPN I don't have Internet access but private network access. If I check "Use this connection only for resources on its network", I have Internet access, but this way I haven't access to my company's private network. What's the problem? Help, please.

    Read the article

  • How get an Android ListPreference defined in Xml whose values are integers?

    - by Rob Kent
    Is it possible to define a ListPreference in Xml and retrieve the value from SharedPreferences using getInt? Here is my Xml: <ListPreference android:key="@string/prefGestureAccuracyKey" android:title="@string/prefGestureAccuracyTitle" android:summary="@string/prefGestureAccuracyDesc" android:entries="@array/prefNumberAccuracyLabels" android:entryValues="@array/prefNumberAccuracyValues" android:dialogTitle="@string/prefGestureAccuracyDialog" android:persistent="true" android:defaultValue="2" android:shouldDisableView="false" /> And I want to get the value with something like: int val = sharedPrefs.getInt(key, defaultValue). At the moment I have to use getString and parse the result.

    Read the article

  • How to response to full screen button in websites that has videos

    - by Pinhassi
    I use webview to play videos from varios sites, some of them have a full screen button I would like the webview to respond to the full screen button. If I set webSettings.setUseWideViewPort(false); then video get stuck when clicking the full screen button and I can see the following error on the logcat: 10-09 08:32:27.970: D/gralloc(31814): unmmap pid(1876), vaddr(0x589dc000) 10-09 08:32:27.970: E/gralloc(31814): [GR_MD] unmapping from 0x5786c000, size=33427456 10-09 08:32:27.970: D/gralloc(31814): unmmap pid(1876), vaddr(0x5a9fb000) 10-09 08:32:27.970: E/gralloc(31814): [GR_MD] unmapping from 0x5984d000, size=33427456 10-09 08:32:27.975: D/gralloc(31814): unmmap pid(1876), vaddr(0x5e616000) 10-09 08:32:27.975: E/gralloc(31814): [GR_MD] unmapping from 0x5d42a000, size=33427456 I'm using Android 4.0.1, here is my code: setWebViewSettings(mVideoWebView); String data_html = "<!DOCTYPE HTML> <html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:og=\"http://opengraphprotocol.org/schema/\" xmlns:fb=\"http://www.facebook.com/2008/fbml\"> <head></head> <body style=\"margin:0 0 0 0; padding:0 0 0 0;\"> <iframe src=\"http://www.dailymotion.com/embed/video/xu4vre\" width=\"300\" height=\"162"\" frameborder=\"0\"></iframe> </body> </html> "; mVideoWebView.loadData(data_html, "text/html", null); public static void setWebViewSettings(WebView webview) { WebSettings webSettings = webview.getSettings(); webSettings.setPluginState(PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setAllowFileAccess(true); webSettings.setLoadWithOverviewMode(false); // zoom y/n webSettings.setUseWideViewPort(true); // true = like desktop webSettings.setPluginsEnabled(true); //webSettings.setAllowContentAccess(true); webSettings.setAllowFileAccess(true); //webSettings.setAllowFileAccessFromFileURLs(true); //webSettings.setAllowUniversalAccessFromFileURLs(true); webSettings.setDatabaseEnabled(true); webSettings.setGeolocationEnabled(true); webSettings.setJavaScriptCanOpenWindowsAutomatically(true); webSettings.setDomStorageEnabled(true); }

    Read the article

  • Spinner cannot load an integer array?

    - by Adam
    I have an application, which has a Spinner that I want populated with some numbers (4,8,12,16). I created an integer-array object in strings.xml with the items mentioned above, set the entries of the Spinner to the integer-array, and when I run the app I get: 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): java.lang.NullPointerException 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:198) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.View.measure(View.java:7965) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:888) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.LinearLayout.measureVertical(LinearLayout.java:350) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.LinearLayout.onMeasure(LinearLayout.java:278) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.View.measure(View.java:7965) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.View.measure(View.java:7965) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.LinearLayout.measureVertical(LinearLayout.java:464) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.LinearLayout.onMeasure(LinearLayout.java:278) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.View.measure(View.java:7965) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.View.measure(View.java:7965) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.ViewRoot.performTraversals(ViewRoot.java:763) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.view.ViewRoot.handleMessage(ViewRoot.java:1632) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.os.Handler.dispatchMessage(Handler.java:99) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.os.Looper.loop(Looper.java:123) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at android.app.ActivityThread.main(ActivityThread.java:4310) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at java.lang.reflect.Method.invokeNative(Native Method) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at java.lang.reflect.Method.invoke(Method.java:521) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 04-19 23:38:48.016: ERROR/AndroidRuntime(10193): at dalvik.system.NativeStart.main(Native Method) As soon as I changed the array to a string-array, this works fine. Is this normal? I realize that I can (and will) just convert the string array values to an int, but it seems weird that I have to. Thanks!

    Read the article

  • How to programmatically check availibilty of internet connection in Android?

    - by Fahad
    Hi! I want to check programmatically whether there is an internet connection in android phone/emulator. So that once I am sure that an internet connection is present then I'll make a call to the internet. So its like "Hey emulator! If you have an internet connection, then please open this page, else doSomeThingElse();" hope you get the idea. I would highly appreciate a quick response I need it quite early. regards Fahad Ali Shaikh

    Read the article

  • Android - Start service on boot

    - by Gady
    From everything I've seen on Stack Exchange and elsewhere, I have everything set up correctly to start an IntentService when Android OS boots. Unfortunately it is not starting on boot, and I'm not getting any errors. Maybe the experts can help... Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.phx.batterylogger" android:versionCode="1" android:versionName="1.0" android:installLocation="internalOnly"> <uses-sdk android:minSdkVersion="8" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.BATTERY_STATS" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <service android:name=".BatteryLogger"/> <receiver android:name=".StartupIntentReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> </application> </manifest> BroadcastReceiver for Startup: package com.phx.batterylogger; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class StartupIntentReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent serviceIntent = new Intent(context, BatteryLogger.class); context.startService(serviceIntent); } } UPDATE: I tried just about all of the suggestions below, and I added logging such as Log.v("BatteryLogger", "Got to onReceive, about to start service"); to the onReceive handler of the StartupIntentReceiver, and nothing is ever logged. So it isn't even making it to the BroadcastReceiver. I think I'm deploying the APK and testing correctly, just running Debug in Eclipse and the console says it successfully installs it to my Xoom tablet at \BatteryLogger\bin\BatteryLogger.apk. Then to test, I reboot the tablet and then look at the logs in DDMS and check the Running Services in the OS settings. Does this all sound correct, or am I missing something? Again, any help is much appreciated.

    Read the article

  • Different positions in ViewPager

    - by Kalai Selvan.G
    In my Application am using ViewPager to swipe the images,which comes through webservice as URL. Everything goes smoothly,the problem is while swiping myself getting the position as collapsed one.. Swipe left-right: positions are 1,2,3,4,5,etc.. if i stops swiping at 5th pos and started to Swipe from right-left: positions are 2,1...why this happens? I need to catch the position of the imageURL to find out the ID of the specific image and so i need to download and set it as wallpaper.. Normally while we swipe from right-left,the positions should decrease like 4,3,2,1. Also in debugger mode i got some start position,end position,last position with different values.. Any Clue about ViewPager. Here is my code: public class ImagePagerActivity extends BaseActivity { private ViewPager pager; private DisplayImageOptions options; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_image_pager); Bundle bundle = getIntent().getExtras(); String[] imageUrls = bundle.getStringArray(Extra.IMAGES); int pagerPosition = bundle.getInt(Extra.IMAGE_POSITION, 0); options = new DisplayImageOptions.Builder() .showImageForEmptyUrl(R.drawable.image_for_empty_url) .cacheOnDisc() .decodingType(DecodingType.MEMORY_SAVING) .build(); pager = (ViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(imageUrls)); pager.setCurrentItem(pagerPosition); } private class ImagePagerAdapter extends PagerAdapter { private String[] images; private LayoutInflater inflater; ImagePagerAdapter(String[] images) { this.images = images; inflater = getLayoutInflater(); } @Override public void destroyItem(View container, int position, Object object) { ((ViewPager) container).removeView((View) object); } @Override public void finishUpdate(View container) { } @Override public int getCount() { return images.length; } @Override public Object instantiateItem(View view, int position) { final FrameLayout imageLayout = (FrameLayout) inflater.inflate(R.layout.item_pager_image, null); final ImageView imageView = (ImageView) imageLayout.findViewById(R.id.image); final ProgressBar spinner = (ProgressBar) imageLayout.findViewById(R.id.loading); imageLoader.displayImage(images[position], imageView, options, new ImageLoadingListener() { public void onLoadingStarted() { spinner.setVisibility(View.VISIBLE); } public void onLoadingFailed() { spinner.setVisibility(View.GONE); imageView.setImageResource(android.R.drawable.ic_delete); } public void onLoadingComplete() { spinner.setVisibility(View.GONE); } }); ((ViewPager) view).addView(imageLayout, 0); return imageLayout; } @Override public boolean isViewFromObject(View view, Object object) { return view.equals(object); } @Override public void restoreState(Parcelable state, ClassLoader loader) { } @Override public Parcelable saveState() { return null; } @Override public void startUpdate(View container) { } } }

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >