I am implementing an aidl interface, and for some reason, the following code gives me an error:
// IApkinsonCallback.aidl
package com.applications.philipp.apkinson.interfaces;
/** Interface implemented by Apkinson so plugins can give feedback */
oneway interface IApkinsonCallback {
/** To be called by plugin after registration to setup data for result viewing
Usage of this data:
Intent intent = new Intent(intentActionName);
intent.putExtra(bundleResultKey, result);
startActivity(intent);
*/
void onRegistered(String intentActionName, String bundleResultKey);
/** To be called by plugin when result is ready after stopData() was called by Apkinson */
void onResult(String result);
/** Called if an error occured in the plugin and the call won't be successfully handled */
void onError(String errorMsg);
}
ERROR:
<interface declaration>, <parcelable declaration>, AidlTokenType.import or AidlTokenType.package expected, got 'oneway'
When I remove the oneway
keyword, everything works fine. But this cannot be the solution for my problem...