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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:14:42+00:00 2026-06-01T01:14:42+00:00

I had written a small utility app just for my phone, which stopped the

  • 0

I had written a small utility app just for my phone, which stopped the annoying carrier provided jingle which played on boot up. I noticed the sound didn’t play if I put the phone into silent mode before powering off, so I wrote this little utility to go silent on power down and restore sound on boot. This worked well for a Galaxy S2 on Gingerbread. The entire code is in two classes:

public class OnShutDownReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        AudioManager mgr=(AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
        mgr.setRingerMode(AudioManager.RINGER_MODE_SILENT);
    }

}

and

public class OnBootReceiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
      AudioManager mgr=(AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
      mgr.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
  }
}

The manifest is

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.nbt.hush"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="7" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <receiver android:name=".OnBootReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
         <receiver android:name=".OnShutDownReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.ACTION_SHUTDOWN" />
            </intent-filter>
        </receiver>
    </application>
</manifest>

Now my phone has been upgraded to ICS by my carrier, it no longer works. If I put the phone into silent mode before powering down, the jingle doesn’t play. Therefore I suspect that neither receiver is triggered. (I did put some log code in the receivers which didn’t show up, but I suspect that because of the timings it might not have been displayed under Gingerbread either.)

Any suggestions please as to why it won’t work anymore?

  • 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-01T01:14:44+00:00Added an answer on June 1, 2026 at 1:14 am

    If you wound up completely uninstalling and reinstalling the app, the problem is that you have no activity.

    Starting with Android 3.1, applications are installed in a “stopped” state, where no broadcast receivers will work until the user manually launches an activity. This is an anti-malware move. I blogged about this ~9 months ago.

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

Sidebar

Related Questions

I had created a small app such that the image which is displaying should
I had written a small utility for creating xml for any folder structure and
I have had a small game (Written in C#) which I've built up over
For example, suppose I had written my own class which allowed me to record
I had earlier written a program in java which takes in as input a
I have written a small bash script which needs an ssh tunnel to draw
A small utility of mine that I made for personal use (written in C++)
I had written a small thread program when i compiled cc filename.c, i got
I had written a small client-server code where in I was sending integers and
I am a trying to learn C# .Net. I had written small (hobby) Analog

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.