aidl

RxJava and Cached Data

大城市里の小女人 提交于 2019-12-29 10:38:02
问题 I'm still fairly new to RxJava and I'm using it in an Android application. I've read a metric ton on the subject but still feel like I'm missing something. I have the following scenario: I have data stored in the system which is accessed via various service connections (AIDL) and I need to retrieve data from this system (1-n number of async calls can happen). Rx has helped me a ton in simplifying this code. However, this entire process tends to take a few seconds (upwards of 5 seconds+)

RxJava and Cached Data

梦想的初衷 提交于 2019-12-29 10:37:40
问题 I'm still fairly new to RxJava and I'm using it in an Android application. I've read a metric ton on the subject but still feel like I'm missing something. I have the following scenario: I have data stored in the system which is accessed via various service connections (AIDL) and I need to retrieve data from this system (1-n number of async calls can happen). Rx has helped me a ton in simplifying this code. However, this entire process tends to take a few seconds (upwards of 5 seconds+)

Aidl not found error while using buildozer android -v debug

狂风中的少年 提交于 2019-12-25 02:57:19
问题 I'm trying to create an android apk file that I can run on my phone using buildozer and kivy. Unfortunately, whenever I run the command buildozer -v android debug , the command prompt returns the error Aidl not found, please install it . I've already tried to simply do sudo apt-get aidl followed by sudo apt-get update , but that still results in the same error. Also, I'm not sure if this is relevant to the issue, but when I open up the file explorer on the ubuntu 16.04 virtual machine, there

AIDL - Calling BindService on dynamic intent returns null Binder

混江龙づ霸主 提交于 2019-12-25 02:19:58
问题 I have a set of applications I've created. One of these applications is an Activity that basically a "home screen", and the other applications all contain a bunch of services I've created. In the main application Activity, I have a ListView that uses an ArrayAdapter that I am using to display a list of the class and package names of custom services I've created that are installed on the phone. Each of the displayed services are hosted in a different application, but all of these services

Retrieving Java package name of AIDL consumer

狂风中的少年 提交于 2019-12-24 14:18:41
问题 I am exposing some API through AIDL mechanism. Clients need to bind to the AIDL and call methods synchronously. Is there a way I can retrieve the client's Java package name? For example, if I expose a method boolean isFooAvailable() as AIDL API, from within the implementation of isFooAvalable, can I determine the Java package name of the app that binds to the AIDL service? 回答1: Yes, you can find out the package name from within the implementation as follows : IAidl.Stub mBinder = new IAidl

AIDL service from different Projects

邮差的信 提交于 2019-12-24 06:58:28
问题 I have 2 * different projects* within the same workspace in eclipse (most AIDL examples handle different processes within the same project). Project A is simply HelloWorld, that just displays the sum of 2 numbers. I'm calling this remotely from a client called MyFirstApp to display it. Problem: The onServiceConnected() method is never invoked. What I've tried so far: 1) Manifest file has android:process=":remote"> tag. Intent filter is present. AND YES, ALL OF IT IS WITHIN THE application tag

Networkonmainthread exception while executing httprequest in a bound service from another service via aidl

余生长醉 提交于 2019-12-23 18:32:09
问题 I have a service which binds another service via aidl.The bound service executes a httprequest and returns a response when the method is invoked from callign service via aidl. I am getting Networkonmainthread exception while doing this. Usage of Asynctask failed here for webservice query.Any help is appreciated :) 来源: https://stackoverflow.com/questions/6622101/networkonmainthread-exception-while-executing-httprequest-in-a-bound-service-fro

Recommended approach for handling errors across process using AIDL (Android)

僤鯓⒐⒋嵵緔 提交于 2019-12-22 17:09:04
问题 I have a binder service and a client that live in different processes. Using AIDL, when the client calls into my remote binder service, there are times that I need to relay an error (exception) back to the client. However, from my understanding, this is not possible. I tried throwing a "RemoteException" from my binder service to see what will happen, and I get Uncaught remote exception! (Exceptions are not yet supported across processes.) in my logcat. Since it looks like this is not possible

Android组件体系之Service解析

末鹿安然 提交于 2019-12-20 11:38:38
一、调用方式 1、启动服务 只启动一个服务,不进行通信,包括startService、startForegroundService两种调用方式。第二种方式适用于后台应用启动前台服务,在启动后的10s内(具体时间由ActiveServices.SERVICE_START_FOREGROUND_TIMEOUT定义),需要Service调用startForeground启动一个Notification,不然会出现ANR。 整个启动流程基于ActivityManagerProxy、ActiveServices、AMS以及ActivityThread完成,两种调用方式对应的流程主要是ContextImpl.startServiceCommon方法的requireForeground参数不同。 停止服务使用stopService方法,服务被停止的时候,系统自动回调onDestory,注意服务只会被停止一次。 调用startService之后,Service组件的生命周期:onCreate -> onStartCommand-> onDestory。 如果服务已经启动,startService方法不会重复执行 onCreate,而是执行onStartCommand(该函数会调用onStart,保持兼容)。 2、绑定服务 具体通过bindService调用完成,其特点是可以与服务端通信

AIDL files not building in Eclipse in random projects?

∥☆過路亽.° 提交于 2019-12-20 07:05:10
问题 I've got some AIDL files which I want to include in a project, however Eclipse seems to work differently on different projects. I'm developing an SDK for an application, and in the SDK android project the AIDL file generates the correct .java file, but in the main application Eclipse is not even attempting to build it. Update: I found a log file and it says this: !ENTRY com.android.ide.eclipse.adt 4 0 2012-04-21 19:22:11.043 !MESSAGE Failed to run one of the source processor !STACK 0 java