I have an app that needs to show a full screen notification even when the phone is locked or the app is closed, something like ubber, when the user orders a driver i want the driver to be able to see a fullscreen notification that shows the details of the order and some action buttons that might reject the order, accept it, or open some activity in the app like checking the users profile or something.
I don't want it to be just a normal notification because the whole buisness kinda depends on it, the driver needs to be instantly informed about the order and react to it, that can be best achived with implementing a full screen notification just like answering a call, it's a time-sensitive message.
Is this possible with react native and some push notification service like OneSignal?
After doing some research i found that this may be achievable with Android using services and full screen notification intent, but in ios it's more complicated since background tasks are very restricted in iOS.
So im just looking for some insight on how to achieve this or at least something similar, is it even possible to achieve something like this? Do i have to write some platform specific code for both iOS and Android?
ANY help at all is very much appreciated, thank you.
Related
I am creating a demo for android and for that, I want to not show notifications for a specific application like WhatsApp, Facebook, Instagram, etc. And for that, I have added notificationlistner and it worked for me when the application is in the foreground or in the background but not in a killed state. And I want to make it happen in the application killed state.
It would be great if I get help with this.
I have a simpler answer for you- just don't have those apps on the phone you're using to demo. If necessary, buy a cheap used phone for your demo. Far less time and effort than trying hacks to make notifications of other apps disappear.
I was looking online for the best solution but couldn't find exactly what I wanted.
So, I am developing an app using React Native, and trying to make it so that even when the app is closed, once an hour a background task (which will do some fetching) will run, and at the end of it a notification (not a push notification) with a custom message will show up.
How can I achieve that?
Thank you upfront.
For Android you can use Headless JS which ships with RN. For iOS you'll need a package like react-native-background-task, which works with both. Android only projects you're probably better off just sticking with Headless.
You'll need react-native-background-task to perform the task you wish like fetching every hour, and then using some notifications library(i prefer firebase), you can show the notification to the user screen.
Also in firebase there is scheduling-notifications with which you can schedule notification showing on the screen (maybe you find a use case needing it).
I am working on an android app built on apache cordova. The app used to send your location via SMS, Email & in app notification to your predefined contacts. I want this sharing event to be triggered on double tapping on screen (when locked) or 3-4 times pressing the power button/ volume button.
Its for emergency situation, when user may not be able to unlock phone & open app to share any info.
I've searched a lot but could not find any relevant info. is there any available plugin to do that? I know very little of JAVA. Expecting any plugin that would allow me to launch the app(any activity) when phone is locked.
Any helpful information or suggestions are appreciated.
To accomplish this kind of task, you need to run a service in background, it is not possible to use any cordova webview, so you won't be able to run any javascript.
I don't think there is any plugin doing such a thing as it is very specialized.
I needed to create an app that needed to send notification to the user depending on his location. It ended up in writing a native plugin...
So the best advice I can give you is "It's never too late to learn Java" ;-)
maybe some other JS framework (maybe NativeScript) allows such things but I never used it yet so it might be impossible too.
I am working on a control-based (V2.0) SW2 app. Is it possible to set the badge-number (i.e. the notification counter) on the icon in the application view used in a notification-based app? I do not need anything else from the notification API, I just want to be able to set the badge-number and removing it after the user opens the control-based app.
Thank you,
Andrej
Unfortunately that is not currently possible without using both the Control and Notification APIs together. If you use both of them in your extension you may be able to achieve something similar to what you want but with the limitation that the extension will always start in Notification mode (this is a bug in the current implementation) so you wouldn't be able to go straight into the Control part of your extension.
I have a Nexus-S which has no external notification LEDs to show a missed call, text message or email. What are some ways to implement a notifcation application? Write a service? write screen blanking application and draw on the app screen when blanked (what about locking?). I thought I would try turning on the hardware key back-lights as a notification but that proves to need root access so that's out. Please don't link to an app on the market unless it's Open Source. Thanks
What are some ways to implement a notifcation application?
I do not know what a "notification application" is. To notify users (e.g., flash LED where available), use a Notification, with whatever mix of options you want on it (e.g., play a ringtone).
Write a service?
A service can raise a Notification.
write screen blanking application and draw on the app screen when blanked (what about locking?)
Users do not necessarily appreciate activities appearing out of nowhere. If you go this route, give them the option of a classic Notification or your activity.