android - aidl oneway keyword error -
i implementing aidl interface, , reason, following code gives me error:
// iapkinsoncallback.aidl package com.applications.philipp.apkinson.interfaces; /** interface implemented apkinson plugins can give feedback */ oneway interface iapkinsoncallback { /** called plugin after registration setup data result viewing usage of data: intent intent = new intent(intentactionname); intent.putextra(bundleresultkey, result); startactivity(intent); */ void onregistered(string intentactionname, string bundleresultkey); /** called plugin when result ready after stopdata() called apkinson */ void onresult(string result); /** called if error occured in plugin , call won't handled */ void onerror(string errormsg); }
error:
<interface declaration>, <parcelable declaration>, aidltokentype.import or aidltokentype.package expected, got 'oneway'
when remove oneway
keyword, works fine. cannot solution problem...
summary:
move oneway
keyword method level.
explanation-
weird problem related /platform/frameworks/base/api/current.txt
file inside android framework (big txt file contains every function , being used android studio) .
example-
/** interface implemented apkinson plugins can give feedback */ interface iapkinsoncallback { /** called plugin after registration setup data result viewing usage of data: intent intent = new intent(intentactionname); intent.putextra(bundleresultkey, result); startactivity(intent); */ oneway void onregistered(string intentactionname, string bundleresultkey); /** called plugin when result ready after stopdata() called apkinson */ oneway void onresult(string result); /** called if error occured in plugin , call won't handled */ oneway void onerror(string errormsg); }
you same result without error.
Comments
Post a Comment