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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:43:54+00:00 2026-06-01T23:43:54+00:00

I am making a proprietary app for a company which will never release it

  • 0

I am making a proprietary app for a company which will never release it to the Android Market (or Play Store I guess now) in Ice Cream Sandwich (Android 4.0).

I need to disable the Home so the users cannot maliciously uninstall software or delete the data that the app captures. This latest version is the first to be written in 4.0, the previous versions were written in 2.2 and 3.2.

For disabling the Home button in 2.2, I associated the app as a home replacement, so the button just reopened the app, but I can no longer use this method, as that somewhat prevents us from doing our updates to the app (we don’t want to give the user the option of reselecting a Home default, as that would lead to data deletion.

The code I have for disableing the Home button in 3.2 is:

@Override
public void onAttachedToWindow() {
     getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
     this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
     super.onAttachedToWindow();
}

and, under onCreate:

KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.disableKeyguard();

But when I run the same code that worked on my 3.2 tablet, it does not work on my 4.0 tablet.

I was wondering if there is a new API or method that 4.0 has that will accomplish the same effect as I currently have in my 3.2 implementation.

Thanks for any help or direction.

Adam

  • 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-01T23:43:56+00:00Added an answer on June 1, 2026 at 11:43 pm

    How about a workaround..

    Write a second app that implements the home screen, when the home screen button is pressed this app will come to the foreground. From this app you then need to push your main app back to the foreground. The only catch is that your Home screen app must never need an update, but you should be able to update the main app freely without the tab asking to set the home launcher.

    Hope that makes sense..

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

Sidebar

Related Questions

Making an adobe flex ui in which data that is calculated must use proprietary
Making a small WCF test program which is based on a Store that has
I'm making an app that has more options than will easily fit into a
Im making a PyQt4 app which calls Imagemagick and ffmpeg, but it takes too
I'm making a Windows Store app in C# and I have a normal TextBlock
I'm working on a Java based web app which will consist of a couple
Making an Flex App. Just wondering if anyone has created something that fits automatically
Making an app where we want to send a photo to a server along
Making a social media app. I have a main viewFlipper with several views therein.
I'm planning to write a C library which will act as an umbrella wrapper

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.