Push Notification Icon Location For Unity Obsolete

0 votes

Hi there!  So I'm currently have an issue with an error message in Unity regarding the icon for push notifications.  Here is the error:

 

OBSOLETE - Providing Android resources in Assets/Plugins/Android/res is deprecated, please move your resources to an Android Library. See "Building Plugins for Android" section of the Manual.
UnityEditor.HostView:OnGUI()

I want to avoid learning how to create plugins for the most part so I can focus on this game itself, but if it's necessary, I'll do it.

The lines in the AndroidManifest file I feel are peritnent are these.  I can't post the whole thing because of the character limit in the forums:

 

<application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name" >
		 <activity android:name="com.unity3d.player.UnityPlayerActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="portrait">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>

Thanks in advance for all of your help!

asked Dec 16, 2015 in App42 Cloud API-BaaS by null (23 points)

1 Answer

+1 vote
Hello Developer,

Concern team is looking into it, will update you very soon regarding this.

Thanks for your patience.

 

Regards,

Himanshu Sharma
answered Dec 16, 2015 by hs00105 (2,005 points)
I was able to change the icon to the Unity logo (somehow) by using a Unity asset called Android Native Plugin.  It's a very messy plugin, and it doesn't change the push notification icon to what I need it to be.  It only changes it to the Unity icon.

I'll be doing a few more tests with this to see exactly where it's getting the icon from.
So I found out a general 'hack' in order to get the notifications to work.  Android Native Plugin from the asset store swaps the icon that you specify as a push icon with the icon used for the application.  Once I realized that, I just changed the respective icons.  I still get the 'obsolete' error though
.

I'm still not pleased with how I have to do this, but I'll look into more to see if I can do it in a way that's not 'hacky'.
Hello Developer,

We hope every thing are working fine at your end, If you still face any issue then let us know. We are Happy to address your concern.

Regards,
Himanshu Sharma
Well, the 'hack' I was using caused there to be an icon, but no title in the push notification.  Now the icon is the default Android icon.  Should I open up another question thread?
We have updated our Unity Push sample earlier that shows application icon on notification. You can download the latest one from
https://github.com/shephertz/App42_Push_Sample_Unity.

Just change the app42pushService.jar file in Assets/Plugin/Android folder.
Let me know if more queries are there.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...