Android Question Can I use a Bound Service from B4A?

ranul

Member
Licensed User
Longtime User
Hi,

I'm new to B4A.

I have this Proprietary Android Library that I need to use and I would like to know if it is possible to use it from B4A, or maybe a wrapper is needed, or maybe it is not possible at all.

This library is a bound service and my Android application will need to bind with that service.

The start of the library documentation looks like that:

Binding steps:
1. Declare an instance of the MyService interface.
2. Implement ServiceConnection.
3. In your implementation of onServiceConnected(), you will receive an IBinder instance (called
service). Cast the returned parameter to LocalBinder type and get MyService instance with
getService().
4. To connect, call Context.bindService(), passing in your ServiceConnection implementation.
5. Call the methods defined on IMyService interface.
6. To disconnect, call Context.unbindService() with the instance of your interface.


Does it look possible to use with B4A?

Thanks.
Ranul
 

ranul

Member
Licensed User
Longtime User
Yes, it is possible. You can create a library that implements all this stuff.
Just to make things clear, do you mean that I must need a wrapper (in JAVA) or is it possible to do everything just with B4A?

Thanks,
Ranul
 
Upvote 0
Top