android-4.0-ice-cream-sandwich

XML parsing working fine with Android 2.2, 2.3 but not with ICS

冷暖自知 提交于 2019-12-02 07:18:45
问题 I am fetching the some data from the server using XML parsing that is not working with ICS version of Android.here is my please tell me what correction do I make so that I should also run on ICS...(It's working fine with lower versions). Here is my code try { URL url = new URL( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(new InputSource(url.openStream())); doc

XML parsing working fine with Android 2.2, 2.3 but not with ICS

北战南征 提交于 2019-12-02 04:12:33
I am fetching the some data from the server using XML parsing that is not working with ICS version of Android.here is my please tell me what correction do I make so that I should also run on ICS...(It's working fine with lower versions). Here is my code try { URL url = new URL( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(new InputSource(url.openStream())); doc.getDocumentElement().normalize(); NodeList nodeList = doc.getElementsByTagName("file"); namephoto = new

Android and JFileChooser

╄→гoц情女王★ 提交于 2019-12-01 22:15:05
I've developed a desktop application that allows the user to extract images from their phone. When I first started this project, my android was running Gingerbread. When I plugged my phone into the laptop via USB, it would appear as a "Device with removable storage". Therefore, the JFileChooser would pick it up. nwdir = new JFileChooser(); nwdir.setCurrentDirectory(new java.io.File("C:\\")); nwdir.setDialogTitle(choosertitle); nwdir.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); nwdir.setAcceptAllFileFilterUsed(true); However, I recently upgraded the phone's o/s to Icecream and it now

App Widget not displaying in ICS app drawer

删除回忆录丶 提交于 2019-12-01 19:41:14
问题 Has anyone experienced their app widget not being listed in the ICS app drawer? Originally I started this app for FroYo and below, which supports the app widget just fine. Along came Gingerbread and Honeycomb, those work too. The widget appears in the list in the emulator if I open up the "Widget Preview" app, however when you just open the drawer it isn't listed with the others. It does appear on Honeycomb. I don't (and others haven't also) see it on my Galaxy Nexus anywhere either. I've

Android ActionBar setActionView layout issue

纵饮孤独 提交于 2019-12-01 17:59:14
I've been trying to use the setActionView from the ActionBar in ICS Seems like it should be straight forward but somehow I'm not getting the layout alignment that I would hope for. As you can see in the image below the 'target' icon is centered correctly within it's layout. But when I setActionBar(progress) the progress view is always aligned to the right whatever I try. Here are the 2 states, before and after clicking the menu item. As you can see the progress view is always aligned to the right. I've tried changing the gravity options in the my progress layout xml from left to right to

Android ActionBar setActionView layout issue

让人想犯罪 __ 提交于 2019-12-01 17:48:18
问题 I've been trying to use the setActionView from the ActionBar in ICS Seems like it should be straight forward but somehow I'm not getting the layout alignment that I would hope for. As you can see in the image below the 'target' icon is centered correctly within it's layout. But when I setActionBar(progress) the progress view is always aligned to the right whatever I try. Here are the 2 states, before and after clicking the menu item. As you can see the progress view is always aligned to the

YouTube intent, error 400

非 Y 不嫁゛ 提交于 2019-12-01 15:37:06
I found that I can start a YouTube video in stock YouTube player this way: Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:U79wVTdnMpw")); startActivity(i); But it doesn't work. The YouTube player is started, but I get an error: There was a problem with the network [400] I have updated the YouTube app but nothing changes. I am using Android ICS 4.0.1. I found the answer on this Google product forums which helped to solve my problem - which was exactly the problem you're experiencing :) SOLUTION: Give ONLY the YouTube ID and not the entire YouTube URL to the loadVideo()

YouTube intent, error 400

≯℡__Kan透↙ 提交于 2019-12-01 14:18:40
问题 I found that I can start a YouTube video in stock YouTube player this way: Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:U79wVTdnMpw")); startActivity(i); But it doesn't work. The YouTube player is started, but I get an error: There was a problem with the network [400] I have updated the YouTube app but nothing changes. I am using Android ICS 4.0.1. 回答1: I found the answer on this Google product forums which helped to solve my problem - which was exactly the problem you're

How to use VPN in Android? [closed]

♀尐吖头ヾ 提交于 2019-12-01 06:37:51
I am exploring VPN Connectivity in Android. I am new to this section. I want to know how to setup a VPN connection in Android using an application? I came across a sample code namely ToyVpn.I ran the application but i dont know what datas i need to give in the form shown by that application, Consider iam having a VPN server with IP address (say 10.162.1.2), what do I need to do in that application to make that app work? If I try to use any public VPN server, what do I need to do? I had downloaded Openvpn source from here and I compiled and ran in my ICS device, but i don't know how to

Why my close activity animation doesn't work on Android 4.0 (ICS)

微笑、不失礼 提交于 2019-12-01 06:32:18
I made a theme with a custom animation (slide up and slide down). The animation works fine on the older android versions.. However, when I try it out on Android 4.0 (ICS) the on close animation doesn't work. Only the slide up animation works fine on ICS. Here is my theme I use for the animation: <style name="myTheme" parent="android:Theme.Black"> <item name="android:windowTitleSize">45dip</item> <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item> <item name="android:windowAnimationStyle">@style/myTheme.Window</item> </style> <style name="myTheme.Window"