Hello people!

Hello people!
I'm a novice as an Android developer and just want to ask - can I build an Android service under Delphi?
The service must be used not only from Delphi applications but also from Java developers. The goal...I want to send some commands to a device via bluetooth and of course to receive the answers of these commands. I ask here because Delphi is my favorite language and do not want to made it under Java or so on... languages or other IDE's.
Please - do not use my questions to start a discussion - just answer me if you want :) Any help, links, advises or books are welcome!

Comments

  1. as far as i know u can do this by creating an android service project. see embarcadero docwiki for instructions.

    ReplyDelete
  2. Just in case, you need to change the applications that uses Services to "JobScheduler", as in Android Oreo start to limit the services:

    "Background Service Limitations: While an app is idle, there are limits to its use of background services. This does not apply to foreground services, which are more noticeable to the user."

    developer.android.com - Background Execution Limits | Android Developers

    ReplyDelete
  3. Thanks but maybe I was not clear. For a clarification - any links except the official embarcadero docwiki. I started from there but I'm a novice and for me this documentation is not so clear. Not so full as I want. :)
    If I create a service in this way and with Delphi - this service will be available for an usage for every one android developer (which is the goal) or only from applications made with Emb. products?
    I know - probably my question is a little bit stupid but I really start to learn today. Programming for Android is... different?
    My first Windows dll was made with Delphi (15 years ago) and I had some compatibility problems. Easy to fix but must to know. So... I ask.
    :)

    ReplyDelete
  4. Delve into Intents. That sounds like what you need. https://stackoverflow.com/questions/15524280/service-vs-intentservice Other developers can call your Intent to perform an action. Android Service is just like a Windows Service really. developer.android.com - Services overview | Android Developers

    ReplyDelete

Post a Comment