0

I'm doing an android application which is in earlier stage without any idea. I just wanted to know that Is it possible to block Installing particular app from google play store & Uninstall particular app from device?I mean I've my own app which runs a service that should controls over these kind of installs/Uninstalls.

(i.e)I have created my own app(installed in device) which runs a background service to monitor always if any new installation/Uninstallation happens in the device. If any occurs, my own app should block that process. That's my aim here.

Subra
  • 33
  • 1
  • 6
  • possible duplicate of [install / uninstall APKs programmatically (PackageManager vs Intents)](http://stackoverflow.com/questions/6813322/install-uninstall-apks-programmatically-packagemanager-vs-intents) – Shabbir Dhangot Mar 10 '15 at 07:27
  • @ShabbirDhangot I've updated my question to get clear picture for you. – Subra Mar 10 '15 at 07:36
  • @Subra Have you got solution for your problem? Because me too have the same problem. – Divya Sep 29 '15 at 07:22

1 Answers1

0

fellow this link may be solve your problem click here links

package com.example.appuninstall;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Intent intent = new Intent(Intent.ACTION_DELETE);
        //Enter app package name that app you wan to install
        intent.setData(Uri.parse("package:com.example.speedometer"));
        startActivity(intent);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

}
Muhammad Waleed
  • 2,517
  • 4
  • 27
  • 75
  • Thanks for your reply. This stays not an exact solution for my question. I don't want to install/Uninstall an app from my own app. My app should run as listener which identifies when install/uninstall happens from settings->Apps->... – Subra Mar 10 '15 at 08:45
  • 1
    link only answers are discouraged. your link is dead. – lakshman Feb 06 '16 at 04:41
  • @ExceptionLover: Any way shortly describe your answer in the answer body. new link also could be dead in some day – lakshman Feb 11 '16 at 09:20
  • @ExceptionLover: OP asking about how block installing or uninstalling applications. but you giving a way to install and uninstall applications. not blocking.right? – lakshman Feb 11 '16 at 09:34