android-4.0-ice-cream-sandwich

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

感情迁移 提交于 2019-12-04 10:05:38
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. It is not possible. The code that is needed to answer back a challenge for a client certificate is not available in the sdk. If you look at the source

setHomeButtonEnabled on PreferenceActivity and nested preference

亡梦爱人 提交于 2019-12-04 07:50:59
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 mechanism of nested preference since smart the PreferenceActivity hides it. Now my question is, why won't

Android Actionbar Search widget implementation In ListFragment

点点圈 提交于 2019-12-04 07:27:05
问题 I currently have my application set up with a ListFragment on the left and a DetailsFragment on the right (similar to the layout on the tablet below). On the action bar I have a search widget which when a search term is submitted should update the contents of the list (in the ListFragment). I have been following the search guide on android dev (http://developer.android.com/guide/topics/search/search-dialog.html) but I am having problems getting the search to update the list in the same

Need help correctly emulating the Samsung Galaxy Nexus with AVD

孤街浪徒 提交于 2019-12-04 07:14:09
I'm working to ensure my app is getting tested on ICS properly using the popular Galaxy Nexus as a basis. I'd like to emulate it as faithfully as possible. I've created an AVD with the following parameters (from config.ini). This was mostly created using the GUI (disk.dataPartition.size is a hand-edited param based on other articles I've read). The memory values may be on the low side but that's not causing a problem for me at the moment. Since the device had no external sdcard I've said "no" for hw.sdCard, but I'm clearly not seeing anything in the /mnt/scdcard (same as /sdcard) and cannot

UTF-8 encoding on WebView and ICS

血红的双手。 提交于 2019-12-04 06:47:19
To correctly display UTF-8 text in a WebView , I usually use a doctype and a meta tag : <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> and I use a tip I've seen on Stack Overflow: string = URLEncoder.encode(string, "UTF-8").replaceAll("\\+", " "); That works fine on Gingerbread and older Android versions, but my Nexus S recently received the Ice Cream Sandwich update, and French characters like é , à , è , etc. are displayed like this: é , for example. I don't know if the ISO-xxxx-1 encoding is the solution, but if someone had the same problem, please share. Try using

Set textview fading in Android 4.0.3

ⅰ亾dé卋堺 提交于 2019-12-04 06:33:57
I've just tried to implement the fade effect for TextView in Android 4.0.3; however, it doesn't work. fadingEdge="horizontal" singleLine="true" ellipsize="marquee" This code works perfectly for 2.3.7 and below, but not working for 4.0.3. I'm wondering why is that so? and how to make fade effect for TextView ? My question is the same as this one: http://groups.google.com/group/android-developers/browse_thread/thread/97131b20de8b2ebd , but no answer yet. Yves Delerm It is a bit late, but that may help people who have the same question. I have had this problem on different phones, and it could

WebView in ICS touch events not being fired properly

倖福魔咒の 提交于 2019-12-04 05:51:55
问题 In ICS webview (which is compatible with older versions like 2.3.3) I am loading html file and wrote some functions which are linked with touch events like touchmove and touchend in javascript. But the problem in ICS is clicks on device is not recognized some times and no error in logcat even, can someone has work around for this problem? Thanks in advance. 回答1: It could be your device treat them as mouseevents. (sucks...) I am facing a similar problem. I am not sure if it's the problem of my

Android 4.0.4 MediaPlayer prepare issue using RTSP urls

倾然丶 夕夏残阳落幕 提交于 2019-12-04 03:45:02
I am experiencing an odd issue with a video streaming application I am working on. The actual streaming of video/audio is working fine on all of my test devices. However, on seemingly any device 4.0+, when using an RTSP URL, prepare() returns instantly (this causes an issue providing proper feedback to the users while a video is loading and interferes with a few other systems I have in place). Below is the block of code where I initialize and setup my MediaPlayer, but keep a few things in mind: My initPlayer method is called from an AsyncTask. The video does eventually play correctly, but

Unable to resume Activity error

依然范特西╮ 提交于 2019-12-04 01:12:29
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 = cursor.getString(image_path_index); fd.addToPhonePhoto(p); } cursor.close(); The occurred while the

ShareActionProvider with a split ActionBar

巧了我就是萌 提交于 2019-12-03 22:36:46
I'm using a ShareActionProvider and would like to take advantage of the split ActionBar when there isn't enough room for it at the top - android:uiOptions="splitActionBarWhenNarrow" . The action works fine when the ActionBar does not need to split: However when the ActionBar does need to split, the ActionProvider seems to break the lower ActionBar layout completely. It fills the entire viewport below the top ActionBar and the action itself does not appear: Has anyone been able to use these two features together successfully? This has been fixed in the dev branch of ActionBarSherlock- https:/