So I'm working on a Ride Hailing app and my current feature requirement is: Alert the driver to press "Start" when he picks up the customer and goes en-route. Some of the drivers forget to start the trip and their wage calculation is inaccurate because of that.
So I was wondering should I use GeoFencing or ActivityRecognitionAPI transitioning feature for this?
Also, I see a lot of driver apps on the Playstore using this permission and I wonder how I can use this API to improve the experience of the drivers on my app. What other features or enhancements can be made using ActivityRecognitionAPI.
Thanks
Related
Imagine I am building an app, let's say a pizza delivery app.
User Story: As a user, I want to track the movement of the delivery person against the map so that I can be ready to meet them when they are nearby
Let's say this app is already built, now I just need to test it. Obviously, telling my friend to install a driver's app and drive around so that I can see how well geofencing works is not the best approach here.
Are there any testing tools that allow me to simulate movement against google maps so that when I have a customer's app open I can test how well the live tracking of my driver works?
I tried googling it but didn't find anything, so what would you ladies and gentlemen use to simulate the movement to test the application?
Thank you in advance.
Are there any testing tools that allow me to simulate movement against google maps
Of course, there are. For Android, there is an app called Lockito. You can actually simulate the movement over a Google Map between two points.
This is a general query that I have because I have seen contrasting posts about the ways people have implemented it.
My use case is that I want my Android device to connect to iBeacon whenever it is in range, and start a particular app.
How do I go about it? I am not looking for code, in particular, a general direction of how to go about it would be good.
Here's what you can do:
You can program an app to auto-launch itself when a beacon is detected. If this app is already installed on an Android device, it can send a notification or simply appear when the beacon is seen. The free and open source Android Beacon Library has tools that let you do this. See here
Here's what you cannot do:
If you do not have a custom app installed on a phone, then you can not make the phone do anything to respond to a beacon. Once upon a time, it was possible on many phones with Google Play Services to make a beacon detection prompt a user to install your app. Google, however, discontinued this feature of their Nearby service in December 2018.
I m going to explain simply what I want to do, and I will appreciate for your recommendation. I want to put a small gps sticker on my kid and develop an app in order to track him in real time, if he is going to school or not.
Is there any gps device (sticker) like that, if so can this device send its position simultaneously to my app.
Is there any tutorial that can help me to develop an app like this
There are GPS devices available in market for spying. You don't have to develop an app as They will also provide an app. checkout on of the link
http://www.cheatersspyshop.com/gps-trackers.html
or simply search spy GPS on google you will find a list of devices.
I have seen many solutions to check if our own app is minimized,running or background.but is there a way to check if another app package is running or minimized so that based on that we can run a code.like an app-locker.Here we need to turn off network for a certain apps according to the user selection on installed apps in device, so when that selected apps are on foreground, network should be disabled when the selected apps are closed or minimized.then enable the network.
Will it be compliant with Google play if we make such an app? because somewhere i read they don't allow apps that interfere with other apps.so confused.
TL;DR: Google doesn't want you to do this, and you shouldn't try.
The old hack that relied on ActivityManager#getRecentTasks() to find out which app is in the foreground was disabled starting in Android 5.0.
App lockers that work on Lollipop are using a new hack involving ActivityManager#getRunningAppProcesses(). How it works is described in this answer. This hack is reportedly broken on Android M.
There's a new UsageStats API from which you might be able to glean a bit of info, but it requires a permission that can only be granted by a system activity. It's documented that this system activity may not be present on all devices. Samsung and LG are among the manufacturers that have reportedly removed this activity from their Lollipop devices, so only system apps will ever be able to use UsageStats.
The bottom line is that Google has shown their commitment to preventing what you're trying to do. Even if you find a temporary solution, you can bet that it will stop working in a future Android version. Eventually, Google will close all the loopholes and your app will be permanently broken. So it's probably a waste of time to write a new app that depends on this capability.
I'm researching ways on how to do activity recognition using an android smartwatch. Currently, I'm focusing on detecting whether the user is walking or standing still. My first idea was to use the built in step counter, but then I came across the Android Activity Recognition API (I'm relatively new to Android^^) which seems to be used in mobile apps only.
I'm now stucking at answering the following questions:
Is the current API already making use of a connected wearable device?
(e.g. automatically accessing built-in wearable sensors)
Is there a seperate API available for Android Wear?
Is there any other best practice on how to use wearables for activity recognition? (especially walking and standing still)
During my research I've already tried the following things:
Reading through the Android Activity Recognition Guide
Reading through this article about Google's Activity Recognition API
Implementing a simple Android Wear App which uses the current Activity Recognition API. I tested the app on my LG G Watch without success. It seems like I can connect to the ActivityRecognitionClient but I never receive any activity updates. I tried the same code on my Nexus 5 - everything works fine.
Reading through this post about Google Play Services. Here the author is like "...We like the Activity Recognition API for Android Wear, as we’ve always thought the location tracking technology was a great backbone for this type of functionality...". So according to this, there is a seperate API, right?
I would be very thankful for any helpful information from you guys. In my opinion, a cool thing (see first question) would be to automatically detect a connected wearable device and use its sensors for enhancing the accurancy when the mobile phone is unsure about the current user's activity.
You ask
Is the current API already making use of a connected wearable device?
(e.g. automatically accessing built-in wearable sensors)
No, and this would not make sense would it? The wearable and handheld device is not always carried at the same time; the watch can be moving, and the handheld still. (vice versa) I am not sure what the value of a combined measurement would be.
Is there a seperate API available for Android Wear?
Yes. google provide a different Google Play Services library or wearables you see this in the compile dependencies;
compile'com.google.android.gms:play-services-wearable:6.5.87'
vs
compile 'com.google.android.gms:play-services:6.5.87'
So, when you tested the API in your first Moto360 app, you actually imported the play services libraries meant for handhelds instead of the wearable version. The constant "ActivityRecognition.API" is not included in the wearable version of the client API.
Is there any other best practice on how to use wearables for activity
recognition? (especially walking and standing still)
One way would be to use the raw accelerometer data to detect motion. It is fairly easy to detect that the device is not moving at all, to detect anything else is not trivial.
You could push sensor data from the wearable to the handheld for processing there if you like. Ping me if you'd like some code showing just that. I don't want to post it since it is not relevant to the question.
My guess is that Google will include this API on the handheld device in the future. Spending a lot of time "rolling your own" might be a risk...
Unfortunately, the activity recognition API is not yet implemented on Wear devices. When I tested a simple ActivityRecognitionClient API example program on my Motorola Moto 360 (with "4.4W 2"), I got a message indicating that on the logcat stream.