1

Can any one please describe me that what is oneway in aidl for android ?

like in below code what oneway does ?

oneway interface IPackageStatsObserver {

    void onGetStatsCompleted(in PackageStats pStats, boolean succeeded);

}
  • 2
    refer http://stackoverflow.com/questions/3041692/does-oneway-declaration-in-android-aidl-guarantee-that-method-will-be-called-in – sasikumar Dec 28 '16 at 06:45
  • Hi Rajdeep, your question is lacking detail and context. You might wanna have a look at stackoverflow.com/help/how-to-ask and try to improve your question in order to get more and better answers. – Flip Dec 28 '16 at 09:21
  • Found this via google: '[The oneway keyword modifies the behavior of remote calls](https://developer.android.com/guide/components/aidl.html)'. – Phil Cooper Dec 28 '16 at 09:23

1 Answers1

3

From the Google documentation (https://developer.android.com/guide/components/aidl.html)

The oneway keyword modifies the behavior of remote calls. When used, a remote call does not block; it simply sends the transaction data and immediately returns. The implementation of the interface eventually receives this as a regular call from the Binder thread pool as a normal remote call. If oneway is used with a local call, there is no impact and the call is still synchronous.

0xDEADC0DE
  • 2,453
  • 1
  • 17
  • 22