Start an app automatically on device start with react native - android

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.

Related

Show Popup when Phone Rings in React native with expo

I'm doing an android application with the expo framework. I want to make a popup when a voice call comes in and after call gets disconnected.
We can achieve this module using broadcast receiver(android.intent.action.PHONE_STATE). But I couldn't find any packages for react native with expo.
Can anyone help me to achieve this functionality?

React Native: Make sure an external app is running in the background

I want to make sure an external app on the phone (say Spotify) is open in the background without me having to manually open it and make it appear in the foreground (using intents or links).
I'm making an app that uses the Spotify API with React Native.
I read in another thread that you can not implement a Web Playback for React Native so I'm stuck with using the API.
My problem is that in order to use the phone as a playback device you need the Spotify app running in the background. Now I have a solution, use Linking and make the app open in the foreground. But that way I make the users leave my app, and somehow I have to tell them to come back which sounds like a terrible design. I also tried nesting the links into each other (first being Spotify the second being my app), it worked a few times but it is pretty unreliable.
So my question would be if there's any way to call an external app and open it WITHOUT having it take foreground over my app.
I'm pretty new with React Native so I'm still learning, but I would appreciate your guidance on this issue

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.

NativeScript lockdown (or kiosk) application

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.

Create iOS / Android shortcut or APP for a website

I have been asked to make an iOS / Android app that simply opens a website on full screen.
I have told them that, by using the iOS / Android native option to "Add to Homescreen" would accomplish the needs, but they insist on making it completelly automatic for the end-user.
Am I doomed to make both Apps for this need? Is there any way to "automatically create" or "share" an already created homescreen shortcut?
Thanks for your time.
Yes, you are doomed to make two apps, but you can start with a cross platform framework that can output to both platforms, allowing you to write it once. From how you describe this project I recommend starting with Cordova.
As maddy points out in the comment, an app that simply displays a website will be rejected by Apple. Yet if you encapsulate them website inside Cordova app, where the app need not access the website, or only access a website for updated information you will probably be approved.

Categories

Resources