How to send data through intent in android without opening another activity?

后端 未结 4 896
夕颜
夕颜 2020-12-16 21:40

here is my code for sending data by intent but i don\'t want open another activity i just want to send the data without opening it..

Bundle contain = new Bun         


        
4条回答
  •  情话喂你
    2020-12-16 22:18

    You can try EventBus or Otto Android libraries to communicate between activities, services and fragments..

    So you should create a Service to pass data and for communication between activities, fragments etc use an event bus

提交回复
热议问题