Android Question Common Activity Area

Nitin Joshi

Active Member
Licensed User
Hi B4A team, My project is communicating with nodeMCU ESP8266 on WiFi network. My APP is on regular interval receiving UDP packets sent by ESP8266 to check device is live or not. I have a code for it and its working fine.
My APP includes several activities. In each activity module I have written same code to receive UDP packets coming from ESP8266.
My question is.....Is there any to place code in common module wherein I will receive UDP packets and all other activity modules will refer that common module? In this way, I will not have to write codes in each activity module.
 

Nitin Joshi

Active Member
Licensed User
Hi Erel, thanks. Can you share a sample code to know how an activity is referring starter service to check network? It will be great and appreciable from you.
 
Upvote 0
Top