android-4.0-ice-cream-sandwich

Ads Showing on HoneyComb Webview but Not ICS Webview

拟墨画扇 提交于 2019-12-13 07:42:33
问题 I have tweaked my Honeycomb application to work on ICS. All is well EXCEPT my ads in the webview no longer display. I have made no code changes to this section. The ICS compatible code shows ads on a HoneyComb device but not on an ICS device. What is different and how do I handle? Here are logs that I receive on ICS device, but not HoneyComb or lower: 03-08 14:50:42.485: W/webview(24262): java.lang.Throwable: Warning: A WebView method was called on thread 'Thread-617'. All WebView methods

In ICs, can`t get cookie

╄→尐↘猪︶ㄣ 提交于 2019-12-13 05:57:36
问题 cookie return always null... In android 2.x this works well, but 4.0.4 ICS not works ConnectivityManager manager = (ConnectivityManager) mContext .getSystemService(Context.CONNECTIVITY_SERVICE); CookieManager cookie = CookieManager.getInstance(); if(cookie.getCookie(mContext.getString(R.string.host_url))!=null){ conn.setRequestProperty("Cookie", cookie.getCookie(mContext.getString(R.string.host_url))); Log.d("tag", "cookie get " + cookie.getCookie(mContext.getString(R.string.host_url))); } in

ICS - menu item text cut off?

北城余情 提交于 2019-12-13 05:18:25
问题 I'm using the standard onCreateOptionsMenu, but on my Nexus w/ICS, when I tap the vertical menu button in the upper right corner, the dropdown context menu is 3/4 off the screen. Basically, I only see the first 3-4 letters in each menu items text. Any ideas? Maybe I didn't get that memo!! I dont want to setup an ActionBar. I'd think by default, this should work fine?!? Again, its pretty much standard menu code for < 3.0 SDK. @Override public boolean onCreateOptionsMenu(Menu menu) {

Android ICS not receiving data sms

北战南征 提交于 2019-12-13 04:19:48
问题 My application has a static broadcast receiver that listens to specific data sms on port 50011 to wake up the application and run. I tested the app on a wide range of android devices (android 2.1 -> android 2.3.4) and it is working perfectly. However, I am trying it now on Samsung Galaxy Nexus running Android 4.0.2 and it is failing to receive the binary sms. The OS doesn't seem to consume that SMS as it is not showing any relevant messages in logcat. Is anyone familiar with that issue? Here

Embedded Youtube player getting cut off

家住魔仙堡 提交于 2019-12-13 01:33:37
问题 I am trying to embed youtube video in my android app using WebView. Here is the code: { WebView mView = new WebView(getContext()); String embeded = loadPlayer(); // this is javascript string containing YtPlayer api WebSettings webSettings = mPreview.getSettings(); webSettings.setJavaScriptEnabled(true); mView.setBackgroundColor(535353); WebChromeClient mChromeClient = new WebChromeClient(); mView.setWebChromeClient(mChromeClient); mView.setWebViewClient(new WebViewClient()); mView

SQLiteReadOnlyDatabaseException but the database is writable

谁说我不能喝 提交于 2019-12-13 01:32:13
问题 I am using SQLite on Android, ICS. When I make an update, I get a SQLiteReadOnlyDatabaseException . That was weird because i created it with SQLiteOpenHelper.getWritableDatabase() . Also, I tested if the database is readonly just before the update occurs with myDB.isReadonly() . This exception doesn't occur on Gingerbread. I suspect it has something to do with different versions of sqlite across android versions. Here is my code for the creation of the database. protected static class

Android 4.0.x and 4.1.x viewPager bug?

﹥>﹥吖頭↗ 提交于 2019-12-13 00:34:38
问题 i have a problem with viewPager on android API 15 and 16, my app si basically simple remote control for set top boxes with three screens where on the first screen you can choose which box you want to control, second and third are just screens with controls. Now the problem is that everything works pefectly on every other version of android, but on API 15 and 16, when the app starts, i can not uses the creen with boxes, when i tap anywhere it detects actions on the second screen which are

Check if the event exists before adding it to the Android calender

假如想象 提交于 2019-12-12 18:34:07
问题 I have a list of events in my app. A button on the side lets the user add the event date and time to his/her calender. I use a calender intent to redirect the user to the android calender which the corresponding date and time. Now after the user adds the event to his calender, I would like to disable the 'add event' button which corresponds to the events he/she had already added(so the user avoid adding the same event again). How can I do this? I have gone through the new calender API for

ToyVPN unable to connect to VPN Server

不想你离开。 提交于 2019-12-12 17:22:03
问题 I am experimenting with the new VPNService API with the sample project "ToyVPN". I have not modified the source code and it compiles smoothly, but I cannot seem to get it to connect to my VPN server on ec2. It times out with the error "Got java.lang.IllegalStateException: Timed out". From the server's perspective, no packets are being received from the phone. I am entering in the ip address of the server, 1723, and my password for server address, server port, and shared secret respectively. I

Native library not loading under Android 4.0.3 (MIUI ROM)

送分小仙女□ 提交于 2019-12-12 16:26:30
问题 A customer contacted me - an Android app of mine broke once he updated his Android ROM to MIUI equivalent to Android 4.0.3. The relevant line in LogCat is: 04-09 10:37:09.326 17789 17789 E AndroidRuntime: java.lang.UnsatisfiedLinkError: Couldn't load mylib: findLibrary returned null The app, needless to say, worked before the upgrade. So the native library did not go magically missing. Any ideas why would Android 4.0.3 refuse to load a native library where earlier versions would? The library