NativeScript lockdown (or kiosk) application - android

I wondering if it is possible to create a "lockdown" application with NativeScript.
My aim is to place an android tablet in a public area where people may only interact with my NativeScript application:
fullscreen
no home-button access
no sleep/standby
no notification bar
Then, if possible, a pin code may allow to unlock the application.
Example:

You are looking for kiosk app, it's of course possible with NativeScript.
You will have to access android's native apis to do so, here are some heads up.
Also there is a thread in the forums which will give you some initial thoughts on doing this with NativeScript.

Related

How can I capture screenshot in react native not for the same app

I'm creating an app (my-app) in react-native. I want to take screenshot of every screen of user's running app (like if xyz app is also open in background so can I take screenshots of it progmatically?).
I can also make a bridge from React-Native to Android if it is worthy.
Else suggest me something how can I achieve in Android (but I want in React-Native)?
If you want to take a screenshot of what the user is doing inside YOUR APP,
you can use react-native-view-shot. But if you want to take a screenshot of the user's other apps, you can not do it on iOS as apps run in a sandbox on iOS. I do not know if it is doable on Android though.

Start an app automatically on device start with react native

I am learning react native and to do so, I am building my first app.
However as great as it is, It seems like react native has some limitations.
What I want my app to do is to start running the background as soon as the devise boots up (like the WhatsApp or the alarm app).
And I also want notification like WhatsApp new message notification (overlaying the screen).
I did it with android studio and wanted to do it with react native. So far I did not find any package / library that can do that, is this the limit of react native or is there a package that can do that? Because right now I am thinking of going back to native with android studio.
In android you must ask for necessary permissions in manifest. Also in the phone, you must set battery optimization. In Ios this is the hard one. I cannot do it. Your app must be music app or maps app. Thats all i know.

Android: Detect App Launch

I am developing a lock application as an academic project. I need to detect the launch of an app so that i can launch my lockscreen on top of it and restrict opening the app till the user put correct pin. I have read a few posts and this one has a few answers that look promising.
Android, Detect when other apps are launched
Is this the right way to do it? Or is there a better way around? I have also heard about the Application class. But don't know how to implement it.
EDIT: My app supports API16 to API22.

Showing lockscreen widget to control application only when the application needs it

I would like to add lockscreen controls for my app similar to what netflix or youtube does when casting to a chromecast device.
Do I do this with a lockscreen widget that I add and remove on demand or is there a different method?
Thank you.
The proper way to add a lock screen controller is to use the RemoteControlClient. There are limitations to what you can do there, both in terms of the functionality and availability based on the Android version. If you are running Android version 4.1+, then the required functionality is there (check out the Google Play Music to see how it can look like). Give that a try and if run into issues, come back here and post your issue(s).

Newbie regarding android back button on mobile website

I understand that android has this few functions such as onBackPressed() which utilizes the back button on the android phones for native android applications,
I was wondering if it was possible to utilize this backbutton on a mobile website, are there any function or codes for them. Could anyone point me to any reference on these on how to go about coding it if possible.
The other question that I would like to ask as well is that is this also possible for IOS. Considering that the IOS back button is usually built into the application itself.
Added for clarity,
I'm designing my application using mainly jquery stuff.
If you are planning to use twitter bootstrap for you mobile website, may be this what you are looking for here
If you plan to use phone gap, you may want to have a look at
here
If you are using only jquery, then there is no way to disable the hardware back button as explained here

Categories

Resources