Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8512595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:19:20+00:00 2026-06-11T04:19:20+00:00

I do own according to the notification bar: http://developer.android.com/guide/topics/ui/notifiers/notifications.html I do like the tutorial

  • 0

I do own according to the notification bar: http://developer.android.com/guide/topics/ui/notifiers/notifications.html

I do like the tutorial :

            Notification notification = new Notification();
            notification.flags = Notification.FLAG_ONGOING_EVENT;
            notification.icon = icon;

            RemoteViews contentView = new RemoteViews(getPackageName(),
                    R.layout.custom_notification);
            contentView.setImageViewResource(R.id.image, R.drawable.b_10);
            contentView.setTextViewText(R.id.title, "Custom zgłoszenie");
            contentView.setTextViewText(R.id.text, "test test test");
            notification.contentView = contentView;

            NotificationIntent Intent = new Intent(BatteryInfoService.this,
                    BatteryInfoActivity.class);
            ContentIntent PendingIntent = PendingIntent.getActivity(ta, 0,
                    notificationIntent, 0);
            notification.contentIntent = contentIntent;

            mNotificationManager.notify(BATTERY_ID, notification);

There are errors in the lines:

            NotificationIntent Intent = new Intent(BatteryInfoService.this,
                    BatteryInfoActivity.class);
            ContentIntent PendingIntent = PendingIntent.getActivity(ta, 0,
                    notificationIntent, 0);
            notification.contentIntent = contentIntent;

Errors:

NotificationIntent cannot be resolved to a type

Multiple markers at this line
    - ContentIntent cannot be resolved to 
     a type
    - ta cannot be resolved to a variable

contentIntent cannot be resolved to a variable
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:19:21+00:00Added an answer on June 11, 2026 at 4:19 am

    Replace NotificationIntent with Intent (android does not provide NotificationIntent, unless its a custom class).

    what you are looking for is

    Intent notificationIntent = new Intent(BatteryInfoService.this,BatteryInfoActivity.class);
    PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
    

    Please read the tutorial carefully. Intent and PendingIntent are android Classes where as NotificationIntent and ContentIntent are not. If you have made custom classes under those names and you can import the appropriate packages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Jelly Bean added support for expandable status notification. According to http://developer.android.com/about/versions/jelly-bean.html : In addition
If I own a domain name like e.g Dan-Carlos.com Does the andoid package name
According to: http://intendance.com/2011/03/31/enterprise-content-management-open-source-squiz-matrix/ They have stated: Most other open source content management systems options
According to http://msdn.microsoft.com/en-us/library/yd4f8bd1.aspx there's 2 .pdb files for a project. project.pdb I use to
According to SitePoint (and my own experiments), the IE implementation of setAttribute() is buggy
According to this answer I want to create my own subclass of Array QArray
Can PHP dissect its own syntax? For example, I'd like to write a function
According to w3schools , the best HTML solution for embedding videos directly into a
Need to calculate optimum ulimit and fs.file-max values according to my own server needs.
I want to add drop down list with my own values. According to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.