+ Reply to Thread
Results 1 to 2 of 2

Thread: Error with Custom notificationbar

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    41

    Error with Custom notificationbar

    I am creating a custom notification bar and here is part of my code where there is error with it :
    Code:
                NotificationIntent Intent = new Intent(BatteryInfoService.this,
                        BatteryInfoActivity.class);
                ContentIntent PendingIntent = PendingIntent.getActivity(ta, 0,
                        notificationIntent, 0);
                notification.contentIntent = contentIntent;
    Error code is
    Code:
    NotificationIntent cannot be resolved to a type
    I am following this tutorial : http://developer.android.com/guide/t...fications.html

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    15
    Replace notificationIntent with intent , that should work.
    Code:
    Intent notificationIntent = new Intent(BatteryInfoService.this,BatteryInfoActivity.class);
    PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts