[android-developers] Changes in API in 1.5 - onFreeze and friends
In order to bring myself up to speed with Android, I'm trying to get this example application: http://www.helloandroid.com/node/110 working in Android 1.5. I'm making reasonable progress, and most of the API changes I've successfully overcome so far make sense. But one class, URLEditor (subclassing Activity), has a method: @Override protected void onFreeze(Bundle outState) { super.onFreeze(outState); outState.putString("url", mText.getText().toString()); } I understand that the purpose of onFreeze was to enable the state of an activity to be persisted through a period of dormancy. Is it no longer necessary to do this, and if it is still necessary, what mechanism does the 1.5 API provide for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] java.net.SocketException: unknown error - and yes, I have got permission.INTERNET set
[Right! I've fixed this myself, solution at the bottom - but I'm posting anyway in case anyone else is struggling with the same thing...] OK, I admit I'm new to Android, and could be making silly mistakes. I'm trying to do a simple XML remote procedure call using the org.xmlrpc.android library. When I tried this first I did not have android.permission.INTERNET set, but I now do; my manifest is now: http://schemas.android.com/apk/res/android"; package="uk.co.cygnets.ov.android" android:versionCode="1" android:versionName="1.0.0"> However, when in the emulator I open Settings -> Applications -> Manage Applications -> OV Android (my application), the panel 'Permissions' still says 'No permissions required'. I'm guessing that the emulator is holding onto stale data, but I'm not certain why. I have deleted my application from the emulator, and reinstalled it, several times. "android.permission.INTERNET" is not present in the auto-generated file 'R.java'; I don't know whether it should be. I've deleted this and regenerated it several times, too. OK, nw the fix >From my reading of the documentation here: http://code.google.com/android/devel/bblocks-manifest.html I guessed that I needed a 'uses-permissions' element so I experimentally tried http://schemas.android.com/apk/res/android"; package="uk.co.cygnets.ov.android" android:versionCode="1" android:versionName="1.0.0"> This works! Whether I also need the 'android:permission' attribute on the application tag I don't know, but it doesn't seem to do any harm. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Connecting a Google Dev phone to UK Vodafone
Just in case anyone else is struggling with this, there is a solution, and it's easy. When you get your new Dev phone, and you stick a Vodafone SIM in it, it fails to connect to Google's servers and can't initialise. It seems to be bricked. But wait, all is not lost. Buy a T-Mobile pay-as-you-go SIM for £5. Put it in your Dev phone and get in your car. Drive to the within range of your nearest T-Mobile tower ('not so much a network, more a sparse matrix'). Switch on your phone, and register with Google. Ah, you say, but I don't want a T-Mobile phone, they have virtually no coverage outside city centres. Verily, I say unto you, be not afraid, for I bring tidings of great joy. You may now switch off your Dev phone, extract the T-Mobile SIM card, put in your Vodafone SIM card, and switch back on. And Lo! all is well and it works. I've only tried this fix with UK Vodafone, because that's the network I wanted to use. But if you have trouble getting your Dev phone past the 'cannot connect to Google servers' phase with your own wireless provider of choice, this may work for you too. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---