Skip to main content

Posts

Showing posts from November, 2010

NoSuchMethodError in Android AIDL

Finally a good start of Monday :-). Resolved a weird problem of Android Framework which was disturbing me through out the weekend. One of my team mate (Sandeep) did exceptional R&D and helped me to come to this conclusion. [Problem] NoSuchMethodError exception while I was trying to access ISnsRequester.aidl of SNSProvider. In Android 2.2 (Froyo) some of the method definitions of ISnsRequester.aidl file has been changed. A new input argument targetSubID has been added to commentPost() and commentRetrieve() methods. But in our Android source code repository by mistake Telephony framework was still using older version of ISnsRequester.aidl (i.e. of Android 2.1). This was the main cause of this problem. For all framework classes/packages Android build system (when you try to make a binary) makes entry into Android\frameworks\base\api\ current.xml   In fact current.xml acts as Look up for any method or class reference. Thus definitio

Certificate Exception in Google Data API Authentication

You are running the Google Data API samples for the first time and got the following exception- javax.net.ssl.SSLHandshakeException : sun.security.validator.ValidatorException: PKIX path building failed : sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target It’s definitely SSL certificate error, but it took me a while to figure out the actual cause and the resolution. So thought to share the finding. As we all do :-), I did Google and got this site helpful- http://www.java-samples.com/showtutorial.php?tutorialid=210 it explains a generic solution to this problem. To resolve this Google Data API connection error, you need to import Google Server certificate into your JDK Keystore. Data API does authentication using following URL- https://www.google.com/accounts/AuthSubRequest To get the certificate, access https://www.google.com/accounts/AuthSubRequest from your browser (IE)

Android Remote Service

This tutorial is to demonstrate usage of AIDL Interface and interacting 2 Android applications through Service. You can get the complete example source code- RemoteService Example and RemoteService Calling Example   As we all know Android Service concept is good for tasks running in the background. Based on scope of accessibility services are of 2 types- Local and Remote . As the name indicates, Local Service can be accessed only within the process or application which it is part of. On the other hand, Remote Services can be accessed from different process/application and thus it posses inter-application communication use cases e.g. you are running one service to provide Geo Location for Cell ID. So, any application can read the Cell-ID and access your service to get Geo Co-ordinates.   As the usability increases so as the building blocks for creating Remote Service. The first challenge is to do inter-process communication so that one appli