onesignal

OneSignal push notification to all segments

半腔热情 提交于 2019-12-14 02:50:51
问题 I am trying to send push notification from the admin device, to all devices (segment:"ALL"). I can't seem to get it to work with this code. let data = [ "contents": ["en": "\(message)"], "included_segments": ["All"], "excluded_segments": ["None"], "ios_badgeType": "Increase", "ios_badgeCount": 1 ] OneSignal.defaultClient().postNotification(data) The "None" segment exists and has 0 users in it. "All" has all active users. When I post the notification I get an error ERROR: Create notification

Open the app automatically when you receive a push notification with onesignal

本秂侑毒 提交于 2019-12-13 17:33:19
问题 I would like to be able to open an activity in the application when a push notification is received without any user action. Is it possible to do with onesignal or some other way to open the app automatically using a push? 回答1: you can try with this,hope this code will help you. Intent restart = context.getPackageManager(). getLaunchIntentForPackage(context.getPackageName()); restart.addFlags(Intent. enter code here FLAG_ACTIVITY_CLEAR_TOP); context.startActivity(restart); 回答2: You can simply

Sending push notifications from iOS device using OneSignal/Firebase

懵懂的女人 提交于 2019-12-13 16:09:52
问题 I'm developing an app and am trying to work out how I can notify a specific user when a different user performs a specific action. I'm trying to avoid setting up my own backend server, as I believe that what I want to do can be accomplished by OneSignal/Firebase. I haven't tried it yet, but I figure with each user I could get their own OneSignal player_id (which is basically the OneSignal device_id), upload that to my firebase database, then when I want to send a push notification I simply

Getting OneSignal UserID with Unity (C#)

感情迁移 提交于 2019-12-12 06:28:07
问题 In my app, I have some push notification subscribers (OneSignal). I am trying to get the user id's like this: OneSignal.GetIdsAvailable(IdsAvailable); .... .... private void IdsAvailable(string userID, string pushToken) { playeridx = userID; System.Diagnostics.Debug.WriteLine("UserID:" + userID); System.Diagnostics.Debug.WriteLine("pushToken:" + pushToken); } But I get an error: "OneSignal does not contain a definition for GetIdsAvailable." Any ideas? 回答1: It looks like you are using a method

I open the app through the notification and want to keep it open after the user presses back?

谁说我不能喝 提交于 2019-12-11 18:00:19
问题 I have an app that has a notification system developed with OneSignal. Use case: - When the notification comes with the app closed and the user clicks on it the app directly opens the screen corresponding to that notification, (Until then I got it!) But when the user clicks back, the app is closed, because there is only that route in the pile; I want to somehow reopen the app or keep it open! Something similar to what happens in Whatsapp, because when the app is closed and opened by direct

Package native binaries Failed to install 'onesignal-cordova-plugin'

╄→гoц情女王★ 提交于 2019-12-11 17:42:26
问题 Português: Olá pessoal, estou com um problema quando vou buildar meu app no Package native do Ionic, mostra esse erro. Alguém tem alguma solução? English: Hello everyone, I have a problem when I build my app in Ionic's native package, it shows this error. Does anyone have a solution? Failed to install 'onesignal-cordova-plugin': Error: pod: Command failed with exit code 31 at ChildProcess.whenDone (/Users/ionic/builds/project-1/platforms/ios/cordova/node_modules/cordova-common/src/superspawn

OneSignal - ANDROID - NotificationExtenderService

≡放荡痞女 提交于 2019-12-11 12:32:32
问题 I'm having problems since a week ago with OneSignal and doing stuff when I tap on the notification when my app is killed. After research, I've found out that my problem is that I'm not using the NotificationExtenderService . But I don't know how to implement this. What I read is that this is implemented as a Class and I don't get it - do I have to create a separated file class with that name, or create the class inside of my MainActivity ? I don't know what to do there too. Thanks! OneSignal

How to add Splash Screen in Webview App? Android Studio

半城伤御伤魂 提交于 2019-12-11 06:47:58
问题 I want to add splash screen to my webview app. I am not forced for editing webview and adding the push notifications but I cant add splash screen while url loading. I am working on this app. Github Code I know this a duplicated question but I cannot solve my problem. 来源: https://stackoverflow.com/questions/41383664/how-to-add-splash-screen-in-webview-app-android-studio

unable to integrate One-Signal Push notification in ios

巧了我就是萌 提交于 2019-12-11 05:51:43
问题 i have tried to integrate One-signal as per given documents on their site but when i install framwork through podfile , at this time i got 0 percent dependancy so how to integrate proper way??? in ios Xcode 8. i have tried this Steps: Option A: Use CocoaPods (Recommended) Setting up CocoaPods on your system if you don't have it already. Make sure you have the latest 1.1.0 version by running pod --version from the terminal. Run the following to upgrade sudo gem install cocoapods 1.1 Make sure

Does anyone know how to convert curl commands to node.js for firebase cloud functions

荒凉一梦 提交于 2019-12-11 05:22:26
问题 I'm stacking on converting curl commands to Node.js for firebase cloud functions. What I referred to "https://curl.trillworks.com/" seems to be not working well. The code is below. Does anyone know how below code should be written by Node.js? curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{\"app_id\" : \"YOUR_APP_ID\", \"identifier\":\"DEVICE_VOIP_TOKEN\", \"language\":\"en\", \"timezone\":-28800, \"game_version\":\"1.0\", \"device_os\":\"7.0.4\",