Basically I want to implement a service that exposes his interface to be used via Android IPC in other apps. The client application should then be able to register a Messenger to receive messages from the service. Since Messenger is Parcelable I thought it should be as simple as:
package com.example;
import android.os.Messenger;
interface MyRemoteService {
void registerMessenger(in Messenger messenger);
}
However, I get the error couldn't find import for class android.os.Messenger
I asked Google and found a blog post from 2010 in which the problem was solved by modifying the platform/android-<#>/framework.aidl
inside the android sdk so every developer has to modify that file on his/her local machine, which is not a viable solution for me.
Can I register the Messenger in another way that is supported in the Android 7 API (2.1)?