Hi Everyone,
I am developing an app which for sustainability purposes, needs to track when a person is driving in the same vehicle as another person. This way, the app can reward citizens that share their trip and reduce their carbon footprint.
I have been doing research about ways to make this technically posible but there are some limitations I can't seem to understand.
The idea is to make it very easy for the user so that the app could even work in a passive way without the user having to interact in any way. I have thought of using MotionActivity and BLE advertising and scanning so that the app can execute code either when another phone with my app is found nearby (BLE advertising and scanning would need to be continuously running) or when the user starts an automobile activity. It would then check that both conditions are met (at least there is one other user with the app installed nearby and the user is on an automobile).
If these conditions are met, the app would start recording an activity, which uses GPS to track the distance and route taken by the user, all this in the background.
I have read cases of developers building apps with similar functionalities but I can't seem to find answers as to the viability of this scenario.
If this wasn't posible, I would appreciate advice as to other ways to accomplish this with minimal (or none) user interaction.
Thanks in advance