I tried to use web-push with Electron + React, and got this error
DOMException: Registration failed - push service not available
I did everything according to this article
Does anyone have any ideas?
Electron doesn't support WebPush notifications out of the box, because this is not part of Chromium itself. More details here.
As an alternative solution, you can use Pushy (paid) or this beautiful library — electron-push-receiver. I am using electron-push-receiver myself and it works like a charm with Firebase Cloud Messaging.
Related
We have written an electron app. It shows notifications (Win10). Once the app was spamming with a lot of notifications so I switched them off from the notification tile.
I wanted to enable them back. So I went to notification settings and I could not find my app in the list.
PS: We are using electron Notification module and we are also calling app.setAppUserModelId("OurAppName")
This is a semi-known issue where electron applications are simply missing from Windows Notifications Center.
Try changing
app.setAppserModelId("yourAppName");
To
app.on('ready', () => app.setAppUserModelId("Your.AppName"));
I had the same issue recently and this did the trick for me, I found the solution here:
https://github.com/Automattic/simplenote-electron/pull/2483
In other iterations of similar issues, there is a workaround to enable notifications again which can be found here:
https://github.com/electron/electron/issues/24330#issuecomment-650546142
For Electron you can find the event 'ready' here: https://www.electronjs.org/docs/api/app#event-ready
The OneSignal site goes through great detail on launching the prompt for browsers, but I'm either overlooking the option for mobile or that option doesn't exist.
I'm using Ionic 4/Angular 8 with the cordova-onesignal plugin. I've tried OneSignal.showNativePrompt() but that method doesn't exist on OneSignal. I've also tried this.oneSignal just to see what functions are available and read the comments, but there doesn't seem to be anything that triggers the prompt.
Is there some other way using Ionic to trigger the message to allow users to subscribe to notifications?
Never mind!
Guess I overlooked the promptForPushNotificationsWithUserResponse() function. Looks like it is a promise so you can perform your full suite of setup after it resolves.
My React Native App crashed on a tester's phone.
What is the best way to get logs of that crash? I'm using React Native 0.14.2
We just rolled out official support for react native error reporting with Bugsnag this week which reports both JavaScript and native (Java/Cocoa) layer errors to a single dashboard.
Compared to Fabric - Bugsnag adds support for js source maps, ios symbolication, and android proguard mapping - which make a big difference.
Let me know if you have any questions or I can help in any way - I'm a founder.
As #Abhishek has commented, you'll have to use some monitoring tools with crashlytics to get such infomation.
Fabric is a good option in this case. It comes with a crashlytics solution.
Here is a blogpost that explains in-depth on how to set it up for your app.
Here's an excerpt of features of crashlytics tool of Fabric from the blogpost
Crash Reporting —It will record every single crash and its stack trace. This is way better than the iTunes Connect crash reports, which only include the info of users that opted in to share information with developers while setting up a new iPhone. It’s also not updated in real-time (you can read more about this here).
Crash Logs — (A.K.A. CLS_LOG) If you’re familiar with Objective-C, you have probably been using “NSLog” while you’re developing your app. You should use CLS_LOG instead. There’s no difference at all when you’re debugging (whatever you’re logging will still show up in the console) but the cool part is that when a user crashes your app, all the information will be sent to Crashlytics’s servers the next time the user launches your app, including all the content that you’ve logged through CLS_LOG. So if you log information for most of the actions/events in your app, you can read the logs later and reproducing the crash should be simple.
A good crash log framework that reports from the javascript level I've tried recently is Sentry. More descriptive with the actual error, if it comes from he JS side.
I wrote expo-error-log as a free alternative to BugSnag, etc.
Check it out if you like :
https://github.com/marchingband/expo-error-log
https://www.npmjs.com/package/expo-error-log
https://medium.com/#andymarch/free-error-reporting-in-expo-apps-with-expo-error-log-819cab5b6062
It seems like Crashlytics does the error reporting job perfect for a native app made in android/ios.
For a react-native app, however, Bugsnag looks more promising. You can explore both and see which one fits your requirements.
I would like to receive remote push notification when the app is on the foreground. I think I can use "didReceiveRemoteNotification" in Objective-C, but how about in Titanium? I've been searching solutions but can't find anything. Does anybody help me out?
Titanium currently only supports local notifications (by default) I believe. You might want to take a look at AppCelerator as a solution.
Sorry, i was wrong last time. It's very hard to find but Titanium supports a way of interacting with PushNotifications.
Please take a look at Ti.Network.registerForPushNotifications. It provides a callback that is executed when you receive a Push Notification.
The other posted solutions below may provide a better integration for titanium so it's up to you what you want to use. But this should answer your original question.
Unfortunately Titanium only supports local notifications on iOS. If
you want to support remote notifications you can use
Urban Airship
ACS (Appcelerator Cloud Services) or
you write your own module that provides "didReceiveRemoteNotifcation" as an app event to your app
As far as i know you can only listen on local notifications by
default but you can try this method if it reacts on remote
notifications..
I am implementing the c2md, in phone android 2.2,
I have follow the all the steps from http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html
and use the php code from C2DM implementation PHP code ,i get response id=0:1323075593128502%2fd4838f00000031 but i can not get the notification of phone.also i have try with command prompt.
Does anyone idea where i have made the mistake.
Also register the account on google.
Firewall issue, probably? Try when the device is on 3G, as opposed to WiFi.