eselk
eselk

Reputation: 6884

Record screen with Android SDK?

I don't want code, just need help finding where to start this project. I need to write an app that runs in the background on Adroid OS and takes a screenshot at a set interval and saves them to a file or database. So far I've only used the Java SDK, but I think I might need to do stuff in C for this project, because:

  1. I don't see a way in Java to work directly with the canvas/screen of other activitys? Since each activity has its own memory and everything is kept pretty separate for security reasons, I think I need to go at a lower level?

  2. Ideally a parent could install this app on their child's phone and it wouldn't be trivial for them to disable it or uninstall without the parent noticing. This could get tricky, and I can think of out-of-box solutions if needed, but hoping at the lower C level there might be something to help with this.

  3. If I do need to go with the C level SDK, are there going to be restrictions for distribution/install that get tricky? For example, does stuff like this require agreements with OEMs to have our software pre-installed.

...I imagine anti-virus software might be in a similar category as what my app needs to do, but unfortunately spy-ware and viruses probably also do similar things, so then that becomes an issue, even though this would be a very legit app.

Upvotes: 0

Views: 522

Answers (2)

CommonsWare
CommonsWare

Reputation: 1007286

What you want is not possible, except on rooted devices.

Upvotes: 0

FoamyGuy
FoamyGuy

Reputation: 46856

I don't know much about the actual screen capture itself but I can help with some of your questions.

Ideally a parent could install this app on their child's phone and it wouldn't be trivial for them to disable it or uninstall without the parent noticing. This could get tricky, and I can think of out-of-box solutions if needed, but hoping at the lower C level there might be something to help with this.

If your apk is in the system/app folder then it can't be uninstalled via the manage applications settings screen. In order to get it into that folder you'd need a rooted device. However since the device is rooted and thus can get r/w access to system, uninstalling your application is not really any harder, it is just a different process. To uninstall you'd just have to open up root explorer and manually delete the apk file.

If I do need to go with the C level SDK, are there going to be restrictions for distribution/install that get tricky? For example, does stuff like this require agreements with OEMs to have our software pre-installed.

In order to get anywhere close to the functionality you are after (making it harder to disable/uninstall yourself) you will either be doing something within the public APIs that is not likely meant to exist, so it would likely get fixed and break your app eventually(I am not saying that there is a way to do it with the public APIs, just if there were). Or you'll be stuck with your application only working on a rooted device, or a device upon which you created your own copy of the OS.

Upvotes: 2

Related Questions