Developing two android apps and communicating between two

前端 未结 2 1615
无人共我
无人共我 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: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

提交回复
热议问题