Coder Social home page Coder Social logo

Comments (2)

thirdcoke avatar thirdcoke commented on July 18, 2024

I found the issue - program can't find program icon for notification.
You're using unity 5.2 so you must seen this

"OBSOLETE - Providing Android resources in Assets/Plugins/Android/res is deprecated, please move your resources to an Android Library"

So that's why the plugin doesn't work.
In Java source code you could see

builder.setSmallIcon(res.getIdentifier(s_icon, "drawable", context.getPackageName()));

That's the reason.
For more information about this piece of code please visit the website below, you'll understand what I'm talking about.
http://answers.unity3d.com/questions/398209/android-notification-in-a-plugin.html

If you provide a static int here such as "0x7f020000"

builder.setSmallIcon(0x7f020000);

You'll notice the plugin worked.

I'm trying to find a new way to get game icon now....

update:
try this:

builder.setSmallIcon(res.getIdentifier("app_icon", "drawable", context.getPackageName()));

from unity-android-notifications.

Agasper avatar Agasper commented on July 18, 2024

You can build plugin with you own icons, or still get obsolete warning

from unity-android-notifications.

Related Issues (20)

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.