Questions tagged [android-binder]

Android's lightweight remote procedure call mechanism designed for high performance when performing in-process and cross-process calls.

While the term "binder" is somewhat generic, its most popular namesake is the Android-specific interprocess communication mechanism and remote method invocation system. It forms the basis for many of Android's core services.

The official documentation is here, and there is a collection of in-depth information at this wiki.

218 questions
72
votes
6 answers

What are the IPC mechanisms available in the Android OS?

Will any one please tell me what are all the IPC mechanisms that are present in Android. To my knowledge are: Intents Binders
Suman
  • 4,021
  • 7
  • 41
  • 63
30
votes
3 answers

What are strong pointers and weak pointers

I am confused with the notion of "strong pointer" and "weak pointer". Diane Hackborn herself said that: The object will remain around while there are strong pointers; it is destroyed once the last one is released. All you can do with a weak …
Yukio Fukuzawa
  • 3,514
  • 6
  • 36
  • 58
28
votes
2 answers

Why NotificationManagerCompat::cancelAll() gets SecurityException?

Using NotificationManagerCompat to cancel all notification. NotificationManagerCompat manager = NotificationManagerCompat.from(ctx.getApplicationContext()); manager.cancelAll(); It got exception some time (most time works). on Andoid…
26
votes
1 answer

Send custom object using Android native Binder

I can only find examples for Java regarding Parcelable. My goal is to create a simple service and client in native C++ ( not NDK ), that will use Binder to receive and send serialized custom objects. MyClass + std::string + enum + int + bool
Cumatru
  • 635
  • 2
  • 11
  • 31
19
votes
2 answers

Android java binder FAILED BINDER TRANSACTION?

I am trying to download an image from service and display it in activity but I keep getting java binder FAILED BINDER TRANSACTION This is my service Code public class DownloadImageService extends Service { @Override public int…
WISHY
  • 7,590
  • 21
  • 75
  • 142
17
votes
4 answers

Advantages of using Binder for IPC in Android

What is the advantage of using Binder for IPC over (Semaphores , Message Queue, PIPES) in Android stack?
Jack Christy
  • 171
  • 1
  • 3
17
votes
2 answers

What is an Android Binder "Transaction?"

I'm getting an TransactionTooLargeException when sending messages between two Android processes running from a single APK. Each message only contains small amounts of data, much smaller than the 1 mb total (as specified in the docs). I created a…
Jason
  • 11,310
  • 13
  • 63
  • 115
17
votes
1 answer

Remote Service deny permission onBind

I have a remote service, which external applications can bind to. There are situations where I may wish to decline the binding. According to the documentation, Return the communication channel to the service. May return null if clients can not…
brandall
  • 5,724
  • 3
  • 42
  • 100
16
votes
2 answers

Android binder security

Is the interprocess communication provided by Binder in Android protected against man in the middle attacks? Is there any documentation that provides this info?
androidn00b
  • 161
  • 1
  • 4
14
votes
2 answers

What does the Binder class do? What is the meaning of binding in Android bound services?

I am totally confused with bound services. My questions are: What is the meaning of binding? What does the Binder class do? What is meant by "returns an IBinder for interacting with the service"? What is the IBinder object? How does the onBind()…
Mohit Gandhi
  • 155
  • 1
  • 5
14
votes
3 answers

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

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…
VinayChoudhary99
  • 756
  • 3
  • 12
  • 24
13
votes
1 answer

Transfer InputStream to another Service (across process boundaries) with ParcelFileDescriptor.createPipe() failes with "EBADF (Bad file number)"

I want to "send" an InputStream from one Android Service to another service running within a different process by using ParcelFileDescriptor.createPipe(), a stream-to-stream copy thread and a ParcelFileDescriptor, representing the read side of the…
Flow
  • 22,048
  • 13
  • 91
  • 147
10
votes
5 answers

How to listen to dev/binder?

In Android is dev/binder also for layers communication responsible. Is it possible to listen to messages? I know that they must be decoded than, but how can I get this messages. For example if an app send a message to became an Geolocation. I have…
Aprel
  • 1,009
  • 1
  • 14
  • 23
10
votes
1 answer

Bundle inside Intent from Native cpp application using Binder

I'm trying to call an intent from native cpp code. Basically, from what i've understand, i have to compose a Parcel to match the exact deserialization sequence from frameworks/base/core/java/android/app/ActivityManagerNative.java ; case…
Cumatru
  • 635
  • 2
  • 11
  • 31
9
votes
2 answers

Can an Android service provide two interfaces to communicate with?

I have a service that communicates through AIDL with other services. I want that service to be bound by activities in my application. Can the service define two binders\interfaces? I've tried yo use a messenger for communicating with the activities,…
lironda
  • 161
  • 2
  • 5
1
2 3
14 15