Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by omrip3 · Aug 28, 2015 at 11:11 AM · androidunity 5manifestparsepush notification

Parse push notification doesn't show

Hi,

For several days now, I'm trying to send push notifications from the parse system to my android device. I have read parse push notification guide and pepoles's questions and I just can't get this to work.

This is my manifest:

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.moveosoftware.flappydragon"
     android:versionCode="1"
     android:versionName="1.0">
 
   <uses-sdk android:minSdkVersion="10" />
 
   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
   <uses-permission android:name="android.permission.WAKE_LOCK" />
   <uses-permission android:name="android.permission.VIBRATE" />
   <uses-permission android:name="android.permission.GET_ACCOUNTS" />
   <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
   <permission android:protectionLevel="signature" android:name="com.moveosoftware.flappydragon.permission.C2D_MESSAGE" />
   <uses-permission android:name="com.moveosoftware.flappydragon.permission.C2D_MESSAGE" />
 
   <application android:label="com.moveosoftware.flappydragon" android:icon="@drawable/app_icon">
     <activity android:name="com.unity3d.player.UnityPlayerNativeActivity">
       <intent-filter>
         <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
     </activity>
 
     <receiver android:name="com.parse.ParsePushBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
       <intent-filter>
         <action android:name="com.google.android.c2dm.intent.RECEIVE" />
         <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
         <category android:name="com.moveosoftware.flappydragon" />
       </intent-filter>
     </receiver>
 
     <service android:name="com.parse.ParsePushService" />
   </application>
 </manifest>



My pushbehaviour settings:

   void Awake() {
         ParsePush.ParsePushNotificationReceived += (sender, args) => {
             #if UNITY_ANDROID
             AndroidJavaClass parseUnityHelper = new AndroidJavaClass("com.parse.ParseUnityHelper");
             AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
             AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("com.unity3d.player.UnityPlayerNativeActivity");
             // Call default behavior.
             parseUnityHelper.CallStatic("handleParsePushNotificationReceived", currentActivity, args.StringPayload);
             #endif
     };
   

and my installation setup:

 void Start() {
         //Parse Installation
         if (ParseInstallation.CurrentInstallation != null && !string.IsNullOrEmpty(ParseInstallation.CurrentInstallation.DeviceToken))
         {
             Debug.Log("Device Token : " + ParseInstallation.CurrentInstallation.DeviceToken);
         }
         else
         {
             var installation = ParseInstallation.CurrentInstallation;
             installation.Channels = new List<string> { "asxas" };
             installation.SaveAsync().ContinueWith(t => {
                 if (t.IsFaulted || t.IsCanceled)
                 {
                     Debug.Log("Push subscription failed.");
                 }
                 else
                 {
                     Debug.Log("Push subscription success.");
                 }
             });
 
             
             
             //installation.
         }
     }

Sorry about my bad language and thank you for reading this. I will very appreciate your help

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

does unity 5.3 android sms billing status require configuration changes ? 0 Answers

Using Parse with Unity and the Parse Initialize Behavior is causing Android Device to crash 0 Answers

[URGENT!]Android Manifest file keeps reverting changes after build! 0 Answers

Wake lock for android 2 Answers

Auto Lunch Android app 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges