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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:22:43+00:00 2026-06-18T09:22:43+00:00

There is an application and it needs system reboot after installation. I registrered boot

  • 0

There is an application and it needs system reboot after installation. I registrered boot receiver and write info to system log. And activity checks for this line. It works well, but there is one problem…

When user uninstall and install this app in one session(I mean user doesn’t reboot phone) system log still has line “Phone restarted” and application runs with errors.

As I know I can’t check uninstallation event on my app cause receiver stops before the application going to uninstall. So my question is could I check for my app installation? or maybe uninstallation any other way?

Thanks!

  • 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-18T09:22:44+00:00Added an answer on June 18, 2026 at 9:22 am

    Maybe someone will be interested. I found the code that allows me to checked system reboot after installation/update:

    public static boolean phone_rebooted(Context ctx) {
            ApplicationInfo appInfo = ctx.getApplicationInfo();
            String appFile = appInfo.sourceDir;
            long installed = new File(appFile).lastModified();
    
            long boot_time = System.currentTimeMillis() - SystemClock.elapsedRealtime();
            if(boot_time < installed) {
               return false;
            } else {
               return true;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application needs to monitor all other running applications on the system. Is there
My application server needs to notify users about some events via email. Usually there
My .NET application needs to access specific file types without searching the entire system.
There is chance were a heavy weight application that needs to be launched in
I'm writing an application that needs to perform some tasks only if there is
If your application needs to encrypt/decrypt data (for various reasons), are there any reasons
I'm building an application which needs to filter some mouse clicks system-wide. That is,
There are many places in my application where I need to generate links with
Do I really need Visual studio to build c/C++ application on Windows. Is there
In my application there is a ListFragment where each item from the list contains

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.