aaronk Well-Known Member Licensed User Longtime User Oct 6, 2012 #1 Hello, I hope someone can help me out.. I am connecting to a TCP device using the Network Tutorial (http://www.b4x.com/forum/basic4android-getting-started-tutorials/7001-android-network-tutorial.html) It works fine but I want the app to run in the background and when it gets a a message lets say '123' to open the app up or even just play a sound. Not sure if it can also be done where if the app closes allow a service to connect to the TCP device and wait for this command. Is anyone able to help?
Hello, I hope someone can help me out.. I am connecting to a TCP device using the Network Tutorial (http://www.b4x.com/forum/basic4android-getting-started-tutorials/7001-android-network-tutorial.html) It works fine but I want the app to run in the background and when it gets a a message lets say '123' to open the app up or even just play a sound. Not sure if it can also be done where if the app closes allow a service to connect to the TCP device and wait for this command. Is anyone able to help?
aaronk Well-Known Member Licensed User Longtime User Oct 6, 2012 #2 Hello, I have now got it working by using the same network Tutorial but loading a connection in a service module. Now it seems to work when the app is close, as its now running as a service. (which means I now have 2 connections to the same device.) Does anyone know how to make it wake the device up or if the device is active make it load my app up using a service? Upvote 0
Hello, I have now got it working by using the same network Tutorial but loading a connection in a service module. Now it seems to work when the app is close, as its now running as a service. (which means I now have 2 connections to the same device.) Does anyone know how to make it wake the device up or if the device is active make it load my app up using a service?
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2012 #3 The wireless will be turned off when the device sleeps. You will need to acquire a partial lock with PhoneWakeState. However this will prevent the device from sleeping. Upvote 0
The wireless will be turned off when the device sleeps. You will need to acquire a partial lock with PhoneWakeState. However this will prevent the device from sleeping.
aaronk Well-Known Member Licensed User Longtime User Oct 9, 2012 #4 Thanks. I will give it a go. Upvote 0