android-binder

android native binder crash while server send msg to client

放肆的年华 提交于 2021-01-29 08:28:31
问题 I have suffered from this bug for days. Help me, if you know anything that may help. I use the camera framework to get my hardware work. Most of the time, it works properly. Howerver, sometimes the binder kill my server's main thread because that condition "bwr.write_consumed < mOut.dataSize()" meets as below. This happens when client call the server and server do something,then returned because user input is needed to finish the task. Then after all work is done, server will send a msg to

Android ipc LocalSocket vs Binder (AIDL)

谁都会走 提交于 2021-01-21 08:20:11
问题 I want every app to be able to send data to my service. Therefore I need inter process communication. Every page I can find proposes to use Messenger, AIDL or Intents (BroadcastReceiver). So far what I could figure out by building some test apps is that BroadcastReceiver is extremely slow and messages can get lost without notification if sending with multiple threads inside while(true) loop. AIDL and Messenger are not only complicated to implement (service is needed, binder,...) but can

Latest Android NDK (r21c)'s libbinder_ndk is missing several exported APIs

▼魔方 西西 提交于 2020-06-29 04:36:47
问题 I am interested in using the AServiceManager_get/addService() APIs that are made available via the NDK implementation of binder, libbinder_ndk . The sources for this can be found here for 10.0.0r30 - API29, and in your AOSP tree at: $SDK/frameworks/native/libs/binder/ndk/ However, the libbinder_ndk.so bundled with the latest r21c NDK does not have all of these APIs exported. Many are, but the get/add services endpoints are not available. The libbinder_ndk.so for API29 can be found at: $NDK

How can one use Binder (mybinder.org) with private Github repositories?

匆匆过客 提交于 2020-03-17 11:24:30
问题 After reviewing this exact issue (https://github.com/jupyterhub/binderhub/issues/237) it seems that the functionality for this has been implemented with this merged pull request (https://github.com/jupyterhub/binderhub/pull/671). However I can not seem to find guidance in the docs or elsewhere which explains what should go into the secrets.yml file or if there are other steps required in order to use Binder with private Github repos (Apologies if I have missed the obvious -- complete Binder

How to make myBinder.org launch directly into Appmode

[亡魂溺海] 提交于 2020-03-05 07:38:07
问题 I've made a simple app in jupyter notebook and I'm trying to make a shareable link directly into the app using mybinder.org. However, my link takes the user to the notebook and then the user has to manually press the appmode button at the top to switch to appmode. I have seen examples of binders that directly take the user into the Appmode instead of the notebook. How can I make mine do the same? Example of link that takes you directly to app: https://mybinder.org/v2/gh/oschuett/appmode

How can a remote Service send messages to a bound Activity?

房东的猫 提交于 2020-01-31 08:54:01
问题 I've read the documentation about Bound Services, where it is shown that you can easily communicate through Messages from an Activity to a remote (i.e. not in the same context) Service but is there any way to send messages from the Service to the bound Activity ? For example, my activity bounds to a running background service of the same application, sends a message to it and upon the reception of this message the service replies with a message to the activity.. how do I implement this? Can

How can a remote Service send messages to a bound Activity?

痴心易碎 提交于 2020-01-31 08:51:06
问题 I've read the documentation about Bound Services, where it is shown that you can easily communicate through Messages from an Activity to a remote (i.e. not in the same context) Service but is there any way to send messages from the Service to the bound Activity ? For example, my activity bounds to a running background service of the same application, sends a message to it and upon the reception of this message the service replies with a message to the activity.. how do I implement this? Can

Rapid IPC with Messengers or AIDL

我的未来我决定 提交于 2020-01-10 02:59:11
问题 I'm attempting to create a program in Android which communicates rapidly with a remote service (~40,000/sec), however all Android IPC seems to fall short of being able to accomplish this task. My first attempt involved a standard Messenger system which was unable to do more then ~2,000/second and equally bad was that it seemed punctuated with intermittent lag. MainActivity (Test with Messengers) public class MainActivity extends Activity implements ServiceConnection{ Messenger

Binder preventing garbage collection

回眸只為那壹抹淺笑 提交于 2019-12-30 05:05:51
问题 I think I tracked down a memory leak and want to confirm what I think may true about how Android's Binder is implemented. In this case I have a Service and an Activity, each in their own process. I created an AIDL that allows me to pass a Callback object from the Activity to the Service through an ipc method and then have the callback called when the Service is done with the requested task. For a long time I was wondering: if I pass a new Callback object to the Service and I don't keep a

How to Create a android native service and use binder to communicate with it?

此生再无相见时 提交于 2019-12-29 18:02:52
问题 My basic task is to create a native service in android and then write a simple native program to test it. lets say I want to write a simple service which return me sum of two integers. I have to use binders to talk to it from the program, I have tried to google around but I can't find a precise example. I need to know how to create a native service and find it in the program and if needed in Java also. 回答1: If you're creating a normal Android application using the NDK, you can't use Binder