How to built a Android Single App Mode - android

I want to use a Android Phone as a controlling unit for one of my projects.
In this the Smartphone is fixed on the hardware.
Tasks for the smartphone are:
Communication via Bluetooth
Handling User Input (e.g. PIN-Entry)
Turning on/off vibration, led ,...
So I wrote a App which does all the things I want.
Now I want that the Smartphone can only be used for this application.
Maybe you can give me some Ideas how to manage this.
I heard about 'kiosk-mode', could this be a solution.
Another option would be a custom ROM or is it possible to get a 'basic-android' without a launcher an just one single app.
I just want some ideas and usefull suggestions from you:)

If you are using Android version "L" there is a way to do that. It is called Task Locking, however it needs root access.
There is a lot of tutorials on this site. I just don't want to copy-paste it.

Take a look here: http://www.sureshjoshi.com/mobile/android-kiosk-mode-without-root/
Pretty good article about task locking and device ownership. And unlike Evgeniy said, root is not needed.

Related

Adding Bluetooth Low Energy to android app with Kotlin

So, I've created an app and I want to be able to Add bluetooth devices to it (BLE or not). After I've added them, i want to display them in a different activity. I've looked for lots of tutorials(Stackoverflow and others) but couldnt find something specific.
I am a beginner and i used Kotlin to create the app.
Not exactly sure what you're looking for, but perhaps this SensorTag sample app is a simple enough example of what you're looking to accomplish?
It relies on Kotlin Coroutines to scan for nearby SensorTags, then allows you to select one, which navigates you to another Activity and connects to it, then displays sensor data.
I would like to recommend to use the rxJava for the BLE Scanning. For scanning the tags for forground and background working fine '
For view the demo on github rxAndroidBle_github_demo
on this library handled all exception.
I hope this will work for you !

Test accessibility (talkback) for application

I am making my application accessibility compliant. for this providing correct data to the accessibility framework by giving android:contentDescription="your string" in xml.
Also I have Seen the Android Developer guide on Making Applications Accessible for an overview of what steps you need to take to ensure your application works correctly with accessibility services.
Now problem is testing these all in each and every screen taking more time. my app has 30 screens and each time to go to any module will take almost 15-20 mins when talk back is on.
can anyone suggest tool/ better way to test app?
#unof is right, one tool you can use is lint to show you some warnings for missing content description.
I'm also experimenting with the Google Accessibility Test framework, it can help you to automate some of your tests:
https://github.com/google/Accessibility-Test-Framework-for-Android
Besides that also a good advice is to use an emulator that supports talk back, I'm using Genymotion with Gapps installed and is much easier/faster for some cases than using the actual device, if you are going to test multiple gestures, I'll recommend using Genymotion remote control feature:
https://docs.genymotion.com/Content/03_Virtual_Devices/Emulating_sensors_and_features/Remote_control.htm
it's very handy in situations when you need to track your network request while using the two fingers for scroll as accessibility requires.
Still is a manual task you will have to do, so try to tweak it.
Go to the Accessibility settings and increase the speed at which the text is spoken:
http://developer.android.com/design/patterns/accessibility.html#tools
It's also helpful to learn some of the gestures, and to explore the TalkBack settings:
https://support.google.com/accessibility/android/answer/6006589?hl=en
I hope it helps!

Feasibility/difficulty of implementing legit spyware software for Android

I'm a non-android-programmer who needs to employ/partner with an android developer or development team to implement a project. What I am interested in knowing is how difficult my requirements are likely to be to implement. I have already approached several developers but so far haven't got any answers beyond "sorry we don't have time now" or "we'll get back to you". I believe it would help me to find a developer if someone could give me some indication of how difficult this project will be to implement.
There are two main requirements. Firstly, the software should monitor usage of the device (it will be a tablet computer) so that usage is recorded and regularly transmitted to me (e.g. by automatic email of a datafile). By usage I mean I want to know (a) what apps are installed and when, and (b) what apps are in use (in the foreground) and when. Secondly, the software should be able to restrict usage of the device so that it can be configured to only be able to run certain apps, and only at certain times. At other times it should be unlockable. It doesn't need to be hacker-proof, just child proof.
Skeptics will want to know why I want malicious-sounding spyware written for me: my attentions are good - I'm a child psychologist and we are planning to run a study where we look at how very small children use tablet computers in an ordinary family setting. Basically I will be handing tablets out to parents of three-year-olds: the parents will know exactly what we have done to the tablets.
To avoid asking too vague a question, I guess I could specify even further: is this even possible without a rewrite of the operating system itself (in which case I guess this is a big job), or can this be done more simply? Perhaps there is already software or libraries available which do this?
Certainly it's feasible, and I don't see why it would be as expensive as has been suggested. The key is that you need this only to be child-proof: that's far easier than making it hacker-proof.
All you'd need is a system service to log and transmit various events, and a replacement home/launcher app to prevent launch of unwanted apps. Simples.

open source user-security/password scheme

I've read numerous discussions lately about different forms of security for mobile devices outside of the typical password/pin code setup.
The articles talk about recognizing the touchscreen as a human input device and that security measures in apps ought to evolve for that as well.
One such concept involved a graphical keylock like one you would see on a safe. The would have to use multiple fingers to twist it to the correct combination. I haven't done any OpenGL stuff so I wouldn't really know how to develop that, has it been done, is it open source?
I did read this: Security Beyond a Username/Password? , but I am looking for other opinions.
Thanks for any suggestions and resources. Also please post resources instead of voting to close if it comes down to that.
I cann't say for all mobile devices, but iOS SDK provides UIGestureRecognizer class, you may create a subclass that UIGestureRecognizer that recognizes a distinctive gesture, character or some kind of gesture combination (in your case). I assume another mobile technologies also have similar methods to recognize keylock characters.
Hope it help you.

With root access, how do I access the OS-level notification system?

I am using a phone without LED notifications. I would like to dev an app to simulate that, however first, with root, I would like to get access to the notifications system on the OS level (so it can be app-agnostic), to get the notifications.
How can I do so, or where can I read up more about this?
Thank you!
Despite this being old and already having an answer accepted, I want to offer an alternative solution since I think the end goal can be achieved. With all due respect to Mark, I think the direction the question is a little misleading, but the end goal is attainable.
If you are looking for something that would allow you to make an app that listens for notifications and then performs some action based on them regardless of the source app (or could be tailored to specific apps), then I think you can do this without writing firmware or rooting using an Accessibility Service. Accessibility Services would allow access to notifications as they come in, allowing your app to do something with them. You would be able to filter by the source package, get the notification contents, and a lot of other things.
There is a lot I could say on it, but it is still rather new to me, so I'll provide a couple of links to get started.
Accessibility Services page: http://developer.android.com/guide/topics/ui/accessibility/services.html
I would also recommend trying it out for yourself. I came across a small project file that I was able to copy and run on my own as a proof-of-concept. If you run this, you'll be able to see in the log that you really can read notifications: https://gist.github.com/qihnus/1909616
Don't forget to enable the accessibility feature for the app after you install it in your phone's accessibility settings.
You have to write your own firmware. This is not possible from an SDK application, rooted or not.

Categories

Resources