Giter Club home page Giter Club logo

onesignal-ane's Introduction

OneSignal | Native extension for Adobe AIR (iOS & Android)

OneSignal is a free service that allows high volume, cross platform push notification delivery. This extension provides cross-platform API for Adobe AIR apps targeting iOS and Android.

Development of this extension is supported by Family Train Inc.

Features

  • Receiving push notifications sent from OneSignal dashboard
  • Managing user subscription
  • Segmenting users using tags
  • Posting notifications from device

Native SDK versions

  • iOS v2.15.4 (Oct 20, 2020)
  • Android v3.15.4 (Oct 20, 2020)

Requirements

  • iOS 10+
  • Android 4+
  • Adobe AIR 29+

Getting started

Create an app in the OneSignal dashboard. Single OneSignal app can be configured for both iOS and Android.

Additions to AIR descriptor

First, add the extension's ID to the extensions element.

<extensions>
    <extensionID>com.marpies.ane.onesignal</extensionID>
</extensions>

On iOS, you may need to add the following ANE to correctly register with Apple push servers:

At the beginning of your code, call the init method of the Core extension:

import com.distriqt.extension.core.Core;

...

Core.init();

If you are targeting Android, add the following dependency extensions:

Credits to Distriqt and tuarua for providing these extensions.

Your app descriptor should now contain the following:

<extensions>
    <extensionID>com.marpies.ane.onesignal</extensionID>
    
    <extensionID>com.google.firebase.firebase-analytics-ktx</extensionID>
    <extensionID>com.google.firebase.firebase-components</extensionID>
    <extensionID>com.google.firebase.firebase-iid</extensionID>
    <extensionID>com.google.firebase.firebase-messaging</extensionID>
    <extensionID>com.tuarua.frekotlin</extensionID>

    <extensionID>androidx.core</extensionID>
    <extensionID>com.distriqt.Core</extensionID>
    <extensionID>com.distriqt.playservices.Base</extensionID>
    <extensionID>com.distriqt.playservices.AdsIdentifier</extensionID>
</extensions>

For iOS support, look for the iPhone element and make sure it contains the following InfoAdditions and Entitlements:

<iPhone>
    <InfoAdditions>
        <![CDATA[
        ...

        <key>UIBackgroundModes</key>
        <array>
            <string>remote-notification</string>
        </array>

        <key>MinimumOSVersion</key>
        <string>10.0</string>
        ]]>
    </InfoAdditions>

    <Entitlements>
        <![CDATA[
            <key>aps-environment</key>
            <!-- Value below must be changed to 'production' when releasing for AppStore or Test Flight -->
            <string>development</string>
        ]]>
    </Entitlements>

    <requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>

For Android support, modify manifestAdditions element so that it contains the following:

<android>
    <manifestAdditions>
        <![CDATA[
        <manifest android:installLocation="auto">
            <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />

            <uses-permission android:name="android.permission.INTERNET" />
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
            <uses-permission android:name="android.permission.WAKE_LOCK" />

            <!-- Required by older versions of Google Play services to create IID tokens -->
            <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
            <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />

            <!-- Create a unique permission for your app and use it so only your app can receive your OneSignal messages. -->
            <permission android:name="{APP-PACKAGE-NAME}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
            <uses-permission android:name="{APP-PACKAGE-NAME}.permission.C2D_MESSAGE" />

            <!--
            Required so the device vibrates on receiving a push notification.
                    Vibration settings of the device still apply.
                -->
            <uses-permission android:name="android.permission.VIBRATE" />

            <!--
            Use to restore notifications the user hasn't interacted with.
                    They could be missed notifications if the user reboots their device if this isn't in place.
                -->
            <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
            
            <!-- Samsung -->
            <uses-permission android:name="com.sec.android.provider.badge.permission.READ" />
            <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" />
            <!-- HTC -->
            <uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS" />
            <uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT" />
            <!-- Sony -->
            <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" />
            <uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE" />
            <!-- Apex -->
            <uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT" />
            <!-- Solid -->
            <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE" />
            <!-- Huawei -->
            <uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
            <uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
            <uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
            <!-- ZUK -->
            <uses-permission android:name="android.permission.READ_APP_BADGE" />
            <!-- OPPO -->
            <uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS" />
            <uses-permission android:name="com.oppo.launcher.permission.WRITE_SETTINGS" />
            <!-- EvMe -->
            <uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_READ" />
            <uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_WRITE" />

            <application android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:enabled="true">
                <meta-data android:name="android.max_aspect" android:value="2.1" />
                <activity android:excludeFromRecents="false" android:hardwareAccelerated="true">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN" />
                        <category android:name="android.intent.category.LAUNCHER" />
                    </intent-filter>
                </activity>
                <service android:name="com.google.firebase.components.ComponentDiscoveryService" android:directBootAware="true"
                    android:exported="false">
                    <meta-data android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"
                        android:value="com.google.firebase.components.ComponentRegistrar" />
                    <meta-data
                        android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
                        android:value="com.google.firebase.components.ComponentRegistrar" />
                    <meta-data
                        android:name="com.google.firebase.components:com.google.firebase.analytics.ktx.FirebaseAnalyticsKtxRegistrar"
                        android:value="com.google.firebase.components.ComponentRegistrar" />
                    <meta-data android:name="com.google.firebase.components:com.google.firebase.ktx.FirebaseCommonKtxRegistrar"
                        android:value="com.google.firebase.components.ComponentRegistrar" />
                    <meta-data
                        android:name="com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar"
                        android:value="com.google.firebase.components.ComponentRegistrar" />
                    <meta-data
                        android:name="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar"
                        android:value="com.google.firebase.components.ComponentRegistrar" />
                    <meta-data
                        android:name="com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar"
                        android:value="com.google.firebase.components.ComponentRegistrar" />
                </service>
                <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true"
                    android:permission="com.google.android.c2dm.permission.SEND">
                    <intent-filter>
                        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                        <category android:name="{APP-PACKAGE-NAME}" />
                    </intent-filter>
                </receiver>
                <receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver" android:enabled="true"
                    android:exported="false"></receiver>
                <service android:name="com.google.android.gms.measurement.AppMeasurementService" android:enabled="true"
                    android:exported="false" />
                <service android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:enabled="true"
                    android:exported="false" android:permission="android.permission.BIND_JOB_SERVICE" />
                <activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:exported="false"
                    android:theme="@android:style/Theme.Translucent.NoTitleBar" />
                <meta-data android:name="com.google.android.gms.version"
                    android:value="@integer/google_play_services_version" />
                <provider android:name="com.google.firebase.provider.FirebaseInitProvider"
                    android:authorities="{APP-PACKAGE-NAME}.firebaseinitprovider" android:directBootAware="true"
                    android:exported="false" android:initOrder="100" />
                <service android:name="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery"
                    android:exported="false">
                    <meta-data android:name="backend:com.google.android.datatransport.cct.CctBackendFactory"
                        android:value="cct" />
                </service>
                <service
                    android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService"
                    android:exported="false" android:permission="android.permission.BIND_JOB_SERVICE"></service>
                <receiver
                    android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.AlarmManagerSchedulerBroadcastReceiver"
                    android:exported="false" />
                <!--
                        FirebaseMessagingService performs security checks at runtime,
                        but set to not exported to explicitly avoid allowing another app to call it.
                    -->
                <service android:name="com.google.firebase.messaging.FirebaseMessagingService" android:directBootAware="true"
                    android:exported="false">
                    <intent-filter android:priority="-500">
                        <action android:name="com.google.firebase.MESSAGING_EVENT" />
                    </intent-filter>
                </service>

                <meta-data android:name="onesignal_app_id" android:value="{ONE-SIGNAL-APP-ID}" />

                <receiver android:name="com.onesignal.GcmBroadcastReceiver"
                    android:permission="com.google.android.c2dm.permission.SEND">
                    <!-- High priority so OneSignal payloads can be filtered from other GCM receivers if filterOtherGCMReceivers is enabled. -->
                    <intent-filter android:priority="999">
                        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                        <category android:name="{APP-PACKAGE-NAME}" />
                    </intent-filter>
                </receiver>
                <receiver android:name="com.onesignal.NotificationOpenedReceiver" />
                <service android:name="com.onesignal.GcmIntentService" />
                <service android:name="com.onesignal.GcmIntentJobService"
                    android:permission="android.permission.BIND_JOB_SERVICE" />
                <service android:name="com.onesignal.RestoreJobService"
                    android:permission="android.permission.BIND_JOB_SERVICE" />
                <service android:name="com.onesignal.RestoreKickoffJobService"
                    android:permission="android.permission.BIND_JOB_SERVICE" />
                <service android:name="com.onesignal.SyncService" android:stopWithTask="true" />
                <service android:name="com.onesignal.SyncJobService" android:permission="android.permission.BIND_JOB_SERVICE" />
                <activity android:name="com.onesignal.PermissionsActivity"
                    android:theme="@android:style/Theme.Translucent.NoTitleBar" />
                <service android:name="com.onesignal.NotificationRestoreService" />
                <receiver android:name="com.onesignal.BootUpReceiver">
                    <intent-filter>
                        <action android:name="android.intent.action.BOOT_COMPLETED" />
                        <action android:name="android.intent.action.QUICKBOOT_POWERON" />
                    </intent-filter>
                </receiver>
                <receiver android:name="com.onesignal.UpgradeReceiver">
                    <intent-filter>
                        <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
                    </intent-filter>
                </receiver>
            </application>
        </manifest>
        ]]>
    </manifestAdditions>
</android>

In the snippet above, replace:

  • {APP-PACKAGE-NAME} with your app package name (value of id element in your AIR app descriptor). Remember it's prefixed with air. when packaged by AIR SDK, unless you knowingly prevent this.
  • {ONE-SIGNAL-APP-ID} with your OneSignal app id

Custom Android icons

Starting with Android 5, the OS forces the notification icon to be all white when your app targets Android API 21+. If you do not make a correct small icon, the SDK will display a notification bell icon since converting your app icon would most likely result in displaying a solid white square or circle. Therefore it is recommended you provide custom icons and repackage the extension.

You will need to create small icons in 4 sizes and replace the ones in the android project res directory:

The xxhdpi directory also contains colorful large icon of size 192x192 pixels. This icon is displayed together with the small icon when the notification area is swiped down. You can delete the large icon, in which case only the small icon will show up.

After you replace the icons, run ant swc android package from the build directory to create updated extension package, or just ant if you are using a Mac.

Finally, add the OneSignal ANE or SWC package from the bin directory to your project so that your IDE can work with it. The additional Android library ANEs are only necessary during packaging.

API overview

Callbacks

To be notified when a notification is received, specify a callback method that accepts single parameter of type OneSignalNotification:

OneSignal.addNotificationReceivedCallback( onNotificationReceived );
...
private function onNotificationReceived( notification:OneSignalNotification ):void {
    // callback can be removed using OneSignal.removeNotificationReceivedCallback( onNotificationReceived );
    // process the notification
}

It is recommended to add the callback before initializing the extension to receive any notifications which result in launching your app.

You can also add a callback to be notified when user's OneSignal identifier and push notification token is available:

OneSignal.idsAvailable( onOneSignalIdsAvailable );
...
private function onOneSignalIdsAvailable( oneSignalUserId:String, pushToken:String ):void {
    // 'pushToken' may be null if there's a server or connection error
    // callback is automatically removed when 'pushToken' is delivered
}

Initialization

Before initializing OneSignal, you can set the following settings parameters:

OneSignal.settings
    .setAutoRegister( false )
    .setEnableInAppAlerts( false )
    .setShowLogs( false );

All these values default to false and changing them after the extension is initialized has no effect.

In order to comply with GDPR or other regulations, you should make sure you appropriately disclose and get consent to send data to OneSignal.

Your application should call the setRequiresUserPrivacyConsent method before initializing the SDK. If you pass in true, your application will need to call the provideConsent method before the OneSignal SDK gets fully initialized. Until this happens, you can continue to call other methods (such as sendTags), but nothing will happen.

The initialization should take place in your document class' constructor, or as early as possible after your app's launch. Replace {ONE-SIGNAL-APP-ID} with your OneSignal app ID:

// The SDK will delay initialization
OneSignal.setRequiresUserPrivacyConsent( true );
if( OneSignal.init( "{ONE-SIGNAL-APP-ID}" ) ) {
    // successfully initialized
}

// Once the user has given you permission to share his data
OneSignal.provideUserConsent( true );

The consent setting is persisted between sessions. This means that your application only ever needs to call provideConsent a single time and the setting will be persisted (remembered) by the SDK.

If OneSignal.settings.autoRegister is set to false when initializing the extension, you will need to call OneSignal.register() later at some point to attempt registration with the notification servers. Generally, it is recommended to avoid auto registration to provide better user experience for users who launch your app for the very first time.

Managing user subscription

You can opt users out of receiving all notifications through OneSignal using:

OneSignal.setSubscription( false );

You can pass true later to opt users back into notifications.

Tagging

By using tags you can segment your user base and create personalized notifications. Use one of the following methods to assign new or update an existing tag:

// key - value
OneSignal.sendTag( "profession", "warrior", function():void {
    trace("Send tag completed");
} );

// Or multiple tags at a time
OneSignal.sendTags( {
    "profession": "warrior",
    "area": "desert"
}, function():void {
    trace("Send tags completed");
} );

Use one of the following methods to delete previously set tags:

OneSignal.deleteTag( "profession", function():void {
    trace("Delete tag completed");
} );

// Or multiple tags at a time
OneSignal.deleteTags( new <String>["profession", "area"], function():void {
    trace("Delete tags completed");
} );

Use the following method to retrieve the values current user has been tagged with:

OneSignal.getTags( onTagsRetrieved );
...
private function onTagsRetrieved( tags:Object ):void {
    // tags may be null if there's a connection error or user has not been tagged
    if( tags != null ) {
        trace( tags["profession"] ); // warrior
        trace( tags["area"] ); // desert
    }
}

Documentation

Generated ActionScript documentation is available in the docs directory, or can be generated by running ant asdoc from the build directory.

Build ANE

ANT build scripts are available in the build directory. Edit build.properties to correspond with your local setup.

Author

The ANE has been written by Marcel Piestansky and is distributed under Apache License, version 2.0.

onesignal-ane's People

Contributors

gdeglin avatar marpies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onesignal-ane's Issues

com.google.android.gms Error

I am using in app purchaase and admob ane from https://github.com/tuarua

Now I want to add push notification to the app. For this I used the marpies ANE but I got the error below.
Warning: packageName com.google.android.gms used by more than one ANE. Ignoring this entry

is there any sourcecode ?

hello thank you for that ane its good

i have issue i dont see any notification when i send from onesignal ! the panel of onesignal said you have new device z3 sony

this my code

import com.marpies.ane.onesignal.OneSignal;
import com.marpies.ane.onesignal.OneSignalNotification
import com.marpies.ane.onesignal.OneSignalNotificationButton
import com.marpies.ane.onesignal.OneSignalSettings

OneSignal.setRequiresUserPrivacyConsent( true );
if( OneSignal.init( "105fb4d7-3396-4c81-a383-97518b9b9ca8" ) ) {
// successfully initialized
}

OneSignal.settings
.setAutoRegister( false )
.setEnableInAppAlerts( false )
.setShowLogs( false );

OneSignal.addNotificationReceivedCallback( onNotificationReceived );

function onNotificationReceived( notification:OneSignalNotification ):void {
// callback can be removed using OneSignal.removeNotificationReceivedCallback( onNotificationReceived );
// process the notification
}
OneSignal.idsAvailable( onOneSignalIdsAvailable );

function onOneSignalIdsAvailable( oneSignalUserId:String, pushToken:String ):void {
// 'pushToken' may be null if there's a server or connection error
// callback is automatically removed when 'pushToken' is delivered
}
OneSignal.provideUserConsent( true );
stop();

if my code wrong please can you please paste the right code , thank you

ANE crashes on first start of my app

Hello.

When the OneSignal.init method called my app crashes. Why it happens? How to fix it? I noticed that my app crashes only one time after I installed the app.

public function Main()
{
	addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
	
	setupStarling();
	
	OneSignal.settings
	         .setAutoRegister(true)
	         .setEnableInAppAlerts(false)
	         .setShowLogs(true);
	
	setTimeout(OneSignal.init, 5000, "487972a0-83f1-4bcb-8de5-9d54e7082769");
	
	OneSignal.idsAvailable(onOneSignalIdsAvailable);
	OneSignal.addNotificationReceivedCallback(onNotificationReceived);
}

If I change 5000 ms delay to 10000 ms the app crashes after 10 sec after the first run.

Icons

Hey,
I tried to add my own icons for notifications but it's impossible for me to rebuild the extension... I keep having the same error : "onesignal-ane/android/build/outputs/aar/android-release.aar' doesn't exist."
What is the correct gradle version to repack the ANE ?

ANEs conflicts

Hi guys,

Is there any known conflicts with other ANEs ? I have white screen (and crash sometimes) on Android when adding the extensionIDs in the manifest...
Any ideas ?

Can't get push token on iOS 10: No Push Token

Hello,

I got No Push Token only one IOS 10 devices.

I don't know if the ANE use the updated version of the IOS SDK but now I'm trying to recreate the libOneSignal.a file with the latest OneSignal SDK.

receive data in app

hello,

it is possible to receive data in application when the application is not opened?
When i Post notifications from device my users can't receive any data when application prompt.
should I use invokeEvent?
thanks

Mourada

Android 64 bit support?

With the upcoming Android deprecation (apps released / updates submitted on august 1 2019 or later in google play store must support 64 bit), is it possible to provide a compilation of this ANE with support for android 64 bit?

ShortcutBadger

Hi,

I saw that in your Android Manifest file (at the instructions page) you defined some permissions to use the
"ShortcutBadger", if i add those permissions into my manifest, the icon badge on my device will be updated? or do i need to use the ShortcutBadger library? if so, do you have an ShortcutBadger ANE?

Thanks.

deleteTag/deleteTags not working

I added a tag:
OneSignal.sendTags({date:new Date().toUTCString(), blubber: "something"});

and deleted it in another session by
OneSignal.deleteTags( new ["blubber"] );

But in the One Signal Administration I still see :
{date: Sun Apr 14 10:38:30 2019 UTC, blubber: something}

Action Buttons doesn't work on iOS

Hello. I want to add two action buttons Run and Delay.
I use PHP to send Push notification.

'buttons' => array(array("id" => "id1", "text" => "Run", "icon" => "ic_menu_share"), array("id"=> "id2", "text"=> "Delay", "icon"> "ic_menu_send"))

On Android it works well. I see action buttons. But on iOS I don't see the Action Buttons. How to fix this issue?

I noticed that If my app in foreground I see Alert with these buttons but when my app in background mode notification popup doesn't contain action buttons.

update Version ANE

This version does not work on ios 12.X is it possible to do this update?
Can I know how to do it?
Thanks

problem with ane64bit

hi
first , thanks for updating ANE.

i publish my apk to 32bit and every thing is Ok.
but when i publish to 64bit and make apk.
SUBSCRIBED cell in onesignal panel->users 👍 show "Missing Google Play Services Library"

how can i fix this problem?

thanks

Android init but not registering.

I am trying the ANE on one of my projects and although it initialiazes as expected, no user is registered. I have setted auto-registration to true and also tried .register() onstart.

I am testing on Android 7 and Android 6 (oneplus3 and oneplus1).

I am using google play services 10 and the latest androidsupport (all from myflashlabs as i use several other anes too).

Any idea what could be wrong?

Thank you.

apk 64bit error

hi

first ,thanks for updating ANE to 64bit version

i am publish my apk in 32bit , everything is ok.
but when i want to publish to 64bit version i am revecieng this error:

Error creating files.
aapt tool failed:c\users\badboy.....\androidmanifest.xml:155:error:Error: no resouce found that matches the given name (at 'resource' with value '@drawable/ic_stat_distriqt').

please help me.
thanks a lot

Does it need firebasecore to work on Android?

I added the new version to a new app and it doesn't seem to even register the device in the Onesignal panel.

However if i use the same app id and sender id on another App that uses firebase, everything works as expected.

pushToken is always null

Hello,
I tried for many days to configure onesignal ane with your method, but it does not want to give me the push token...

I configured Firebase with oneSignal in following your tutorial.
The manifest.xml has been completed with the ids and extensions ....

In my app, with your method (OneSignalIdsAvailable), it received the string (oneSignalUserId) but pushToken always kept null.

Do we can active a verbose trace in as3 ?
Does this solution always work with adobeAir 25 and android 6 ?

help pls

Conflict on included ANE files and pushToken getting Null

I am using this ANE with GoogleSignIn-Ane.
https://github.com/myflashlab/GoogleSignIn-ANE

I allready added this dependency extensions in my project;
com.google.android.gms.base (googlePlayServices_base.ane)
com.google.android.gms.basement (googlePlayServices_basement.ane)
from: https://github.com/myflashlab/common-dependencies-ANE/tree/master/googlePlayServices

Then pushToken gets always null. But if i replace those with yours i am getting Token without problem;
com.marpies.ane.googleplayservices.base.ane
com.marpies.ane.googleplayservices.basement.ane

In the documentation says there is no need to add them unless you already added but not working in this case. If i added both extensions i am getting conflict error too. So is there a way to work both ANE without problem?

OneSignal_disable_badge_clearing

I would need to ask if it's possible to set "OneSignal_disable_badge_clearing" in iOS section of Application descriptor file of Adobe AIR? So far this setting seems to only work in XCode.

Kindly advice.

custom notification sound not working on android

custom notification sound not working on android with all sound file formats, it just vibrates when i send the sound name
i contacted the technical support in Onesignal.com and tested my apk and found this error with the ANE,

02-22 16:42:31.395 534-30039/? W/RingtonePlayer: error loading sound for android.resource://air.com.btolat/2131034117
                                                 java.io.IOException: Prepare failed.: status=0x1
                                                     at android.media.MediaPlayer.prepare(Native Method)
                                                     at com.android.systemui.media.NotificationPlayer$CreationAndCompletionThread.run(NotificationPlayer.java:90)

Flex Error in Packaging the application

I managed to rebuild the ANE after I've updated the icons for Android, but when I add the extension to my project and export for iOS, I encounter this error:

screen shot 2017-03-16 at 12 07 58 pm

So far no issue when adding the extension and exporting for Android.

Kindly advice, thank you.

(Missing Android Support Library) for some devices and (No Push Token) unity sdk

Hi.I downloaded the latest unity sdk.I replaced my api key inside the code and press assets/play service resolver/ android .... My package name is correct and it is the same as I created inside the site.
build the sample with gui for android but I see (Missing Android Support Library) for some devices and (No Push Token) inside all users section of my onesignal. the onesignal version is 2.4.0 and unity one is 5.6.0f3
thx.

Crashes in Android 8

After integrating OneSignal, we are seeing a repeat crash in Crashlytics, that only happens in Android 8 devices.

Fatal Exception: java.lang.RuntimeException
Unable to start service com.onesignal.SyncService@cc19a71 with Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=air.com.supermechs.superapp/.AppEntry }: java.lang.IllegalArgumentException: No such service ComponentInfo{air.com.supermechs.superapp/com.onesignal.SyncJobService}

Caused by java.lang.IllegalArgumentException
No such service ComponentInfo{air.com.supermechs.superapp/com.onesignal.SyncJobService}

android.os.Parcel.readException (Parcel.java:1946)

  | android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:44)
  | com.onesignal.OneSignalSyncUtils.scheduleSyncTask (OneSignalSyncUtils.java:46)
  | com.onesignal.SyncService.onTaskRemoved (SyncService.java:128)
  | com.onesignal.SyncService.onTaskRemoved (SyncService.java:101)
  | android.app.ActivityThread.handleServiceArgs (ActivityThread.java:3555)
  | com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767)

Reading this thread:
OneSignal/OneSignal-Android-SDK#337
It looks like it is related to adding
android:permission="android.permission.BIND_JOB_SERVICE"
to the manifest XML.
However, the thread states adding it to NotificationExtender, which isn't defined in the manifest. Perhaps this is due to difference in versions of OneSignal SDKs.
So we don't know where this permission declaration should be placed.
Compiled on Air 24, min sdk 9, target sdk 24

iOS 10, Rich Media Attachments Doesn't Work

Hi @marpies,

I've tried to send push via OneSignal with rich media attachment (image). Push notification appear only at all iOS 9.x.x devices (without image). It isn't showed at iOS 10.x.x completely. I've used several images. All the same.

onesignal-ios-config

Please fix this issue.

Regards,
Dmitrii

ANT BUILD FAILED

I am getting the following error when packaging with new icons:

BUILD FAILED

android:

android-build:
     [exec] 
     [exec] FAILURE: Build failed with an exception.
     [exec] 
     [exec] * What went wrong:
     [exec] A problem occurred configuring root project 'android'.
     [exec] > SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
     [exec] 
     [exec] * Try:
     [exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
     [exec] 
     [exec] * Get more help at https://help.gradle.org
     [exec] 
     [exec] BUILD FAILED in 0s
     [exec] Result: 1

BUILD FAILED
/Users/alex/Downloads/onesignal-ane-master 2/build/build.xml:58: The following error occurred while executing this line:
/Users/alex/Downloads/onesignal-ane-master 2/build/build.xml:73: src '/Users/alex/Downloads/onesignal-ane-master 2/android/build/outputs/aar/android-release.aar' doesn't exist.

Total time: 6 seconds

I'm on a MAC, what could be the problem? I don't see any .aar files anywhere

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.