android-2.2-froyo
Custom SSL handling stopped working on Android 2.2 FroYo
Here is the answer, with many, many thanks to a helpful Seesmic developer willing to share the fix: In the custom socket factory, the socket creation (with createSocket) has apparently been changed specifically for the SSLSocketFactory implementation. So the old: @Override public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException { … Read more
What does “Failure [INSTALL_FAILED_OLDER_SDK]” mean in Android Studio?
After I changed defaultConfig { applicationId “com.example.bocheng.myapplication” minSdkVersion 15 targetSdkVersion ‘L’ #change this to 19 versionCode 1 versionName “1.0” } in build.gradle file. it works
Android SDK Manager gives “Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml” error when selecting repository
Try this solution and it worked. this problem is caused because ADB is unable to connect to the android servers to fetch updates. (If at home try turning off firewall) Goto Android SDK Manager c://android-sdk-windows/ open SDK-Manager Click Settings – Will be asked for a proxy. If have one enter the IP address and the … Read more
Uninstall old Android SDK versions
Just delete the packages you want to uninstall. You may still want to retain some of the older SDK’s so as to try your apps on lower platform. I personally keep GB(API 10), ICS(API 14) and JB(API 17). Also what you can try is just move the whole android SDK folder to a new location … Read more
Reading RFID with Android phones [closed]
NFC enabled phones can ONLY read NFC and passive high frequency RFID (HF-RFID). These must be read at an extremely close range, typically a few centimeters. For longer range or any other type of RFID/active RFID, you must use an external reader for handling them with mobile devices. You can get some decent readers from … Read more
Can I get data from shared preferences inside a service?
You can access the default shared preferences instance, which is shared across all your Activity and Service classes, by calling PreferenceManager.getDefaultSharedPreferences(Context context): SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); This is great for storing simple primitives (like booleans) or serializable objects. However, if you’re capturing a lot of location data, you might consider using a SQLite database instead.
Why can’t one add/remove items from an ArrayAdapter?
You probably initialized the adapter with a plain Java array (e.g., String[]). Try using something that implements the java.util.List interface (e.g., ArrayList<String>).