aidl

AIDL interface between two applications

放肆的年华 提交于 2019-12-03 21:36:00
问题 I've stuck a total wall with the AIDL interfacing. I've an app which has to be controlled via 3rd party application (I've enough control over this so I can ask them to implement what ever I need into their activity) Originally my app was also an activity with interface and everything but I've changed it to be a background service and for testing, I created a dummy app which manages to start the service app to the background. Now I would like a way to request method calls from the service

How to return hashmap in an aidl file

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want hashmap as my return type for a method from aidl file. But it is giving error as unknown return type. My code is interface IRemoteservice { HashMap<String,CharSequence> getMapValues(); } 回答1: I got the solution from google groups. And now it is working fine. Solution is we have to declare Map in aidl file. interface IRemoteservice { Map getMapValues(); } 文章来源: How to return hashmap in an aidl file

Android Aidl Compile Error: couldn&#039;t find import for class

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: ( 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/example/SomeService.aidl:9: couldn't find import for

Communicate with foreground service android

余生颓废 提交于 2019-12-03 01:55:07
First question here, but I've been around for a while. What do I have: I'm building an Android app which plays audio streams and online playlists. Everything is working fine now, but I'm having issues in communicating with my service. The music is playing in a Service, started with startForeground, so it doesn't gets killed. I need to communicate from my activity with the service, for getting the track name, image, and a couple of things more. Whats my issue: I think I need to start my service with bindService (instead of my current startService) so the activity can talk to it. However, when I

Need AIDL tutorials [closed]

扶醉桌前 提交于 2019-12-03 01:13:56
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am working on AIDL and consider the APIDemo for it. But if some one has more knowledge please share it. 回答1: The tutorial on the android developer site is good. There are also a bunch of other good ones: http:/

AIDL interface can&#039;t find import for Parcelable class

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My issue seems to be similar to this question and this one but it is a bit different. I am making an AIDL service that is in a Library project and using it in my application. I have a class Vehicle that is in my application that I have made parcelable so that I can use it in my interface. (I would like to get a List of vehicles from my service that is in the library to my application) Do I need a Vehicle.java in both the application and the library? Do I need a Vehicle.aidl in both? I had Vehicle.java AND Vehicle.aidl in both application and

Android: AIDL refusing to generate code from aidl file defining parcelable

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to build a library with aidls. LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := test LOCAL_SRC_FILES := $(call all-java-files-under, java) \ java/com/testapp/Istudent.aidl \ java/com/testapp/Itest.aidl \ LOCAL_PREBUILT_JAVA_LIBRARY := framework.jar include $(BUILD_JAVA_LIBRARY) I am trying to refer the Istudent in Itest. Istudent.aidl package com.testapp; parcelable Istudent; Istudent.java public class Istudent implements Parcelable{} Itest.aidl package com.testapp; import com.testapp.Istudent; interface

Need AIDL tutorials [closed]

拜拜、爱过 提交于 2019-12-02 16:32:10
I am working on AIDL and consider the APIDemo for it. But if some one has more knowledge please share it. SBerg413 The tutorial on the android developer site is good. There are also a bunch of other good ones: http://marakana.com/forums/android/examples/48.html http://owenhuangtw.pixnet.net/blog/post/23760257-android-aidl-(android-interface-definition-language ) http://www.app-solut.com/blog/2011/04/using-the-android-interface-definition-language-aidl-to-make-a-remote-procedure-call-rpc-in-android/ Another good AIDL tutorial: http://mindtherobot.com/blog/37/android-architecture-tutorial

Android IPC Remote service call display Error

拜拜、爱过 提交于 2019-12-02 03:58:14
I want to make one demo application regarding the IPC communication .(Communication between Service). I am using AIDL for that . I found most of tutorial the RemoteService and Client are in same package . I actually do it separately ,While passing the object I am using Parcelable Method and facing Error ... It said like The RemoteService Signature unable to find your class.. I displayed my Logcat Below also : If you have any solution please guide me ...or any interdependent server client service tutorials or documents.. LOGCAT: 06-20 14:47:53.973: W/dalvikvm(4465): VFY: unable to find class

android aidl import

自作多情 提交于 2019-12-01 21:17:05
问题 I'm trying to import android.content.Context to AIDL file but eclipse doesn't recognize it.. here's my code: package nsip.net; import android.content.Context; // error couldn't find import for class ... interface IMyContactsService{ void printToast(Context context, String text); } Can anyone help me? 回答1: Using android.content.Context isn't going to work since it doesn't implement android.os.Parcelable . However - ff you have a class ( MyExampleParcelable for instance) that you want to