android-4.0-ice-cream-sandwich

Using a Android WebView to connect to secure server with Client Certificate

感情迁移 提交于 2019-12-06 05:31:20
问题 Can a WebView or more specifically, PhoneGaps CordovaWebView, use client certificates to authenticate to a server? I understand the native browser can use client certs but I am trying to get a PhoneGap Android app to talk to a server that requires a client cert to work and can not see how. I have tried various methods I have seen on google, but they are not working on Android version 4.0 or greater. Any suggestions would be greatly appriciated. 回答1: It is not possible. The code that is needed

setHomeButtonEnabled on PreferenceActivity and nested preference

给你一囗甜甜゛ 提交于 2019-12-06 00:30:35
问题 I have preference screen extended PreferenceActivity . For targeting OS 4.0.3, I wanted to add < icon on action bar so I did this in onCreate() . ActionBar actionBar = getActionBar(); actionBar.setHomeButtonEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); It worked. < was added to left of app icon. But when I tap the item which goes into the next level (more detail screen), the < won't be displayed. Returning to the top level, the < appears again. I have never thought about a

My App works on Gingerbread… Crash on ICS and HC

不问归期 提交于 2019-12-06 00:05:30
I need your help. My App works fine on GingerBread, but on ICS and HC crash. This is the logcat 01-14 20:26:51.831: E/AndroidRuntime(698): FATAL EXCEPTION: main 01-14 20:26:51.831: E/AndroidRuntime(698): android.os.NetworkOnMainThreadException 01-14 20:26:51.831: E/AndroidRuntime(698): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099) 01-14 20:26:51.831: E/AndroidRuntime(698): at java.net.InetAddress.lookupHostByName(InetAddress.java:391) 01-14 20:26:51.831: E/AndroidRuntime(698): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242) 01-14 20:26:51.831:

Removing heighlight from image map area in Android 4.x app via PhoneGap Build

混江龙づ霸主 提交于 2019-12-05 19:33:14
I have tried every which way to try to remove the heighlight when pushing on an image map area of an image. I have search google time and time again and have added all the CSS code i could find in hopes it would help.. but it does not seem to. An example of what i am talking about: I have added: -webkit-user-modify: read-write-plaintext-only; border:none; outline: 0; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); -khtml-user-select: none; -o-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; * { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); cursor:

Android backward compatibility techniques

吃可爱长大的小学妹 提交于 2019-12-05 19:03:12
I am now advanced in developing my 15-activities android app which is based on the latest API (15 ICS). Now I discovered that main functionalists of the app is NOT backward compatible even with the android v4 support such as: 1-fragmentTransaction animation 2-the ability to putStringSet in sharedPref 3-having mapActivity using fragments I thought about making a second version for the older OS's of EACH class that has incompatibility issues (which are around 10) so I use them if I detect that the device running the app is old. However, I am sure this is a stupid way and there is a better way of

AssertionFailedError in ApplicationTestCase.createApplication() in newer Android versions when using MockContext

穿精又带淫゛_ 提交于 2019-12-05 17:26:58
问题 I am writing an Android ApplicationTestCase (TemperatureConverterApplicationTests example found in Android Application Testing Guide by Diego T. Milano on page 171). The example was written for Android 2.3 and it doesn't seem to work for Android 4. You don't have to know the book to understand the problem as I have simplified it. This works fine with Android 2.3.3 (API 10): setContext(new MockContext()); createApplication(); [To be precise an UnsupportedOperationException is thrown because

aapt.exe is throwing unhandled exception while building *.apk file for Android project in Eclipse

一个人想着一个人 提交于 2019-12-05 17:18:21
i just upgraded my system to Ice Cream Sandwich (Android 4.0) and now everytime I attempt to run my application in the debugger, I get a crash in aapt.exe . If I just build, it builds fine, but when I go to run it in the debugger, aapt.exe crashes (which pops up a dialog and asks me if I want to send data to Microsoft) and my project icon in Project_Explorer shows that it has error(s). Rajdeep Dua There is a known issue in AAPT for r15, try to change the build output to normal http://tools.android.com/knownissues AAPT crashes on Windows in some cases when the build output is set to verbose.

Android TextView NullPointerException with onTouchListener and onClickListener on 4.0

青春壹個敷衍的年華 提交于 2019-12-05 15:31:14
I have a TextView which I've assigned both an onTouchListener and an onClickListener: myTextView.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { _gestureDetector.onTouchEvent(event); return false; } }); myTextView.setOnClickListener(new OnClickListener() { public void onClick(View v) { // Show Toast Notification } }); The onTouchListener will detect an onFling() for the gesture detector. This code works without any problems EXCEPT for Android 4.0 (Ice cream sandwich). With 4.0, I receive a NullPointerException on "_gestureDetector.onTouchEvent

Possible to make setSystemUiVisibility() affect the entire system, rather than just your app?

这一生的挚爱 提交于 2019-12-05 15:26:23
I was hoping to make an app which dimmed the soft buttons to dots on the Galaxy Nexus, using the code from this answer . For completeness, this is the code: getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); Here's the question, is it possible for the app to make this setting system-wide rather than just while the app has focus? So ideally the app would run in the background and would keep View.SYSTEM_UI_FLAG_LOW_PROFILE as the default as long as it's running, for any and every app that you open (unless that app specifically overrides it, I suppose). Is this

Unable to resume Activity error

Deadly 提交于 2019-12-05 14:51:47
问题 My Activity contains this code to get all images on the SD card: String[] projection = {MediaStore.Images.Media._ID, MediaStore.Images.Media.DATA, MediaStore.Images.ImageColumns.DATA}; Cursor cursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, null, null, MediaStore.Images.Media._ID); int count = cursor.getCount(); int image_path_index = cursor.getColumnIndex(MediaStore.Images.Media.DATA); int i; for(i = 0; i < count; i++) { cursor.moveToPosition(i); String p =