Developing two android apps and communicating between two

前端 未结 2 1611
无人共我
无人共我 2020-12-01 09:41

I am developing two applications names A and B.

Application A as activity named MainActivity, servic

相关标签:
2条回答
  • 2020-12-01 10:07

    You can't share methods and code segments between different applications, but you can use intents to send data bundles back and forth, check this similar question:

    android communication between two applications

    0 讨论(0)
  • 2020-12-01 10:09

    You cannot directly access methods of Activity in different app.

    Broadcast would work but if you want more control (i.e. invoke remote methods) consider binding to a remote service in the other app or use Messenger and handler to communicate.

    Here is a short tutorial on inter-app communication

    0 讨论(0)
提交回复
热议问题