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

  • Home
  • SEARCH
  • 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 6088589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:00:09+00:00 2026-05-23T12:00:09+00:00

My Android app has a WebView that requires the Flash plugin. The webview will

  • 0

My Android app has a WebView that requires the Flash plugin. The webview will provide a Market link to Adobe Flash if it’s not installed. After installing Flash, the only way to instantiate it in my app is to force quit and restart the app. I would like to present a button to the user that does this for them because it’s too complicated for casual users to open up their running processes and force quit the app manually. What is the Java code to implement such a restart button?

  • 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-05-23T12:00:09+00:00Added an answer on May 23, 2026 at 12:00 pm

    You can restart your app in two steps:

    1. Kill your own process. Use
      Process.myPid(), pass it into
      Process.killProcess(). You might need to add a permission to your manifest (possibly android.permission.KILL_BACKGROUND_PROCESSES) to get this to work.
    2. Before you kill your own process, register an Alarm with a pending intent to restart your Activity in the very near future. The second parameter to alarm.set is the triggerAtTime. Setting it to 0 causes the alarm to fire immediately. The example here sets a time to launch the app one second into the future.

    The Code goes like this:

    AlarmManager alm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);
    alm.set(AlarmManager.RTC, System.currentTimeMillis() + 1000, PendingIntent.getActivity(this, 0, new Intent(this, this.getClass()), 0));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Android app I create an AlertDialog that has a WebView inside. The
I am building an android app which has a webview. The webview will display
I created a native Android app that basically hosts a webView control. That webView
I am writing an android application that has a webview. On the first load
I'm looking for a way to detect that my android app has been backgrounded,
My Android app has a layout that looks like this: --------------------- | | |
I have an Android app that has a Content Provider with an SQLiteDatabase implementation.
In android app, I need to dynamically generate html and load that into webview
My android app has a two word app name, and the 2nd word doesn't
I've got an Android app which has a periodic background Service. I want this

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.