Backendless Support
 
Not Covered by Support

Android ... Receiving push notification with white blank push notification icon !?

hi guys,

i've gone throw all backendless push notification setup AND it WORKS fine ,

I can send push notification from android device to another ,

Here is my method to send push notification

    1. DeliveryOptions deliveryOptions = new DeliveryOptions();
    2. deliveryOptions.addPushSinglecast( theMember.getUserDeviceID() );
    3. PublishOptions publishOptions = new PublishOptions();
    4. publishOptions.putHeader( "android-ticker-text", "You just got a private push notification!" );
    5. publishOptions.putHeader( "android-content-title", "Title" );
    6. publishOptions.putHeader( "android-content-text", "Content" );
    7. Backendless.Messaging.publish( "Message",
    8. publishOptions, deliveryOptions, new BackendlessCallback<MessageStatus>()
    9. {
    10. @Override
    11. public void handleResponse( MessageStatus response )
    12. {
    13. System.out.println("Push Success");
    14. }
    15. @Override
    16. public void handleFault( BackendlessFault fault )
    17. {
    18. Toast.makeText( getContext(), fault.getMessage(), Toast.LENGTH_SHORT ).show();
    19. }
    20. } );

    and AndroidManifest.xml

    1. <uses-permission android:name="android.permission.INTERNET" />

      <uses-permission android:name="android.permission.WAKE_LOCK" />

      <uses-permission android:name="com.google.android.c2dm.intent.REGISTRATION" />

      <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

      <uses-permission android:name="com.inasser.alqattah.permission.C2D_MESSAGE" />

      <permission

      android:name="com.inasser.myapp.permission.C2D_MESSAGE"

      android:protectionLevel="signature" />

      <receiver

      android:name="com.backendless.push.BackendlessBroadcastReceiver"

      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.inasser.myapp" />

      </intent-filter>

      </receiver>

      <service android:name="com.backendless.push.BackendlessPushService" />

    AND i've created a push notification icon with Transparent BUT I DON'T KNOW HOW TO CHANGE THE ICON ??4ff8e00c374e56bab89026124790b4c7

    How i can fix this ????

    Leave a Comment

    Comments (2)

    photo
    1

    Hello, Nasser!

    Unfortunately, your issue is not related to Backendless. The way how push notification is rendered is not controlled by Backendless API.

    I can offer you to try to generate a chat sample for android using codegeneration feature. Push receiver there contains code that uses custom icon for received notification.

    regards,

    Alex

    photo
    1

    hi Alexander,

    thanks for responding ,

    but if we take (Parse mBaas) as example they give a way to override getSmallIconId function to replace small icon...

    why i can't do that in backendless ?

    photo