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 9125399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:47:43+00:00 2026-06-17T06:47:43+00:00

Code for notification: mNotificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); final Notification notifyDetails = new Notification(R.drawable.ic_launcher,New Alert, Click

  • 0

Code for notification:

mNotificationManager = 
             (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
    final Notification notifyDetails = 
            new Notification(R.drawable.ic_launcher,"New Alert, Click Me!",System.currentTimeMillis());
    Context context = getApplicationContext();
      notifyDetails.
    CharSequence contentTitle = "Notification Details...";

    CharSequence contentText = "Browse Android Official Site by clicking me";
    Intent notifyIntent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse("http://www.android.com"));

    PendingIntent intent1 = 
          PendingIntent.getActivity(this, 0, 
          notifyIntent, android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
    notifyDetails.setLatestEventInfo(context, contentTitle, contentText, intent1);
    mNotificationManager.notify(SIMPLE_NOTFICATION_ID, notifyDetails);

My notification works fine, what I want to happen is the screen brightness to increase to a certain value when the notification pops up.

I used Eclipse’s auto complete feature to find the right function, but none work. I also searched quite a bit, no luck.

How do I solve this?

  • 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-17T06:47:44+00:00Added an answer on June 17, 2026 at 6:47 am

    I’ve had a similar brightness problem some time ago. Take a look at this answer. It should point you in the right direction.

    Add this to your activity:

    Settings.System.putInt(getContentResolver(),
                        Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
    Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255);//255 here is your brightness value, an integer that can be between 0 and 255.
    float brightness = 1.0f; //Your desired brightness, float value between 0.0 and 1.0
    WindowManager.LayoutParams lp = getWindow().getAttributes();
    lp.screenBrightness = brightness;
    getWindow().setAttributes(lp);
    

    and add this permission to the AndroidManifest.xml:

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

    I’ve just tested it and this code works on Android 4.1.

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

Sidebar

Related Questions

I have the following code: String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
I have a notification in my app with the following code: //Notification Start notificationManager
Hi i am new to android. I am implementing a code with notification functionality.
I have 3 errors in the code of notification using OnItemClickListener i need to
can I programmatically resize notification to size specify? My code js: var notification =
I have code like: @notifications = Notification.find_all_by_user_id(@user.id, :order=>'deliver_by DESC', :conditions=>deliver_by >= '#{Date.today.to_s(:db)}') logger.info @upcoming_reminders[0].inspect
I have following line of code to generate local notification after every 1 minute
Using this code, i am able to send a notification to my own device.
I send from a Service a notification which contents Parcelable ArrayList. //my service code
Code to create new form instance of a closed form using form name I

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.