Postări

Android AIDL between two applications

I've recently read an article regarding Android AIDL here and as you see, this example is made on one single project with multiple modules. I won't present you the basics of the Android AIDL, because it's written very clear here   and on the Android official site. So the main ideea of this article is to show you how to make an Android AIDL between two applications. Step 1. Create a new application called " myservice ". Create an .aidl file and copy and paste the following code package com.ccc.myservice; interface IMyAidlInterface { String hello(); } Step 2. After you build the project, create a service like this   package com.ccc.myservice; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.os.RemoteException;   public class RemoteService extends Service { public RemoteService() { } @Override     public IBinder onBind(Intent intent) { // Return the interface ...