aidl

How to find the status of VPN connection through framework APIs or any other efficient method?

六眼飞鱼酱① 提交于 2019-12-18 15:03:14
问题 So far: I found the following solutions Using Broadcastreceiver The broadcast receiver is deprecated from ICS Using Ping or Traceroute It's definitely going to take lots of time and its not efficient Polling for DNS server changes It's definitely going to take lots of time and its not efficient Using ip-address Even though it won't take much time depending on the network connection it may vary My conclusion: So far all the solutions I found are either not efficient or not so reliable. My

Android Aidl Compile Error: couldn't find import for class

[亡魂溺海] 提交于 2019-12-18 04:05:10
问题 ( I know there're multiple questions on stackoverflow and elsewhere (like google group) about adding parcelable for NetworkInfo but this is not about that. ) My work is under $(AOSP_ROOT)/device/ and involves multiple aidl files. one of it is like, package com.example; parcelable SomeRequest; And another aidl is like, package com.example; import com.example.SomeRequest; interface SomeService { SomeRequest getRequest(); } And I'll get compile errors like, device/somedevice/sdk/libs/aidl/com

Android Aidl Compile Error: couldn't find import for class

陌路散爱 提交于 2019-12-18 04:05:01
问题 ( I know there're multiple questions on stackoverflow and elsewhere (like google group) about adding parcelable for NetworkInfo but this is not about that. ) My work is under $(AOSP_ROOT)/device/ and involves multiple aidl files. one of it is like, package com.example; parcelable SomeRequest; And another aidl is like, package com.example; import com.example.SomeRequest; interface SomeService { SomeRequest getRequest(); } And I'll get compile errors like, device/somedevice/sdk/libs/aidl/com

Android RemoteExceptions and Services

老子叫甜甜 提交于 2019-12-17 22:14:44
问题 So I've written a Service and an Activity for the Android OS. My service is running in it's own process, so all the communication between my Activities and the Service happens via IPC. I use the standard Android .aidl mechanism for this. So far everything works fine. However, the AIDL generates all method stubs using "throws RemoteException" so I have to handle them. I did a quick grep on the entire Android source-code and only found three cases where this exception is ever thrown. These are

how can I add the aidl file to Android studio (from the in-app billing example)

こ雲淡風輕ζ 提交于 2019-12-17 04:16:25
问题 I am currently migrating an Eclipse app to Android Studio. This app was using the in app billing. My main problem is to compile the project and the aidl file (I guess you all use this file) I get this error message: Gradle: error: cannot find symbol class IInAppBillingService Gradle: error: package IInAppBillingService does not exist So, following some tutorials, I move this file from com.mypackage.billing to src/main/aidl (see this reference) But as soon, as I do that, I get this message:

android: couldn't find import for class error in aidl files com.android.internal.telephony.gsm.NetworkInfo

拥有回忆 提交于 2019-12-13 12:36:51
问题 I am trying to re-use PhoneUtils.java ( ~/android_src/packages/apps/ Phone/src/com/android/phone/ ) within my app with some customizations. I have added INetworkQueryServiceCallback.aidl and INetworkQueryService.aidl into my app folder ( ~/android_src/packages/ apps/USSDActivity/src/com/myapp/ussdactivitytest ) however when i am building alongside android source I am getting the following error: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation

After upgrading to the new Android Studio I have been having error

荒凉一梦 提交于 2019-12-13 04:09:21
问题 It gives this build error for any project: Please find the picture attached below Cause: aidl is missing from 'C:\Users\onyeb\AppData\Local\Android\Sdk\build-tools\27.0.3\aidl.exe' Full trace: rg.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:compileDebugAidl'. at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139) at org.gradle.initialization.DefaultGradleLauncher

Complex types from a remote service to an application through AIDL

ぃ、小莉子 提交于 2019-12-12 18:34:35
问题 Ideally I would like to send an object of type ArrayList<ArrayList<ASimpleClass>> from a remote service in one APK to an application in another. I'm not sure if this is even possible as the API demo code suggests that it isn't: /** * This demonstrates the basic types that you can use as parameters * and return values in AIDL. */ void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString); whilst the autocomplete for writeTo/readFromParcel suggests

Android asynchronous AIDL

左心房为你撑大大i 提交于 2019-12-12 03:59:17
问题 I have a main app and a remote service app that connects each other using AIDL. I'm doing synchronous process successfully in remote service, but how can I do an asynchronous process? My AIDL file is this: import pack.addonlibrary.Action; /* parcelable */ interface IAddon { void onBind(); void onUnbind(); int getCallbacks(); List<Action> onPageStarted(String url); List<Action> onPageFinished(String url); List<Action> onClicked(String url); List<Action> onUserConfirm(boolean cancelled); List

AIDL Service and Android Open Source

人走茶凉 提交于 2019-12-12 03:24:12
问题 I've created an AIDL service called IHelloService and I am trying to call it from IOBridge under the libcore module. Currently my code looks like this // import import android.os.IHelloService; import android.os.ServiceManager; .... IHelloService helloService = IHelloService.Stub.asInterface(ServiceManager.getService("hello")); int val = helloService.getVal(); I run into errors when doing a standard build. The errors include package android.os does not exist and cannot find symbol