Web Niraj
  • Facebook
  • Flickr
  • Github
  • Linkedin
  • Twitter
  • YouTube
Online portfolio, code examples and developer blog
  • Home
  • About Me
  • Contact Me
  • Portfolio
  • WordPress
Search the site...
  • Home
  • Blog
  • Parse Android SDK: Customise the Push Notification Icon

Parse Android SDK: Customise the Push Notification Icon

0

If you are using the Parse Android SDK in your mobile app, you are able to customise the push notification icon by updating your AndroidManifest.xml file. This method also applies if you are using Parse in a Cordova / PhoneGap app.

I’ve used this technique to customise the push notification icon in my Cordova app. I started by opening up the platforms/android/AndroidManifest.xml file. In between the <application ...></application> tags (preferable before the closing tag), I added the following line:

You can then drop in icons into the platforms/android/res/drawable-{$SIZE}/ folders (I named them push_icon.png to match the code above). The following icon sizes are needed in each of the specific folders:

  • platforms/android/res/drawable-mdpi/: 24px × 24px
  • platforms/android/res/drawable-hdpi/: 36px × 36px
  • platforms/android/res/drawable-xhdpi/: 48px × 48px
  • platforms/android/res/drawable-xxhdpi/: 72px × 72px
  • platforms/android/res/drawable-xxxhdpi/: 96px × 96px

Note that the icons must be flat, in white, and transparent. For best practices and guidance, visit the Android Notification Design documentation.

You can take a look at my complete AndroidManifest.xml file here. It will show you where you can add the above code if you’re stuck.

Android, Cordova, Parse, PhoneGap, Push Notifications

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

StackExchange / StackOverflow

profile for Niraj Shah on Stack Exchange, a network of free, community-driven Q&A sites

Tags

Amazon Web Services Android Android 4.4 KitKat Android 5.0 Lollipop Apache API Application Backup Bug Command Line Cordova Example Facebook Facebook Graph API Facebook PHP SDK 4.0 Facebook Social Plugins Fan Page Flash Geolocation Google Nexus 5 Google Nexus One Hacking HTML5 Image Manipulation iOS iPhone JavaScript jQuery Laravel 5 Linux NodeJS Parse PDF PHP Plugin Portfolio Review Security Server SSH SSL Sysadmin Tutorial WordPress WordPress Plugins
© 2011-2021 Niraj Shah
  • Privacy Policy
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy Policy