Is there an API for Android that will find other people nearby running the same app? For instance, if you were to perform a "scan" it tries to find other people running the same app nearby. Would it be possible to perform the same task across multiple OS (Android, iPhone, Windows, etc.)?
Or would the best way be to just have the app communicate to a server your location and have a server-side app that pushes a list of others nearby???
My goal is to find an easy way to eventually transmit data between two devices contigent on those that are nearby.
It seems to me that the second option is the best. The other route to go might be to look into the Android's Bluetooth API as continually updating your location with a remote server is costly from a battery standpoint.
Related
I'm developing a mobile app that uses WiFi without internet connection (in order to communicate to an IOT device) and it uses cellular data as well (see TL;DR section for more).
The problem -> some devices don't automatically switch their default route to cellular (rmnet interface) while others are capable.
The workaround -> create a *"local" VPN in order to manage and re-routing network traffic via cellular interface (there are apps like Speedify that can do this by assigning priority to interfaces)
The question -> there is a simple way to accomplish this or it's pretty tricky? When I say "simple" I mean the calls of several well documented API and when I say "tricky" I mean to starting read and parse routing table with customized rules depending on every vendors?
"*local" = a VPN without web server or VPN gateway because I'm not actually interested to do the VPN's job (I seem to have understood that I need a VPN level to manage network traffic of others app but I'm pretty newbie of VPN topic)
TL;DR
My goal is to remaining connected to my access point (in order to call its APIs) AND use cellular data for all others requests I.e: login via my backend, use Google Maps and so on.
Handle this scenario it's quite easy because combining network objects, socketFactory and bindProcessToNetwork I'm able to do this.
Troubles come for others app like YouTube, WhatsApp that stop working because as default network they are using my access point without internet (Android doesn't switch default interface to a cellular)
I'm going crazy because seems that each vendor (or Android OS version?) handles "WiFi without connectivity" with cellular active in a different way.
There are certain devices that all work fine (similar to iOS) but there are others that it's a nightmare.
See this question for further details
Thanks for reading, I really love Android but those issues make me sadder every day more and I'm thinking to pass to the Dark Side of mobile development (iOS).
You've the chance to change my mind ;)
I'm actually working for a startup I'm building with two other founders. On the side I would like to develop a quick prototype to be able to deepdive into a subject I can use on my project : beacons.
Here is what I want to achieve : I want to be able to use a device as an emitter (using bluetooth, BLE, or wifi) and the other one to be able to know when it enters the first one range. I need that to be able to do indoor localization (just a check in system, not to know exactly where people are in that specific location).
I'm used to code mobile application with Ionic and I'm more a Javascript developer. I saw that there is already something which fit to my needs : Dazting which transform every device mobile as "a beacon" with either bluetooth or Wifi. Problem, I want to do it on my own but to be honest I don't really now how they manage to do that with Wifi. I know that there are some libraries to emit with BLE but what about bluetooth ?
Does it mean I'll have to code it with native code ?
This is what I want to achieve :
Coding an hybrid app (will loose less time and one app for every
platform)
Transforming the mobile device into an emitter : with bluetooth or
wifi
Be able to know the distance between a device which will emit and a
one that will receive the signal
I don't want to go with beacons : I'm not going to use macro-location and buying beacons for my project at the start is not something we would like to do.
Any ideas or suggestions on how did Datzing manage to reach that goal ?
Thanks in advance.
Datzing relies on emission of Bluetooth Classic, Bluetooth LE and WiFi packets from a mobile device that is made discoverable, either programmatically or through manual selection in settings. The unique MAC address or SSID of the device can then be used to tie the detected transmission to a registered "Beacon" on the Datzing system. Basically it just registers the unique identifier associated with a Bluetooth or WiFi transmission with the Datzing servers so they can have meaning.
Using this technology to transmit on an iOS device is severely limited due to operating system restrictions. Users essentially have to manually go to settings screens to start the emissions. Android devices are much more flexible if you have a native app granted the proper permissions.
On the detection side, iOS is also much more limited than Android due to the operating system blocking access to raw MAC addresses of bluetooth devices and preventing detecting SSIDs of WiFi access points unless the network is connected. As of Android 6.0, access to the raw MAC address is also restricted, making such a system work less well with Bluetooth on newer Android devices.
On both platforms, iOS and Android, the ability to use these techniques to the extent they are allowed by the operating system are possible with native code. Doing so with Ionic or Cordova would require cobbling together a number of plugins (if they even exist) to bridge to the native features to access WiFi SSIDs and do Bluetooth discovery and scanning. This is unlikely to be a quick protoype.
Word of caution: It is always a good idea to try out a system like Datzing before trying to reproduce it yourself, as limitations often cause technologies not to live up to the claims of the marketing materials.
I'd like to automatically import my activities from my Garmin Fenix3 into a database (without the need to manually download the TCX files). Two options came to my mind to solve this task:
A Server based app which gets connected to the Garmin Connect API and is notified (via RESTful APIs) by GarminConnect each time an activity has been uploaded - is my understanding correct, that I need for this use case the $5,000 expensive Garmin API licence?? http://developer.garmin.com/garmin-connect-api/overview/
Create an Android App which gets notified by the installed Garmin Android Connect App each time a new activity has been created - how can I achieve this? From my understanding, the Connect IQ Mobile SDK For Android can be used to create an Android App which interacts with your own application on the Garmin Device itself (which is not needed for my scenario, I just want to automatically "download" the activities created by the default Fenix3 apps).
Any help is highly appreciated - thanks.
I can answer now my own question. It is NOT possible to access the recorded data automatically unless you pay the $5,000 for the Garmin API licence (this is soooo ridiculous Garmin!!!). The Connect IQ Mobile SDK approach will NOT do this job, confirmed by the Garmin Support Team.
The only way to get your data is by manually downloading the FIT or TCX file from https://connect.garmin.com . Keep in mind though that the Running Dynamics (which are captured and calculated by the HRM-Run sensor) are NOT included in these files!
Vertical Oscillation
Vertical Ratio
Left/Right Balance
Avg Ground Contact Time
Training Effect
This is a very big disappointment Garmin! In which century are you guys still living? The data generated by the user belongs to the user and it should be easy accessible! Keeping the data locked in your safe will not really attract more users to the connect platform... But time will tell.
This question follows on from Unity3D -- Send message to other mobile phones in the same vicinity
However, I made mistake of restricting to Unity3D.
So I would like to re-ask the question without that constraint.
Let us say we have 20 mobile phone users in a cave (so no Wi-Fi networks / isGPS)
One user hits a button, and every other user's screen flashes, (within a few milliseconds)
How to accomplish this?
What if everyone is using an iPhone?
What if there is a mix of iPhone and android users?
Finally, is there any solution that would cover a wider range of phones?
You should have some network so that mobiles can share some data. Bluetooth can have maximum of 10 m distance coverage (depends upon devices though). Since, all mobile are running same app they should be linked to a network and communicate. Please Check:
http://developer.android.com/samples/BluetoothLeGatt/index.html
You can create one device as server and communicate among other devices.
https://github.com/polyclef/BluetoothChatMulti
If you have installed the app on all of the devices then in all probability yes, if the device supports push (pretty much any smartphone) then you can use the push service to synchronize the devices based on geofencing (ie, 10m from my location), there are some other discovery routes you could try to (without using the B word) pinging other devices
the app would need to be able to provide some sort of server service if it was to create its own private network based on the IP addresses of the devices it found nearby, as those devices would have to connect to that phone acting as a server. the network interface shouldn't be important, but connecting the satellite devices to the server should be. You could try doing it based on which device can provide data services, aka hotspot. You can easily connect devices to networks programmatically.
at that point your faced with the classic client server problem. There is going to be a huge amount of work to get devices configured, network creation, client server infrastructure if it has to be done without data, packet optimization. Very expensive and very high risk depending on how many restrictions there are.
Search for How to make a html5 group chat and then build on that example.
Possibly send commands to the chat delimited by a / character where a javascript could then execute the command.
Good Luck with your design.
Danny117
I am seeking some architecture advice within the mobile space. I am wondering what people are today within their applications, say for the iOS, Android, WP7 devices, in terms of web services and instances for caching data when disconnected?
Many of our applications need to work offline due to having limited connectivity, so data storage/caching, synchronization, etc. is critical.
Any and all advice will be greatly appreciated.
If your apps need to work in a limited connectivity enviornment just store everything you need in a database, and have a synchronize option so the user can decide when he has connectivity to update everything or send data back to the server.
Another option would be to have the app monitor for connectivity, and when it is being used and a network is available have it automatically work in online mode and when no network is available in offline mode.
Depending on the level of "limited connectivity" I would just go for the full offline option and let the user synchronize. I develop apps that are used in many remote areas of south america and the full offline option is just better. I used to have issues with intermitent connectivity in border areas where the network would jump between available and unavailable and it made a mess in data transmition.
I can't speak for iOS and Android, but for my WP7 app I store data offline in isolated storage. My app essentially works in disconnected mode so everything is stored offline and at certain events e.g. saving a task the app checks to see if it has a mobile connection and if so synchronizes with the back-end.