aidl

Can Messenger (lightweight alternative to AIDL) be used for cross-application communication?

假装没事ソ 提交于 2019-12-06 02:05:10
问题 A quick question: the Android docs say very clearly that Messenger is an alternative for AIDL for IPC (inter process communication). They never explicitly say though if this extends to processes running in different applications, or just within one app. I strongly suspect the former, but wanted to check. Thanks! Jan 回答1: AIDL is only really used for inter-app IPC. While it is possible to use AIDL for internal communication, it doesn't buy you anything and puts limitations on your Binder

android-studio can't find an aidl interface for use in class

梦想与她 提交于 2019-12-05 22:37:19
问题 I have an interface defined in the aidl but I can't extend it or find it any way. The ide just tells me: Can not resolve symbol 'KeyEventListener' Any idea how to fix this? Additional infos: KeyEventListener is the name of the interface defined in KeyEventListener.aidl KeyEventListenerImpl is the class which extends the interface Stub KeyEventListener just contains one method named 'void doIt();' and is well formatted; I know android-studio is some thing like a pre-alfa but like it very much

How to debug remote AIDL service in Android?

醉酒当歌 提交于 2019-12-05 18:41:12
I have sources of a remote service which is using AIDL. Also I have my own app that connects to that service. I debug two apps simultaneously, but inside the remote service I can hit breakpoints only in generated AIDL file (stub and proxy), but I can't hit the real methods of the remote service. What can be the reason? Maybe I'm doing something wrong? Thanks! It's a while since I tried this, but from memory I think what I did was : I set the breakpoints in the source, started the app which used the remote service, then went to the DDMS perspective and selected the process corresponding to the

Android Camera Framework for API2

不想你离开。 提交于 2019-12-04 16:35:45
Android camera framework has evolved a lot over the years. During the days of API 1, the camera application framework (Java implementation) used to interact with native camera service (C++ implementation) using a JNI glue layer which also implemented binder. This mechanism was fairly straightforward to understand, on a higher level. Now, I can see that for API 2, JNI layer is removed and application framework talks directly to the native camera service using aidl interfaces. Refer architecture diagram: https://source.android.com/devices/camera/index.html Even though the architecture diagram

Communicate with foreground service android

我是研究僧i 提交于 2019-12-04 09:06:52
问题 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

Android : Do Application Login in background on boot-up

北战南征 提交于 2019-12-04 08:00:59
I have a VOIP Application, I need to login the application in background on device bootup. Currently the init to my application is done on UI Active( onCreate() ). I have the following things in my mind, can anyone help and clear my doubts. The service design is must to achieve this task?? Which Service Remote(AIDL) or Local Service and why? How does the UI and Service interaction happens? After UI is active who gets the Call- Backs? UI or Service ? Should i make Service as my Controller i.e Service to UI data Pass Vice-versa? Sample App: Skype. So there are many ways to achieve what you want,

Remote service, leaks activity when rotating

自古美人都是妖i 提交于 2019-12-04 07:42:30
I've got a problem with a callbacks in remote service, after register a callback rotation cause an activity leak. Can You give me some suggestion what I'm doing wrong. IRemoteApi.aidl import com.example.remoteservice.IRemoteListener; interface IRemoteApi{ void addListener(IRemoteListener listener); void removeListener(IRemoteListener listener); void sendRequest(String msg); } IRemoteListener.aidl interface IRemoteListener { void onMessage(String text); } RemoteService.java public class RemoteService extends Service { private static final String TAG = RemoteService.class.getSimpleName(); final

Can Messenger (lightweight alternative to AIDL) be used for cross-application communication?

若如初见. 提交于 2019-12-04 06:13:33
A quick question: the Android docs say very clearly that Messenger is an alternative for AIDL for IPC (inter process communication). They never explicitly say though if this extends to processes running in different applications, or just within one app. I strongly suspect the former, but wanted to check. Thanks! Jan AIDL is only really used for inter-app IPC. While it is possible to use AIDL for internal communication, it doesn't buy you anything and puts limitations on your Binder implementations. Moreover, one application does not have more than one process, in the vast majority of cases.

android-studio can't find an aidl interface for use in class

耗尽温柔 提交于 2019-12-04 05:56:20
I have an interface defined in the aidl but I can't extend it or find it any way. The ide just tells me: Can not resolve symbol 'KeyEventListener' Any idea how to fix this? Additional infos: KeyEventListener is the name of the interface defined in KeyEventListener.aidl KeyEventListenerImpl is the class which extends the interface Stub KeyEventListener just contains one method named 'void doIt();' and is well formatted; I know android-studio is some thing like a pre-alfa but like it very much and would be very happy if some one could halp me out on this! You are probably best off having a look

When to use an aidl based service?

天涯浪子 提交于 2019-12-04 00:32:25
问题 Under what circumstances would using AIDL to define a service interface be the correct decision (rather than just creating an extension to the service class)? 回答1: You need to use AIDL if you want a class outside of your application's process to access the Service. If you're only using the service from inside your application, you can use a local service. 回答2: Merely extending a service class will not allow your service to expose its methods to outside entities. If you want your service to be