Is there an Intent for package remove?

by feng tian » Mon, 07 Dec 2009 15:35:48 GMT

Sponsored Links
 Hi, All:
My android app is responsible for uninstall the specified packages. Is there
an "intent" for this?
With many thanks.

BR, Feng


Other Threads

1. Handler Exception when trying to get Spinner selected Item


I am trying to get the selected item of my spinner that is populated
and I am already seeing the values. when I try to use
(String) s.getSelectedItem(); to get the selected item, I am receiving
a handler exception on Logcat.

The spinner throwing the error is a 2nd spinner resulting from the 1st
spinner's selected item (that works perfectly). In other words, user
selects from spinner one and upon selection, populates spinner 2
(until here everything is fine). When trying to get the value of the
selected row in spinner2 , I am receiving the error.

here's the main parts of my code:

        public void onCreate(Bundle icicle) {


        // The drop down list for the list of universities
        final Spinner s = (Spinner) findViewById(;
            ArrayAdapter adapter = ArrayAdapter.createFromResource(
                    this, R.array.universities,

            // Initialization of the 2nd spinner
            String[] array = {"this", "is", "driving", "me", "crazy"};
                final Spinner s2 = (Spinner) findViewById(;
                ArrayAdapter<String> cadapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item, array);
 // When user selects a university
            s.setOnItemSelectedListener(new OnItemSelectedListener() {

                        public void onItemSelected(AdapterView<?> arg0, View 
                                        int arg2, long arg3) {
                                  //Get the selected university
                                   String selectedItemString = (String) 
                                 //  System.out.println
("Uni: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"+selectedItemString);

                          if(selectedItemString .equals(""))
                                  // In case of an error so it won't crash

                                  // Find the table of the selected University 


                        public void onNothingSelected(AdapterView<?> arg0) {
                                // TODO Auto-generated method stub


         // When user selects a university
                s2.setOnItemSelectedListener(new OnItemSelectedListener() {

                                public void onItemSelected(AdapterView<?> arg0, 
View arg1,
                                                int arg2, long arg3) {

                        //                      String selected  = 
(String)s2.getSelectedItem();  <---- it
crashes here
                                //              System.out.println
("Building: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"+selected);

                                public void onNothingSelected(AdapterView<?> 
arg0) {
                                        // TODO Auto-generated method stub


protected void finder(String selectedItemString) {

               final Dbadapter db = new Dbadapter(this);  // This creates an
instance of the database in this class
           final Spinner s2 = (Spinner)findViewById(;
                   // Access Database

                   // Fix selected item to match the db
                   selectedItemString = (selectedItemString).toLowerCase();
                   selectedItemString = selectedItemString.replaceAll(" ","");

                   // Call a function to return the rows of that university
                   final Cursor cur = db.getAllTitles(selectedItemString);

           // Get Columns
           String[] columns = new String[]{"building"};
                   SimpleCursorAdapter cadapter = new SimpleCursorAdapter(this,
android.R.layout.simple_spinner_item, cur,
                                   columns, new int[] {});

                   // Spinner Layout and population


2. Android on Galileo

Is it possible to develop for Android on Eclipse Galileo? or we have
to stick with Eclipse Ganymede now days?

3. Alarm Manager

4. Is there a way to access the serial device on G1

5. Progress Dialog When Application Starts

6. Wrapping onCreateInputConnection for 1.1 safety

7. Android port for OMAP3 with GStreamer integration