A apty Active Member Licensed User Longtime User May 12, 2014 #1 I have an app (let's say app A) developed and installed on an android phone. I have another android phone and i want to develop a second app that controls the first app (app A). How can i achieve this?
I have an app (let's say app A) developed and installed on an android phone. I have another android phone and i want to develop a second app that controls the first app (app A). How can i achieve this?
Erel B4X founder Staff member Licensed User Longtime User May 12, 2014 #2 There are several ways. One solution is to use the Network library to open a port in one app and then connect to this port from another app. Now you can use AsyncStreams (in prefix mode) to communicate between the two apps. You can also communicate over a UDP port or with intents. Upvote 0
There are several ways. One solution is to use the Network library to open a port in one app and then connect to this port from another app. Now you can use AsyncStreams (in prefix mode) to communicate between the two apps. You can also communicate over a UDP port or with intents.
A apty Active Member Licensed User Longtime User May 12, 2014 #3 Thanks Erel.. is there any tutorial that can help? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 12, 2014 #4 There are many examples and tutorials that use AsyncStreams: http://www.b4x.com/android/forum/pages/results/?query=asyncstreams&page=1&prefix=0 You need to use 127.0.0.1 as the host. Upvote 0
There are many examples and tutorials that use AsyncStreams: http://www.b4x.com/android/forum/pages/results/?query=asyncstreams&page=1&prefix=0 You need to use 127.0.0.1 as the host.
A apty Active Member Licensed User Longtime User May 12, 2014 #5 127.0.0.1 is localhost...One of my device is on the field(in a different area) with data connection. Will it work if i substitute the local ip with public ip of the device? Also how can i handle it if the ip is dynamic? Upvote 0
127.0.0.1 is localhost...One of my device is on the field(in a different area) with data connection. Will it work if i substitute the local ip with public ip of the device? Also how can i handle it if the ip is dynamic?
Erel B4X founder Staff member Licensed User Longtime User May 12, 2014 #6 Sorry I thought that you want to communicate between two apps on the same device. You can use Bluetooth or Wifi to communicate between two devices. Are the devices connected to the same local network? You cannot connect two devices directly over a data connection. You will need to use an online server as a middleman. Upvote 0
Sorry I thought that you want to communicate between two apps on the same device. You can use Bluetooth or Wifi to communicate between two devices. Are the devices connected to the same local network? You cannot connect two devices directly over a data connection. You will need to use an online server as a middleman.
A apty Active Member Licensed User Longtime User May 12, 2014 #7 It is not a local network..it is over the internet. I have an online server, but how do i make the devices communicate? Upvote 0
It is not a local network..it is over the internet. I have an online server, but how do i make the devices communicate?
Erel B4X founder Staff member Licensed User Longtime User May 12, 2014 #8 Check this B4J example: Custom WebSocket Based Push Framework It implements a push solution. You can use such a solution to communicate between devices over the internet. Upvote 0
Check this B4J example: Custom WebSocket Based Push Framework It implements a push solution. You can use such a solution to communicate between devices over the internet.