How to use Apache HttpClient (DefaultHttpClient) with HTTPS/SSL on Android
Connecting to an HTTPS address using the Apache HttpClient shipped with Android is not so straight forward. Whether the server's certificate as correct or not, you will probably see one of these exceptions:
javax.net.ssl.SSLPeerUnverifiedException: No peer certificate.
Here is a "quick and dirty" solution which makes the HttpClient trust any certificate without verifying it (not recommended to be used in productive environments, of course). Read more...
Creating & Parsing WBXML with Java using kXML 2
WBXML (WAP Binary XML) is a binary representation of XML. It is used e.g. by the Microsoft Exchange ActiveSync protocol.
Only very few WBXML parsers for Java seem to be available. One of the libraries you will probably come across when searching for a WBXML Java Library is kXML. kXML is a small XML pull parser, specially designed for constrained environments such as Applets, Personal Java or MIDP devices (see kXML's about page).
Getting started with kXML is a bit tricky, since you find only a handful of tutorials that are suitable for kXML 2. These snippets should make it easier for you. Read more...
Android SDK with 64bit Java SE Development Kit (JDK)
The Android SDK installer (r10 in my case) doesn't support the 64bit version of the Java SE Development Kit (JDK) out of the box. You will see an error message such as "Java SE Development Kit (JDK) not found".
Instead of installing the 32bit version of JDK, try the following workaround that I've found in the codearetoy blog.
Warning: Use these instructions at your own risk! Damaging the registry may lead to unexpected results and/or data loss!
- Open regedit.
- Navigate to HKEY_LOCAL_MACHINE\Software\JavaSoft\
- Export the entire content.
- Open the .reg-File you've saved the export to with an editor and replace "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\" with "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\".
- Double-click the .reg-File to run the import.
- Run the Android SDK installer again - it should work now.