React native webview push notification - javascript

Nice to meet you. I'm Junior Developer And I can't speak English very well.
So, plz understand.
I want to create a hybrid app push function with react-native.
but, All I know is postmessage, onmessage.
Sending words typed on the web to the app and clicking a button in the app to send time to the web were successful.
I want to know if the push function we know is completed by using postmessage, onmessage, and push nofication.
Android & iOS
And I'd like to know the site where I can refer to these techniques. thank you
-> Summary
I want to make hybrid app + Push nofitication

Related

Open selection for mail client with React Native Linking API

With Linking API in React Native, we can do something like that:
Linking.openURL(`mailto:${receiverEmail}`);
But, with this approach, the React Native app will open default mail client app instantly (e.g: Gmail), what I want to do is instead of open default mail client app, a pop up should come from bottom of the app (like Share API in React Native does) and let user chooses from various of mail clients in their device.
Is there anyway to do it ? I really appreciate it, even, a suggestion.
Thanks in advance.

How to update UI based on push notifcations when app is closed (React Native)

Apologies for the somewhat general question - I'm not really sure what direction to take this in.
I'm working on a chat feature in a mobile app (React Native is that is relevant), and handling push notifications with OneSignal. I'm currently updating the chat interface with an indicator for unread messages, which is updated when a new push notification comes in for a chat. However, this functionality doesn't run when the app is closed.
Anyone have experience with a similar functionality, or have any guidance on how to handle this feature? I'm at kind of a loss on how to proceed.
You can know that application is opened via manually(by pressing app icon) or via notification. Depending on the opening of application and parameters from push notification you can change the UI.
PS : If your application is chat app, isn't real time (like firebase realtime database)? I think you don't even need push notification to update UI if it is realtime?

how to show real time data to all users using react and firebase?

I am building a messaging app that updates in realtime. So far I can log in with google and post a message and then that message displays on screen. however, if I log in via another google account (the app is hosted on heroku) and post a message as userB then userA won't see this message on their screen until they refresh the page. what is the best way to update all screens in real time so people can actually have a conversation in real time.
every message is posted and stored in the firebase. my only solution so far requires using the javascript setInterval method and pulling from the database every 3-5 seconds. this worked however it caused the app to become very slow and laggy and a poor experience. any pointers/tips are welcomed
You are using the Firebase and its one of the main feature is the real-time database. Firebase will automatically let you know if there is any change in your JSON database. You no need to send the request in interval basic.
You can refer Zero to App: Develop with Firebase - Google I/O 2016 It is also a messaging app demo by the Google Guys.
You can find the sample source code in Github to send and receive the message in real-time.
There are a lot of ways to do this. Generally, you will want to be notified by the server once a new message has come in and not have to ping the server every X seconds.
You could look at these:
socket.io and learn about websockets in general
A nice list of existing chat apps that utilize react
Google's cloud messaging, as you already use firebase, this might be the way to go for you here.
This should lead you in the right direction.

React native Cloudkit push notifications in android

How to register for cloudkit push notifications in react-native android?
Thanks!
I'm not sure what the influence of react native is, but generally speaking CloudKit would function like this:
If you are using the webservice api, then you can only modify subscriptions. You can not register for a subscription. See: https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/Introduction/Introduction.html
If you are using the javascript api, then you can also subscribe. See https://developer.apple.com/library/ios/documentation/CloudKitJS/Reference/CloudKitJSTypesReference/index.html#//apple_ref/javascript/struct/CloudKit.Subscription
I assume that the javascript subscription will only work as long as your application is active and your created subscription is active. I have no experience with this, so I could be wrong.

Sending an SMS from mobile via HTML5/JavaScript

I'm creating a web application for mobile devices that will be downloaded in one of the markets with a mini web server and run on any OS ( iOS , android , Windows8 , etc. ) .
I want an application to be as independent as possible of the OS. I only wanted to use HTML5 and JavaScript .
The application allows a user to make a number of orders just by clicking buttons. Example : [List contacts ]
I need to click [List contacts ] and is sent a text message automatically to other mobile device with an android application that receives the request and sends the response via sms . The response has to be read by my web application . The application can be able to work without network / Wifi .
I've been searching and I only found ways to open the native application for sending sms.
I see that question, but I want to create my own way to send sms without dependencies of other applications.
Is there any way to make this submission automatically?
Or can I use/create some plugin to use on JavaScript to do that?
[EDIT] Can this might be a possibility? Can someone explain me?
I believe the essential information was already mentioned in the comments, but my 2c here anyway.
As already commented, with current modern mobile operating systems apps don't get unlimited access to SMS functionality. From the user point of view allowing this would be potentially quite a hazard, since SMS's usually cost money and user should be in control of such activity, instead of having a random app sending and receiving SMS's freely (without user knowing it). Android is a bit more flexible regarding this kind of functionality, but as mentioned, iOS and also Windows 8/Windows Phone 8 only allows you to integrate to the SMS sending application and for SMS reception, there's no proper way to get access to incoming SMS's.
So, with a native container (such as PhoneGap) you could get one step forward with Android, but for other platforms the possibilities are limited to using the native SMS application. If you need to use SMS for some reason in the backend side, services such as Twilio are probably your best shot, but using SMS locally on the device is pretty much a no-go, unfortunately.

Categories

Resources