Search Unity

[RELEASED] UTNotifications - Professional Cross Platform Push Notifications and More

Discussion in 'Assets and Asset Store' started by Yuriy-Ivanov, Jun 12, 2015.

  1. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466

    https://www.assetstore.unity3d.com/en/#!/content/37767
    Unity 5+ / Unity 4.6.9+
    Cross-platform: iOS, Android (with Google Cloud Messaging or Amazon Device Messaging), Windows Store (Windows Phone 8.1 / Windows 8.1 / Universal 8.1 / Universal 10)


    UTNotifications is an advanced and professional Unity extension that is yet very convenient and easy to use. It provides a convenient cross-platform API for posting and handling local, scheduled (including those appearing once and those repeating) and push notifications. It fully supports iOS,Android (Google Play and Amazon Kindle Android devices) and Windows Store (Windows Phone 8.1, Windows 8.1/10, Universal 8.1, Universal 10).

    Features:
    - Immediate local notifications.
    - Scheduled (those appearing once and those repeating) local notifications with automated restoring on device reboot.
    - Push notifications with a workaround for a Unity bug (APNS that do not work in iOS 8 with Unity versions prior 4.6).
    - 2 Android push notifications services: Google Cloud Messaging (GCM) & Amazon Device Messaging (ADM) in a single build.
    - Completely cross-platform API.
    - The full source code is provided as well as the code of the native plugins so one can change and adjust anything one likes.
    - A demo push notifications provider web server with the source code is included and it supports all three push notifications services.
    - Default or custom notifications sounds and icons.
    - A detailed manual and an API Reference docs are included.
    - Convenient Unity editor extension for configuring.
    - Android & Windows Store manifest file automated patching.
    - Notifications enabling/disabling API for all supported platforms allows one to add notifications toggle to the game options.
    - The API for handling the received notifications of any type both local and push.
    - One can attach custom data to the notification of any type and access it while processing the received notification.
    - Hiding or cancelling a specific notification or all of them.
    - iOS application icon badge number management API.
    - Android grouped notifications.
    - A sample & test scene.

    API Reference
    Manual

    Both the API Reference and the detailed step-by-step manual can be found under Assets/UTNotifications/Documentation (can be also opened from the Unity menu: Edit -> Project Settings -> UTNotifications)

    Universal Tools asset.
    See also our new UTMail - Email Composition and Sending Plugin.
     
    Last edited: Jun 18, 2017
  2. rkamalya

    rkamalya

    Joined:
    Jan 21, 2015
    Posts:
    8
    Hi Yuriy,
    nice job!

    I have got some questions:
    1. does it support notification types ? For example grouped notifications for android. Is this flexible to be set up?
    2. does it give me an option to turn off the notifications while the app is open?

    Thanks.
     
    Last edited: Aug 4, 2015
  3. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hey rkamalya,
    Thank you, I'm glad that you like the asset.

    1. does it support notification types ? For example grouped notifications for android. Is this flexible to be set up?
    Updated: supported directly since version 1.3

    Obsolete: No, it's not supported directly now (but you can easily add it on your own as you have the plugin's source code). Here is what you need to know for that. I've also created a task to implement the notifications grouping directly in a future release.

    2. does it give me an option to turn off the notifications while the app is open?
    Updated: supported directly since version 1.3

    Obsolete: Yes, and you have more than one option here. First, if you still need to know when the notification was received, you can handle the notifications using UTNotifications.Manager.Instance.OnNotificationsReceived event. There you can hide any received notifications using UTNotifications.Manager.Instance.HideNotification and also do something else (what you need). There is another option: when the app is started you can call UTNotifications.Manager.Instance.SetNotificationsEnabled(false) and when it's being closed UTNotifications.Manager.Instance.SetNotificationsEnabled(true). The second option allows you to work with notifications the same way as they are enabled, but you'll not receive them. But the scheduling and so on will work fine and after you enable notifications before the application exit, they will be able to be displayed again.

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Oct 14, 2015
  4. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    An update (1.2) is available!

    Changes:
    - Triggering scheduled notifications after a device reboot on Android
    - Custom sounds & icons support
    - Android 4.4 compatibility mode option
    - Base64 or HEX encoding for APNS registration token
    - Bugfixes
     
  5. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,545
    Notification will work if phone is rebooted?
     
  6. rkamalya

    rkamalya

    Joined:
    Jan 21, 2015
    Posts:
    8

    Thanks for your answer.
    The second option is not suitable for me, because I can't handle all the ways users quit my application. And as for the first option (calling HideNotification in OnNotificationsReceived event) it showed me the notification and then hid it. Am I doing something wrong ?
     
    Last edited: Aug 5, 2015
  7. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Well, yes, if the notification is not processed fast enough (it depends on a frame rate and the Unity <-> Android Plugins interaction speed) then you still will be able too see a notification.
    For the second option you can handle the application exit in a OnApplicationQuit().
    I also created a ticket to implement that option in a next update to make it as reliable as possible.
     
  8. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi imtrobin,
    Yes, since the version 1.2 (already available in the Asset Store).
     
  9. rkamalya

    rkamalya

    Joined:
    Jan 21, 2015
    Posts:
    8
    Thanks!

    p.s. Eager to see flexible notification options (grouping and etc) soon.
     
  10. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Version 1.3 containing the requested features and bugfixes has just been uploaded! It will be available in about 1 week (because of the Unity Asset Store approval procedure).
     
  11. g3tinmybelly

    g3tinmybelly

    Joined:
    Jul 5, 2014
    Posts:
    6
    Do you think you will support WP8 anytime in the future?
     
  12. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi g3tinmybelly,
    We have such plans, but currently there are no estimations for it. We will hardly add WP8 support until October.

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Aug 14, 2015
  13. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    UTNotifications 1.3 is now available!

    Changes:
    - Android grouped notifications.
    - Android option for showing notifications only if app is not running or is in background.
    - Bugfixes
     
  14. ritschie

    ritschie

    Joined:
    Sep 25, 2012
    Posts:
    2
    Hi, I'm new to Notifications and Android, but got it up running really fast and easy. Thanks for this great plugin.
    iOS works very well, but I have a problem on Android:
    I'm sending notifications from nodejs with node-gcm. When the android device recieves the notification, the app crashes, even when it's in background.
    Logcat says this:

    D/PowerManagerService( 503): acquireWakeLock(4186ece8): PARTIAL_WAKE_LOCK , tag=GTALK_CONN, flags=0x1, pid=4865, uid=10023

    D/PowerManagerService( 503): releaseWakeLock(4186ece8): PARTIAL_WAKE_LOCK , tag=GTALK_CONN, flags=0x1

    D/PowerManagerService( 503): acquireWakeLock(4182e240): PARTIAL_WAKE_LOCK , tag=GTALK_CONN, flags=0x1, pid=4865, uid=10023

    D/PowerManagerService( 503): acquireWakeLock(41817648): PARTIAL_WAKE_LOCK , tag=GOOGLE_C2DM, flags=0x1, pid=4865, uid=10023

    D/PowerManagerService( 503): releaseWakeLock(4182e240): PARTIAL_WAKE_LOCK , tag=GTALK_CONN, flags=0x1

    D/PowerManagerService( 503): acquireWakeLock(416ca4d0): PARTIAL_WAKE_LOCK , tag=wake:com.abda.quizzin/universal.tools.notifications.GcmIntentService, flags=0x1, pid=24347, uid=10191

    D/PowerManagerService( 503): releaseWakeLock(41817648): PARTIAL_WAKE_LOCK , tag=GOOGLE_C2DM, flags=0x1

    W/dalvikvm(24347): threadid=13: thread exiting with uncaught exception (group=0x40dcaa08)

    D/PowerManagerService( 503): releaseWakeLock(416ca4d0): PARTIAL_WAKE_LOCK , tag=wake:com.abda.quizzin/universal.tools.notifications.GcmIntentService, flags=0x1

    E/AndroidRuntime(24347): FATAL EXCEPTION: IntentService[GcmIntentService]

    E/AndroidRuntime(24347): java.lang.Error: FATAL EXCEPTION [IntentService[GcmIntentService]]

    E/AndroidRuntime(24347): Unity version : 5.1.1f1

    E/AndroidRuntime(24347): Device model : HTC HTC One X

    E/AndroidRuntime(24347): Device fingerprint: htc/htc_europe/endeavoru:4.2.2/JDQ39/231174.4:user/release-keys

    E/AndroidRuntime(24347):

    E/AndroidRuntime(24347): Caused by: java.lang.NullPointerException

    E/AndroidRuntime(24347): at libcore.net.UriCodec.decode(UriCodec.java:153)

    E/AndroidRuntime(24347): at java.net.URLDecoder.decode(URLDecoder.java:45)

    E/AndroidRuntime(24347): at universal.tools.notifications.Manager.prepareNotification(Manager.java:298)

    E/AndroidRuntime(24347): at universal.tools.notifications.Manager.postNotification(Manager.java:138)

    E/AndroidRuntime(24347): at universal.tools.notifications.Manager.postPushNotification(Manager.java:154)

    E/AndroidRuntime(24347): at universal.tools.notifications.GcmIntentService.onHandleIntent(GcmIntentService.java:24)

    E/AndroidRuntime(24347): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)

    E/AndroidRuntime(24347): at android.os.Handler.dispatchMessage(Handler.java:99)

    E/AndroidRuntime(24347): at android.os.Looper.loop(Looper.java:158)

    E/AndroidRuntime(24347): at android.os.HandlerThread.run(HandlerThread.java:60)

    E/EmbeddedLogger( 503): App crashed! Process: com.abda.quizzin

    E/EmbeddedLogger( 503): App crashed! Package: com.abda.quizzin v1 (1.0)

    W/ContextImpl( 503): Failed to check package's status, pkg:com.abda.quizzin

    W/ContextImpl( 503): android.content.pm.PackageManager$NameNotFoundException: Application package com.abda.quizzin is uninstalling.

    W/ContextImpl( 503): at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2028)

    W/ContextImpl( 503): at android.app.ContextImpl.createPackageContext(ContextImpl.java:2006)

    W/ContextImpl( 503): at com.htc.server.embedded.EmbeddedLogger.onHandleApplicationCrashV2(EmbeddedLogger.java:66)

    W/ContextImpl( 503): at com.android.server.am.HtcAmsCallbackManager.handleApplicationCrash(HtcAmsCallbackManager.java:858)

    W/ContextImpl( 503): at com.android.server.am.HtcAmsCallbackManager.handleAmsCallback(HtcAmsCallbackManager.java:312)

    W/ContextImpl( 503): at com.android.server.am.HtcAmsCallbackManager.access$200(HtcAmsCallbackManager.java:34)

    W/ContextImpl( 503): at com.android.server.am.HtcAmsCallbackManager$WorkingHandler.dispatchMessage(HtcAmsCallbackManager.java:246)

    W/ContextImpl( 503): at android.os.Looper.loop(Looper.java:158)

    W/ContextImpl( 503): at android.os.HandlerThread.run(HandlerThread.java:60)


    Have I missed something or is this a bug?
    Thanks.
     
  15. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi ritschie,

    Thank you for purchasing UTNotifications!

    A thing with both Android push notifications services is that they don't specify a standard message format because messages are handled not by the operating system but by the client code (in our case by UTNotifications). So the message format should match the format expected by UTNotifications. It requires at least two string fields: "title" and "text". Please also note that in order to support non-English Unicode characters the both fields' values should be URL-Encoded.

    You can find a reference code for pushing notifications for UTNotifications at Assets/UTNotifications/DemoServer/src/DemoServer/PushNotificator.java.

    Best regards,
    Yuriy, Universal Tools team.
     
  16. ritschie

    ritschie

    Joined:
    Sep 25, 2012
    Posts:
    2
    Thank you, this directed me to the problem, which is the message format generated by node-gcm

    node-gcm sends:

    "notification": {*** },
    "registration_ids": [****]

    and puts all message content in the notification node.
    so I had to add the data node.

    For everyone else, facing this:
    Simply add
    body.data = body.notification;
    in line 41 of /node-gcm/lib/sender.js (before var requestBody = JSON.stringify(body); )
    This copies the notification node in a new data node, which is required by UTNotificiations.

    Thank you again, this saved me a lot of time.
     
    Last edited: Aug 28, 2015
    Yuriy-Ivanov likes this.
  17. amer_na

    amer_na

    Joined:
    Jul 27, 2015
    Posts:
    1
    Hi Yuriy Ivanov
    thanks for the cool Plug In
    i just downloaded and need some help please..
    and using this script
    void Start () {
    UTNotifications.Manager.Instance.SetNotificationsEnabled (false);
    }
    void OnApplicationPause () {
    UTNotifications.Manager.Instance.SetNotificationsEnabled (true);
    UTNotifications.Manager.Instance.ScheduleNotification(150,"Hello","Come on Play",1,null,"first_not");
    UTNotifications.Manager.Instance.ScheduleNotification(10,"Hello2","Come on Play 2",2,null,"first_not");

    }
    and i have tow questions...
    first is that the notification does come after 10 seconds and if i close the app it doesn't open the app
    and if i leave it in background it resume the app my question i why it doesn't open the app after i close it ??
    the second one is that i turn on the check box on edit>project settings>UTNotifications>Restore notifications on Reboot
    but the second message doesn't appear to come and the app is closed although it did gave me a permission that says "Run at start-up"
    i really appreciate it if you can solve my problems...
     
  18. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi amer_na,

    Thank you for using UTNotifications!

    Before continuing answering your questions, I see that you don't Initialize UTNotifications. Have you just skipped it in the sample code above or did you really forget to call it? A call of UTNotifications.Manager.Instance.Initialize is mandatory. Some basic functional will be available even without it, but most of the features require it.

    + Advice: you don't have to use SetNotificationsEnabled(false) / SetNotificationsEnabled(true) in this case: there is a special option in the UTNotifications settings (Edit -> Project Settings -> UTNotifications -> Common Android Settings -> Show Notifications). You can just choose WHEN_CLOSED_OR_IN_BACKGROUND there.

    1. first is that the notification does come after 10 seconds and if i close the app it doesn't open the app and if i leave it in background it resume the app my question i why it doesn't open the app after i close it ??
    Notifications of any kind don't (and shouldn't) run the application automatically, they are just shown. The application will be started when user clicks on a notification, not before that. This is by design. That's how notifications should work.
    If I get your question wrong and you mean that notifications don't appear after the application is killed in Android, then it is also simple. The reason is that OnApplicationPause is not called when you kill an application in Android, so UTNotifications stays disabled.

    Also, you use ScheduleNotification and not ScheduleNotificationRepeating so each notification will be shown just once. If it was already shown, then after closing or hiding the application you will not receive any new notifications.

    2. the second one is that i turn on the check box on edit>project settings>UTNotifications>Restore notifications on Reboot but the second message doesn't appear to come and the app is closed although it did gave me a permission that says "Run at start-up"
    The reason is too little triggerInSeconds value: 10 seconds. When you reboot an Android device it happens not instantly but takes some time. The problem is that notifications can still happen while a reboot is in progress but you will not see anything already. As you scheduled the notifications without repeating it happens just once (when rebooting) and will not be shown again after the reboot.

    Best regards,
    Yuriy, Universal Tools team.
     
  19. chirhotec

    chirhotec

    Joined:
    Mar 30, 2010
    Posts:
    47
    Google added support for sending notifications to iOS through their GCM service. However, this seems to require that the iOS application register with both APNS and GCM. Does this plugin support that feature? We are looking to find a plugin that supports this mechanism, so that our server code only needs to send notifications through GCM and not interface with APNS directly.

    For reference on this GCM feature: https://developers.google.com/cloud-messaging/ios/client
     
  20. personOneMillion

    personOneMillion

    Joined:
    Jan 24, 2015
    Posts:
    1
    Yuriy,

    1. Has UTNotifications been updated to reflect google's changes in the last few months: https://developers.google.com/cloud-messaging ?

    2. How does UTNotfications handle IOS, does it use google cloud messaging to contact Apple Notification Server, or does it contact ANS separately, in a way not related to GCM?

    Thanks!
     
  21. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi chirhotec. Hi personOneMillion.

    UTNotifications use GCM on Android only, iOS is implemented using APNS. But it is not really complicated to support APNS in addition to GCM on a server side. UTNotifications' DemoServer includes an example how it can be done.

    On Android, it works well with the latest version of GCM.

    Best regards,
    Yuriy, Universal Tools team.
     
  22. mwk888

    mwk888

    Joined:
    Jan 26, 2014
    Posts:
    16
    Hi Yuriy, I have GCM notification working, a few questions:

    I tried adding my own custom properties to the GCM "data" block (I used "message_type" and "message_json") but then the Android client ignored the notification (nothing displayed, no call to OnNotificationsReceived). I thought we could add custom fields and they would be passed through ReceivedNotification.userData? Am I doing that wrong?

    Related question -- I assumed the tag "server_message" in the demo server was just an example tag and we could use whatever we want, or is that tag special?

    A more general question, I'm interested why you do notification display via UTNotification code instead of using the platform-specific Android "notification" { title, body etc }? Reason is I need localization of title/text, seems you assume localization on the server, correct? I had considered localization on client (send string tag + parameters) but that has complexity too, so wanted to hear your recommendation for best localization approach to work across all three push notification systems.
     
  23. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi mwk888,

    1. I tried adding my own custom properties to the GCM "data" block (I used "message_type" and "message_json") but then the Android client ignored the notification (nothing displayed, no call to OnNotificationsReceived). I thought we could add custom fields and they would be passed through ReceivedNotification.userData? Am I doing that wrong?
    You did everything right, all extra fields of "data" are handled as user data and should be accessable with ReceivedNotification.userData. But it currently supports only string values, so you have to encode the values to strings.

    2. Related question -- I assumed the tag "server_message" in the demo server was just an example tag and we could use whatever we want, or is that tag special?
    You assumed everything correctly - it is just an example tag, you can use anything you like.

    3. A more general question, I'm interested why you do notification display via UTNotification code instead of using the platform-specific Android "notification" { title, body etc }? Reason is I need localization of title/text, seems you assume localization on the server, correct? I had considered localization on client (send string tag + parameters) but that has complexity too, so wanted to hear your recommendation for best localization approach to work across all three push notification systems.
    Maybe I'm a bit out of date (newest versions of GCM can have more options here), but in general Google Cloud Messaging doesn't specify any format for passing title & body. You always have to handle incoming messages on your own. There is also no automated localization. We localize text values on a server side. If you wish, you can implement it on a client side by modifying the UTNotifications Android native plugin (see Assets/Plugins/Android/UTNotifications/src/universal/tools/notifications/Manager.java, static void postPushNotification(Context context, Bundle extras)). F.e. you can pass localization keys instead of title and text and localize them before passing to
    static void postNotification(Context context, String title, String text, int id, Bundle userData, String notificationProfile, boolean repeatedOrNotScheduled).

    I prefer server side localization because it doesn't restrict one to show only the values supported by the client (so you don't have to update the client to show new kinds of notifications).

    Best regards,
    Yuriy, Universal Tools team.
     
  24. mwk888

    mwk888

    Joined:
    Jan 26, 2014
    Posts:
    16
    Turns out the client delivery problem was specific to the tag "message_type". Even though GCM response status is "success" I think it breaks GCM delivery. I notice the XMPP protocol mentions "message_type" so I bet it's a reserved token for HTTP also, although apparently undocumented.
     
    Yuriy-Ivanov likes this.
  25. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,010
    Hi,

    I'm working on a simple RSS feed app that has various categories users can subscribe to. The news will be provided on a simple website and once the staff add the news I'd like them to send notifications to the app so users know when there's new news.

    I'm new to notifications, so I'm not sure if your package can be used but basically can I somehow specify what notifications are received on the device? Also, are there any instructions on the web server? Or perhaps a wordpress plugin? Thanks
     
  26. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi derkoi,

    Yes, push notifications are exactly what you need. You can specify the target clients for each notification when sending it on a server side. Each client is being identified with a unique "registration id" which you get from UTNotifications and send to your server with any additional info to identify a specific user. Or you can use registration id itself as a user unique id and subscribe/unsubscribe to any categories using that id.

    UTNotifications provide complete ready to use push notifications client side and a reference server side (DemoServer) written in Java. But there are numbers of solutions for any server technology and language, which are fully compatible to UTNotifications because it relies on native system APIs, such as APNS for iOS & GCM/ADM for Android.
    F.e. there are indeed some Wordpress plugins providing that functionality such as EasyAPNS and WP Google Cloud Messaging.

    Feel free to ask about any details or advices, I'm always happy to help!

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Oct 8, 2015
    derkoi likes this.
  27. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,010
    Thanks for your reply!
     
  28. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Glad to inform you, that we're working on adding Windows Phone 8.1 / Windows Store / Windows Universal build support in the asset.
    Current estimation is that the feature will be available in the first half of November.
     
  29. soulburner

    soulburner

    Joined:
    Mar 25, 2012
    Posts:
    147
    We want to track the application launch from the local notification (when you tap on your local notification and the application launches).

    Can I do it with your plugin? (I need to track not only the fact of a launch, but the id or text of a specific notification).
     
  30. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi soulburner,

    Currently you can handle a list of the received and not yet handled notifications (both local/scheduled and push) but you can't tell which one (or none) was clicked. You receive all the info on each notification, including id, title, text, notification profile and any custom user data attached. See UTNotifications.Manager.OnNotificationsReceived.

    I've added a feature request to make it possible directly in the upcoming update. If you really need this functional now you can modify provided Android native plugin code to handle the Intent which started the app, on iOS you'll now have to manually edit the objective-c code generated by Unity (see http://stackoverflow.com/questions/...n-ios-application-on-tap-of-push-notification). Or you can just wait for the upcoming release of UTNotifications (in November).

    Best regards,
    Yuriy, Universal Tools team.
     
  31. Uli_Okm

    Uli_Okm

    Joined:
    Jul 10, 2012
    Posts:
    86
    Hi Yuriy,

    I'm not reaaaly into mobile development, but i'm trying to do a small and unconvetional test app with push messages, can you clarify if i can use your asset?
    - I have an app that will be distributed directly through .apk (outside PlayStore), and it only needs to send push messages at specific dates (hard coded, using the phone date.time). Is this type of interaction possible, without the use of any server-side communication?
    Thanks
     
  32. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi Uli_Okm,

    If notifications content can be also known on a client side or at least can be received from some server in advance, then you don't even need to use push notifications, just local scheduled ones are enough. F.e. see UTNotifications.Manager.ScheduleNotification and UTNotifications.Manager.ScheduleNotificationRepeating. And UTNotifications do a good job for you in that regards. F.e., Android doesn't store scheduled notification when device is rebooted, but UTNotifications do it automatically (which wasn't trivial to implement).

    In case if notifications should show some text which is not known in advance (i.e. should be received from Internet directly in the moment of posting a notification) you'll have to use push notifications. Google Cloud Messaging (GCM) supports distribution outside of the Google Play (works on most Android devices, except of Amazon ones - it's impossible to use Amazon's ADM without deployment with their own App Store). Both GCM and ADM are supported by UTNotifications.
    But you'll need a server for storing specific clients' push notifications registration ids and then posting notifications to them (which in fact can be done directly from a client but in most cases doesn't make sense).

    P.S. Well, to tell the truth it's possible to retrieve any data even directly before showing a local notification on Android, so you'll not have to use push notifications even in that case, but you'll have to modify the Android native plugin code, which we also provide.

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Oct 20, 2015
    Uli_Okm likes this.
  33. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi,

    As many of you requested, new version 1.4 of UTNotifications supporting Windows Phone 8.1 / Windows 8.1 / Universal 8.1 / Universal 10 has just been uploaded to the asset store!
    It will be available when Unity complete its review.
    If you want to have it earlier, please write me at universal.tools.contact@gmail.com, attaching your Invoice No., and I'll send you the update.

    Best regards,
    Yuriy, Universal Tools team.
     
  34. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Good news everyone!

    The brand-new UTNotifications 1.4 with Windows Store (Windows Phone 8.1 / Windows 8.1 / Universal 8.1 / Universal 10) support is available at the Asset Store!
    Please note, that UTNotifications support for Windows Store requires you to use Unity 5.0+, while Android & iOS versions work fine with Unity 4.3+.
    Any feedback is very welcome!

    And we've already started working on a next update - 1.5. It will include handling clicks on notifications (not only just a list of all received notifications), better Android 6 support, including the badges and some other improvements.
    If you want some other features or changes to be included in the next update, please create a feature request.

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Nov 11, 2015
  35. Jlpeebles

    Jlpeebles

    Joined:
    Oct 21, 2012
    Posts:
    54
    From my experience Unity's built in NotificationServices.remoteNotifications ONLY returns a push notification that has been clicked on and that NotificationServices fails to provide a way to view the other push notifications. At any rate will be buying this package when the next update goes live!
     
  36. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Yes, you are right: that's true for iOS.
     
  37. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,010
    Hi,

    I purchased your plugin and I've set everything up to post notifications on my Android device. I'm using this Wordpress plugin to send notifications, they're working as expected apart from the message I receive is:



    I can't figure out how to read the remainder of the message, so all I know is it's the WRONG MESSAGE FORMAT!

    I realise this might not be an issue with your plugin but figured I'd ask here anyway.

    Thanks
     
  38. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi derkoi,

    It's simple: the "WRONG MESSAGE FORMAT!" means that the push notification json sent by that GEO-fence Worpress plugin doesn't contain "title" and "text" values.
    Expected message format is:
    Code (CSharp):
    1.             "data":
    2.             {
    3.                 "title":"<Title>",
    4.                 "text":"<Text>",
    5.                 "<User data key 1>":"<User data value 1>",
    6.                 ...
    7.             }
    Note that both <Title> & <Text> values should be URL-Encoded in order to support non-English characters.

    Best regards,
    Yuriy, Universal Tools team.
     
  39. MyMusicTeacher1

    MyMusicTeacher1

    Joined:
    Sep 15, 2015
    Posts:
    3
    Hi,

    Thank you for the asset.
    I just have a problem : after I've imported the asset, I can't generate any more the android apk file.
    The build stops at "Converting classes to dex format" and there is the following error in the unity console :

    CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
    C:\Program Files\Java\jdk1.8.0_45\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/MMTPC2/AppData/Local/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "J:\Unity\Editor\Data\PlaybackEngines\androidplayer/Tools\sdktools.jar" -

    stderr[
    warning: Ignoring InnerClasses attribute for an anonymous inner class
    (org.apache.commons.httpclient.HttpMethodBase$1) that doesn't come with an
    associated EnclosingMethod attribute. This class was probably produced by a
    compiler that did not target the modern .class file format. The recommended
    solution is to recompile the class from source, using an up-to-date compiler
    and without specifying any "-target" type options. The consequence of ignoring
    this warning is that reflective operations on this class will incorrectly
    indicate that it is *not* an inner class.
    warning: Ignoring InnerClasses attribute for an anonymous inner class
    (org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$1) that doesn't come with an
    associated EnclosingMethod attribute. This class was probably produced by a
    compiler that did not target the modern .class file format. The recommended
    solution is to recompile the class from source, using an up-to-date compiler
    and without specifying any "-target" type options. The consequence of ignoring
    this warning is that reflective operations on this class will incorrectly
    indicate that it is *not* an inner class.
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/InterpolatorRes;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/RawRes;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/FractionRes;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/NonNull;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/PluralsRes;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AttrRes;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/DrawableRes;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AnyRes;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/IntegerRes;

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at SDKMain.main(SDKMain.java:129)
    Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
    ... 9 more
    ]
    stdout[
    processing archive bin\classes.jar...
    processing com/unity3d/player/a$1.class...
    processing com/unity3d/player/a$2.class...
    processing com/unity3d/player/a$a.class...
    processing com/unity3d/player/a.class...
    processing com/unity3d/player/b$1.class...
    processing com/unity3d/player/b$2.class...
    processing com/unity3d/player/b.class...
    processing com/unity3d/player/c.class...
    processing com/unity3d/player/d$1.class...
    processing com/unity3d/player/d$2.class...
    processing com/unity3d/player/d.class...
    processing com/unity3d/player/e.class...
    processing com/unity3d/player/f.class...
    processing com/unity3d/player/g.class...
    processing com/unity3d/player/h.class...
    processing com/unity3d/player/i.class...
    processing com/unity3d/player/j$1.class...
    processing com/unity3d/player/j$2$1$1.class...
    processing com/unity3d/player/j$2$1.class...
    processing com/unity3d/player/j$2.class...
    processing com/unity3d/player/j.class...
    processing com/unity3d/player/k$1.class...
    processing com/unity3d/player/k.class...
    processing com/unity3d/player/l.class...
    processing com/unity3d/player/m.class...
    processing com/unity3d/player/n$1.class...
    processing com/unity3d/player/n.class...
    processing com/unity3d/player/NativeLoader.class...
    processing com/unity3d/player/o.class...
    processing com/unity3d/player/ReflectionHelper$1.class...
    processing com/unity3d/player/ReflectionHelper$a.class...
    processing com/unity3d/player/ReflectionHelper.class...
    processing com/unity3d/player/p.class...
    processing com/unity3d/player/q$1.class...
    processing com/unity3d/player/q$2.class...
    processing com/unity3d/player/q$3.class...
    processing com/unity3d/player/q.class...
    processing com/unity3d/player/r.class...
    processing com/unity3d/player/s.class...
    processing com/unity3d/player/UnityPlayer$1.class...
    processing com/unity3d/player/UnityPlayer$2.class...
    processing com/unity3d/player/UnityPlayer$4.class...
    processing com/unity3d/player/UnityPlayer$5.class...
    processing com/unity3d/player/UnityPlayer$6.class...
    processing com/unity3d/player/UnityPlayer$7.class...
    processing com/unity3d/player/UnityPlayer$8.class...
    processing com/unity3d/player/UnityPlayer$9.class...
    processing com/unity3d/player/UnityPlayer$10.class...
    processing com/unity3d/player/UnityPlayer$11.class...
    processing com/unity3d/player/UnityPlayer$12.class...
    processing com/unity3d/player/UnityPlayer$13$1.class...
    processing com/unity3d/player/UnityPlayer$13.class...
    processing com/unity3d/player/UnityPlayer$3.class...
    processing com/unity3d/player/UnityPlayer$14.class...
    processing com/unity3d/player/UnityPlayer$15.class...
    processing com/unity3d/player/UnityPlayer$16.class...
    processing com/unity3d/player/UnityPlayer$17.class...
    processing com/unity3d/player/UnityPlayer$18.class...
    processing com/unity3d/player/UnityPlayer$19.class...
    processing com/unity3d/player/UnityPlayer$a.class...
    processing com/unity3d/player/UnityPlayer$b.class...
    processing com/unity3d/player/UnityPlayer$c.class...
    processing com/unity3d/player/UnityPlayer.class...
    processing com/unity3d/player/UnityPlayerActivity.class...
    processing com/unity3d/player/UnityPlayerNativeActivity.class...
    processing com/unity3d/player/UnityPlayerProxyActivity.class...
    processing com/unity3d/player/t.class...
    processing com/unity3d/player/u$1.class...
    processing com/unity3d/player/u.class...
    processing com/unity3d/player/WWW.class...
    processing org/fmod/FMODAudioDevice.class...
    processing org/fmod/a.class...
    processing bitter/jnibridge/JNIBridge$a.class...
    processing bitter/jnibridge/JNIBridge.class...
    processing bin\classes\.\com\facebook\android\Manifest$permission.class...
    processing bin\classes\.\com\facebook\android\Manifest.class...
    processing bin\classes\.\com\facebook\android\R$attr.class...
    processing bin\classes\.\com\facebook\android\R$color.class...
    processing bin\classes\.\com\facebook\android\R$dimen.class...
    processing bin\classes\.\com\facebook\android\R$drawable.class...
    processing bin\classes\.\com\facebook\android\R$id.class...
    processing bin\classes\.\com\facebook\android\R$integer.class...
    processing bin\classes\.\com\facebook\android\R$layout.class...
    processing bin\classes\.\com\facebook\android\R$raw.class...
    processing bin\classes\.\com\facebook\android\R$string.class...
    processing bin\classes\.\com\facebook\android\R$style.class...
    processing bin\classes\.\com\facebook\android\R$styleable.class...
    processing bin\classes\.\com\facebook\android\R.class...
    processing bin\classes\.\com\facebook\Manifest$permission.class...
    processing bin\classes\.\com\facebook\Manifest.class...
    processing bin\classes\.\com\facebook\R$attr.class...
    processing bin\classes\.\com\facebook\R$color.class...
    processing bin\classes\.\com\facebook\R$dimen.class...
    processing bin\classes\.\com\facebook\R$drawable.class...
    processing bin\classes\.\com\facebook\R$id.class...
    processing bin\classes\.\com\facebook\R$integer.class...
    processing bin\classes\.\com\facebook\R$layout.class...
    processing bin\classes\.\com\facebook\R$raw.class...
    processing bin\classes\.\com\facebook\R$string.class...
    processing bin\classes\.\com\facebook\R$style.class...
    processing bin\classes\.\com\facebook\R$styleable.class...
    processing bin\classes\.\com\facebook\R.class...
    processing bin\classes\.\com\google\android\gms\Manifest$permission.class...
    processing bin\classes\.\com\google\android\gms\Manifest.class...
    processing bin\classes\.\com\google\android\gms\R$attr.class...
    processing bin\classes\.\com\google\android\gms\R$color.class...
    processing bin\classes\.\com\google\android\gms\R$dimen.class...
    processing bin\classes\.\com\google\android\gms\R$drawable.class...
    processing bin\classes\.\com\google\android\gms\R$id.class...
    processing bin\classes\.\com\google\android\gms\R$integer.class...
    processing bin\classes\.\com\google\android\gms\R$layout.class...
    processing bin\classes\.\com\google\android\gms\R$raw.class...
    processing bin\classes\.\com\google\android\gms\R$string.class...
    processing bin\classes\.\com\google\android\gms\R$style.class...
    processing bin\classes\.\com\google\android\gms\R$styleable.class...
    processing bin\classes\.\com\google\android\gms\R.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\Manifest$permission.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\Manifest.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$attr.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$color.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$dimen.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$drawable.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$id.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$integer.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$layout.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$raw.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$string.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$style.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R$styleable.class...
    processing bin\classes\.\com\MyMusicTeacher\MyMusicTeacher\R.class...
    processing bin\classes\.\universal\tools\notifications\Manifest$permission.class...
    processing bin\classes\.\universal\tools\notifications\Manifest.class...
    processing bin\classes\.\universal\tools\notifications\R$attr.class...
    processing bin\classes\.\universal\tools\notifications\R$color.class...
    processing bin\classes\.\universal\tools\notifications\R$dimen.class...
    processing bin\classes\.\universal\tools\notifications\R$drawable.class...
    processing bin\classes\.\universal\tools\notifications\R$id.class...
    processing bin\classes\.\universal\tools\notifications\R$integer.class...
    processing bin\classes\.\universal\tools\notifications\R$layout.class...
    processing bin\classes\.\universal\tools\notifications\R$raw.class...
    processing bin\classes\.\universal\tools\notifications\R$string.class...
    processing bin\classes\.\universal\tools\notifications\R$style.class...
    processing bin\classes\.\universal\tools\notifications\R$styleable.class...
    processing bin\classes\.\universal\tools\notifications\R.class...
    processing archive plugins\.\android-support-v4.jar...
    ignored resource META-INF/
    ignored resource META-INF/MANIFEST.MF
    ignored resource android/
    ignored resource android/support/
    ignored resource android/support/v4/
    ignored resource android/support/v4/util/
    processing android/support/v4/util/MapCollections$ArrayIterator.class...
    processing android/support/v4/util/MapCollections$KeySet.class...
    processing android/support/v4/util/MapCollections$ValuesCollection.class...
    processing android/support/v4/util/Pair.class...
    processing android/support/v4/util/Pools.class...
    processing android/support/v4/util/MapCollections$EntrySet.class...
    processing android/support/v4/util/DebugUtils.class...
    processing android/support/v4/util/SimpleArrayMap.class...
    processing android/support/v4/util/ArrayMap.class...
    processing android/support/v4/util/MapCollections.class...
    processing android/support/v4/util/LongSparseArray.class...
    processing android/support/v4/util/Pools$Pool.class...
    processing android/support/v4/util/Pools$SimplePool.class...
    processing android/support/v4/util/LogWriter.class...
    processing android/support/v4/util/MapCollections$MapIterator.class...
    processing android/support/v4/util/CircularArray.class...
    processing android/support/v4/util/SparseArrayCompat.class...
    processing android/support/v4/util/ContainerHelpers.class...
    processing android/support/v4/util/Pools$SynchronizedPool.class...
    processing android/support/v4/util/ArrayMap$1.class...
    processing android/support/v4/util/CircularIntArray.class...
    processing android/support/v4/util/LruCache.class...
    processing android/support/v4/util/TimeUtils.class...
    processing android/support/v4/util/AtomicFile.class...
    ignored resource android/support/v4/graphics/
    processing android/support/v4/graphics/BitmapCompat$BaseBitmapImpl.class...
    processing android/support/v4/graphics/BitmapCompatKitKat.class...
    ignored resource android/support/v4/graphics/drawable/
    processing android/support/v4/graphics/drawable/DrawableCompatHoneycomb.class...
    processing android/support/v4/graphics/drawable/DrawableCompatBase.class...
    processing android/support/v4/graphics/drawable/DrawableCompatLollipop.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$LollipopDrawableImpl.class...
    processing android/support/v4/graphics/drawable/DrawableCompatJellybeanMr1.class...
    processing android/support/v4/graphics/drawable/DrawableCompatKitKat.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$HoneycombDrawableImpl.class...
    processing android/support/v4/graphics/drawable/DrawableWrapper.class...
    processing android/support/v4/graphics/drawable/DrawableCompatApi22.class...
    processing android/support/v4/graphics/drawable/DrawableWrapperHoneycomb.class...
    processing android/support/v4/graphics/drawable/RoundedBitmapDrawable.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$BaseDrawableImpl.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$KitKatDrawableImpl.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$MDrawableImpl.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$JellybeanMr1DrawableImpl.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$DrawableImpl.class...
    processing android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory$DefaultRoundedBitmapDrawable.class...
    processing android/support/v4/graphics/drawable/DrawableCompatApi23.class...
    processing android/support/v4/graphics/drawable/DrawableCompat$LollipopMr1DrawableImpl.class...
    processing android/support/v4/graphics/drawable/DrawableWrapperLollipop.class...
    processing android/support/v4/graphics/drawable/DrawableCompat.class...
    processing android/support/v4/graphics/drawable/DrawableWrapperDonut.class...
    processing android/support/v4/graphics/drawable/DrawableWrapperKitKat.class...
    processing android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory.class...
    processing android/support/v4/graphics/drawable/RoundedBitmapDrawable21.class...
    processing android/support/v4/graphics/BitmapCompat$KitKatBitmapCompatImpl.class...
    processing android/support/v4/graphics/BitmapCompat$BitmapImpl.class...
    processing android/support/v4/graphics/BitmapCompat$HcMr1BitmapCompatImpl.class...
    processing android/support/v4/graphics/BitmapCompat$JbMr2BitmapCompatImpl.class...
    processing android/support/v4/graphics/ColorUtils.class...
    processing android/support/v4/graphics/BitmapCompat.class...
    processing android/support/v4/graphics/BitmapCompatJellybeanMR2.class...
    processing android/support/v4/graphics/BitmapCo<message truncated>

    Could you help me ?
    Thank you.
     
  40. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi MyMusicTeacher1,

    The provided Unity console log says that you have two copies of the android support library (one copy came with UTNotifications, and one with another plugin). You can easily fix it by deleting UTNotifications' copy: just delete the file Assets/Plugins/Android/UTNotifications/libs/android-support-v4.jar. It should help.

    Best regards,
    Yuriy, Universal Tools team.
     
  41. Jlpeebles

    Jlpeebles

    Joined:
    Oct 21, 2012
    Posts:
    54
    How is version 1.5 coming along?
     
  42. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi Jlpeebles,

    It's in progress: Windows Store support in Unity 4 is done, notifications clicks handling is done for Android, in progress for Windows Store. Then we'll try to get either all and clicked notifications for iOS, then update some docs and then the asset will be updated. If you need some of currently-done stuff asap, please write to universal.tools.contact@gmail.com, attach the purchase receipt and we'll send you the current version.

    Best regards,
    Yuriy, Universal Tools team.
     
  43. MyMusicTeacher1

    MyMusicTeacher1

    Joined:
    Sep 15, 2015
    Posts:
    3
    Thank you, it works !

    Regards.
     
  44. Fournux

    Fournux

    Joined:
    Jul 2, 2015
    Posts:
    1
    Hi,

    I purchased your asset, thank you it works great on IOS.

    But on android when I send a push notification with my server; if the app is launched it crashes "The application had to exit".
    When the application is not launched, nothing happens.

    When I look to the logcat of my android device, I can see that a java exception is thrown when the device receives a GCM message.

    I/GCM ( 1432): GCM message com.Company.Product 0:1449758711696935%4538aabcf9fd7ecd

    W/ActivityManager( 909): userId = 0, bbcId = -10000

    W/ActivityManager( 909): NORMAL SET : dst_category = 1023, src_allowCategory = 0,701-1023

    W/ActivityManager( 909): NORMAL SET : srcAppInfo.processName = com.google.android.gms, destAppInfo.processName = com.Company.Product

    I/art (23103): Rejecting re-init on previously-failed class java.lang.Class<universal.tools.notifications.GcmBroadcastReceiver>

    W/GCM-DMM ( 1432): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.Company.Product (has extras) }

    I/GCM ( 1432): GCM message com.Company.Product 0:1449758711764689%4538aabcf9fd7ecd

    D/AndroidRuntime(23103): Shutting down VM

    E/AndroidRuntime(23103): FATAL EXCEPTION: main

    E/AndroidRuntime(23103): Process: com.Company.Product, PID: 23103

    E/AndroidRuntime(23103): java.lang.Error: FATAL EXCEPTION [main]

    E/AndroidRuntime(23103): Unity version : 5.2.1f1

    E/AndroidRuntime(23103): Device model : samsung SM-T530

    E/AndroidRuntime(23103): Device fingerprint: samsung/matissewifixx/matissewifi:5.0.2/LRX22G/T530XXU1BOD8:user/release-keys

    E/AndroidRuntime(23103):

    E/AndroidRuntime(23103): Caused by: java.lang.RuntimeException: Unable to instantiate receiver universal.tools.notifications.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "universal.tools.notifications.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.Company.Product-1/base.apk"],nativeLibraryDirectories=[/data/app/com.Company.Product-1/lib/arm, /vendor/lib, /system/lib]]

    E/AndroidRuntime(23103): at android.app.ActivityThread.handleReceiver(ActivityThread.java:3100)

    E/AndroidRuntime(23103): at android.app.ActivityThread.access$1800(ActivityThread.java:181)

    E/AndroidRuntime(23103): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1553)

    E/AndroidRuntime(23103): at android.os.Handler.dispatchMessage(Handler.java:102)

    E/AndroidRuntime(23103): at android.os.Looper.loop(Looper.java:145)

    E/AndroidRuntime(23103): at android.app.ActivityThread.main(ActivityThread.java:6134)

    E/AndroidRuntime(23103): at java.lang.reflect.Method.invoke(Native Method)

    E/AndroidRuntime(23103): at java.lang.reflect.Method.invoke(Method.java:372)

    E/AndroidRuntime(23103): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)

    E/AndroidRuntime(23103): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

    E/AndroidRuntime(23103): Caused by: java.lang.ClassNotFoundException: Didn't find class "universal.tools.notifications.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.Company.Product-1/base.apk"],nativeLibraryDirectories=[/data/app/com.Company.Product-1/lib/arm, /vendor/lib, /system/lib]]

    E/AndroidRuntime(23103): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

    E/AndroidRuntime(23103): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

    E/AndroidRuntime(23103): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

    E/AndroidRuntime(23103): at android.app.ActivityThread.handleReceiver(ActivityThread.java:3095)

    E/AndroidRuntime(23103): ... 9 more

    E/AndroidRuntime(23103): Suppressed: java.lang.NoClassDefFoundError: universal.tools.notifications.GcmBroadcastReceiver

    E/AndroidRuntime(23103): at dalvik.system.DexFile.defineClassNative(Native Method)

    E/AndroidRuntime(23103): at dalvik.system.DexFile.defineClass(DexFile.java:226)

    E/AndroidRuntime(23103): at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)

    E/AndroidRuntime(23103): at dalvik.system.DexPathList.findClass(DexPathList.java:321)

    E/AndroidRuntime(23103): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)

    E/AndroidRuntime(23103): ... 12 more

    E/AndroidRuntime(23103): Suppressed: java.lang.ClassNotFoundException: universal.tools.notifications.GcmBroadcastReceiver

    E/AndroidRuntime(23103): at java.lang.Class.classForName(Native Method)

    E/AndroidRuntime(23103): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

    E/AndroidRuntime(23103): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

    E/AndroidRuntime(23103): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

    E/AndroidRuntime(23103): ... 11 more

    E/AndroidRuntime(23103): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

    V/ApplicationPolicy( 909): isApplicationStateBlocked userId 0 pkgname com.Company.Product

    W/ActivityManager( 909): Force finishing activity com.Company.Product/com.unity3d.player.UnityPlayerActivity

    Do you know where the probleme is ?

    Thanks.
    Regards.
     
  45. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi Fournux,

    Please, send the built .apk us to universal.tools.contact@gmail.com so will try to reproduce it, check the manifest and so on to help you asap.

    Thank you and best regards,
    Yuriy, Universal Tools team.
     
  46. ClementTodd

    ClementTodd

    Joined:
    Jun 16, 2015
    Posts:
    3
    Hello, I bought and implemented UTNotifications yesterday and had a much more pleasant experience than I've had when implementing push notifications natively in the past, so thank you very much! However, my client is asking for a notification badge on the app icon on Android, and I haven't been able to find a way of doing this conveniently through your plugin. The only mention I've found of badges in your documentation are the Manager.GetBadge() and Manager.SetBadge(), both of which are noted to be iOS-only. What are my options?
     
  47. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi ClementTodd,

    Sadly, right now badge numbers is iOS-only feature. Android itself doesn't support app icon badges: f.e. see http://stackoverflow.com/questions/...add-a-badge-to-an-application-icon-in-android. We have plans for providing some badges functionality for some Android devices, but it, unfortunately, is not a simple thing and can't be done universally - it will not work on most Android devices (except of ones with custom shells with badges support, such as Samsung, LG, Sony & HTC). In addition, many Android users even on that devices have 3rd party shells installed, which don't support badges too.
    If you want this functionality available ASAP, you may try to implement it using ShortcutBadger library on your own: see https://github.com/leolin310148/ShortcutBadger. UTNotifications include full source code of its Android native plugin, so you can modify it as you like. We expect to provide this feature in UTNotifications for some devices at January or February.

    P.S. I created an issue so you can track the current status and release plan of this feature.

    Thank you and best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Dec 16, 2015
  48. cutoren

    cutoren

    Joined:
    Mar 4, 2014
    Posts:
    4
    Hi Yuriy,
    Is UTNotifications able to fire notification at specified DateTime, instead of triggering in seconds later?

    For example,
    I want to fire a notification at 2015/12/24 23:00:00 and now its 2015/12/18 11:52:00.
    Would I have to calculate the seconds from now to that time, or there is any built in function for me to use?
     
  49. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    466
    Hi cutoren,

    Currently there is no such helper function, so you'll have to use:
    Code (CSharp):
    1. (int)(new System.DateTime(2015, 12, 24, 23, 0, 0) - System.DateTime.Now).TotalSeconds
    (you can create your own helper function out of it).

    But your idea is cool, I added an issue to implement this functionality in further updates.

    Thank you and best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Dec 18, 2015
  50. cutoren

    cutoren

    Joined:
    Mar 4, 2014
    Posts:
    4
    Hi Yuriy,

    Thanks for your immediate reply. I had read your reply that day but I have forgotten to reply you. Okay, I shall use your suggested calculation for the moment.