News for hackers. Stuff that matters.
Re:Previewing Android P by ehsankia on Wednesday March 07, 2018 @04:56PM (#16540302)
I'm curious, does anyone have a list of apps that would have legitimate use of sensor data in the background?
Re:Previewing Android P by OkGoDoIt on Wednesday March 07, 2018 @10:09PM (#16541986)
1. Apps that track sensor data to determine sleep quality or other nonstandard movement calculation (and thus can't use alternative step counting API's)

2. I'm working on an app that constantly records audio in the background and later allows me to search for things I might have said throughout the day

3. Apps that track location long-term, like the defunct Moves app. Sure it kills the battery and is a major privacy concern so it should be opt-in, but I personally love this functionality and I'm sad there doesn't seem to be a modern equivalent (Google Maps location history is less accurate and there's no good API). Apps that record location short-term like MapMyRun do not solve the same problem.

... I'm sure there's other use cases. I kind of feel like the only developers allowed to really innovate on mobile anymore are Google (and Apple) themselves. Bad developers abusing privacy/battery/data have made it so Google/Apple have to lock down anything interesting. It's frustrating, because the current state of affairs is definitely better than the free-for-all it used to be, but I wish I had more control to override what my own device is able to do.

Re:Previewing Android P by jpab on Thursday March 08, 2018 @03:57AM (#16543229)
For #2, how do you avoid recording all the things people around you are saying throughout the day? Custom microphone to minimise picking up surrounding sounds? Some kind of speaker recognition to identify and isolate your own voice (does that work when you have a cold)?

And if you're not avoiding recording other people, how do you succinctly notify everyone in capture range that you are recording them?

This seems problematic from a standpoint of social norms and etiquette. In public/shared space contexts people know they can be heard by bystanders, but that is very different from being recorded and having your utterances indexed for later retrieval.

Re:Previewing Android P by on_and_off on Wednesday March 07, 2018 @11:09PM (#16542214)
Sounds like all these apps can use a foreground service to do that.

Am I missing something ?

The only case I see this change not covering is apps like Cerberus. They would need to ask their users to go to settings and hide their notification. Not the nicest UX, but that's a pretty rare use case.

Re:Previewing Android P by nl on Thursday March 08, 2018 @03:50AM (#16543206)
Define foreground/background.

If I’m using Strava and Spotify I don’t want either to stop working when I switch to the user interface of the other one.

Re:Previewing Android P by on_and_off on Thursday March 08, 2018 @04:06AM (#16543253)
A foreground service needs to display a notification.

Not really an issue for Spotify since media apps want to display the media notification anyway.

For other apps, the idea is that foreground services should be visible to the user. One of the reasons would be this very capability to access sensors.

Another difference between foreground and background is that a background service is eligible to be killed on low memory events.

Re:Previewing Android P by tdeck on Thursday March 08, 2018 @03:13AM (#16543079)
Isn't #2 likely to be illegal in many states?
Re:Previewing Android P by skav on Thursday March 08, 2018 @04:51AM (#16543405)
We are developing an app that does #3 (Smarter Time) and manage it with a foreground service. The constant notification is slightly annoying for some users, but overall it works well and does not use too much battery (after tons of tweaks and optimizations)
Re:Previewing Android P by sattoshi on Thursday March 08, 2018 @12:34AM (#16542531)
#2 sounds super interesting to me. Is it open source?
Re:Previewing Android P by OkGoDoIt on Friday March 09, 2018 @02:52PM (#16554434)
Well it's also my first foray into Android development since Google Glass years ago, so not much good source to share. Maybe someday if I get it in a state where it works and isn't too embarrassing, I may open source it.

Regardless it's encouraging to hear that other people find this interesting, most of the feedback has been along the lines of "that's so creepy/illegal"

Re:Previewing Android P by taneq on Thursday March 08, 2018 @01:02AM (#16542644)
#2 sounds brilliant, so many times I've wished I could Ctrl+F for things in conversations I had earlier in the day.
Re:Previewing Android P by jvolkman on Wednesday March 07, 2018 @04:58PM (#16540326)
What about a baby monitor app? Is the app considered backgrounded when the screen is off?
Re:Previewing Android P by 9034725985 on Wednesday March 07, 2018 @05:32PM (#16540599)
I was hoping we could use old phones as IP cameras with the screen turned off. I hope apps that are last in the foreground can continue to access camera and microphone and sensors with the screen turned off -- at least when connected to power.
Re:Previewing Android P by simlevesque on Wednesday March 07, 2018 @05:01PM (#16540352)
Fitness apps.
Re:Previewing Android P by AstralStorm on Thursday March 08, 2018 @08:26AM (#16544154)
Yup, these will now have to run a foreground service or be part of the platform.
Re:Previewing Android P by agildehaus on Wednesday March 07, 2018 @05:20PM (#16540506)
I recently wrote an Android Wear app for someone who wanted sensor data recorded in the background for legitimate medical research.

I would assume upgrading to P will break that app.

Re:Previewing Android P by dlhavema on Wednesday March 07, 2018 @08:32PM (#16541561)
Prolly not for wear apps. Those are all about biometric data collection...
Re:Previewing Android P by traek on Wednesday March 07, 2018 @05:29PM (#16540571)
Quantified self apps e.g. Human, Moves.
Re:Previewing Android P by Groxx on Wednesday March 07, 2018 @05:39PM (#16540651)
I personally enjoy exploring long-running GPS logs of myself. Interesting patterns, hotspots, etc.

(not sure if those two apps cover that in particular, but yeah - quantified self in any form is a perfect example)

Re:Previewing Android P by daveguy on Wednesday March 07, 2018 @07:11PM (#16541174)
A "Google Assistant" competitor.