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. DatePicker throw java.lang.StackOverflowError when embbeded with TableRow

A strange error: when DatePicker is used as child item of <TableRow>,
it throws out StackOverflowError and then the application crashes.
It would work fine if it is defined outside of <TableRow>.

Do not know why ....... Is it related to my UTF-8 strings defined in
strings.xml?

Do anyone know what's going on on earth?

Thank you.

My Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TableLayout android:stretchColumns="1"
                android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!--
        <DatePicker     android:id="@+id/dp_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
-->
                <TableRow>
                        <TextView style="@style/androil_text_view" 
android:text="@string/
date_str" />
        <DatePicker     android:id="@+id/dp_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
                        <Button android:id="@+id/btn_pickdate" 
android:text="@string/
set_str"
                                android:textStyle="bold" android:gravity="left"
android:padding="5dip"
                                android:textSize="20dip" />
                </TableRow>

                <TableRow>
                        <TextView style="@style/androil_text_view" 
android:text="@string/
odometer_str" />
                        <EditText style="@style/androil_edit_text" 
android:id="@+id/
odometer_display" android:inputType="number" />
                        <TextView style="@style/androil_text_view" 
android:text="@string/
kilometer_str" />
                </TableRow>

                <TableRow>
                        <TextView style="@style/androil_text_view" 
android:text="@string/
liter_added_str" />
                        <EditText style="@style/androil_edit_text" 
android:id="@+id/
liter_added_display" android:inputType="numberDecimal" />
                        <TextView style="@style/androil_text_view" 
android:text="@string/
liter_str" />
                </TableRow>

                <TableRow>
                        <TextView style="@style/androil_text_view" 
android:text="@string/
oil_type_str" />
                        <RadioGroup android:checkedButton="@+id/oil_type_93"
android:gravity="top"
                                android:orientation="horizontal" 
android:id="@+id/oil_type_group"
                                android:padding="5dip" android:textSize="20dip"
android:layout_span="2">
                                <RadioButton 
android:text="@string/oil_type_93_str"
                                        android:id="@id/oil_type_93" 
android:textSize="20dip" />
                                <RadioButton 
android:text="@string/oil_type_97_str"
                                        android:id="@+id/oil_type_97" 
android:textSize="20dip" />
                        </RadioGroup>
                </TableRow>

                <TableRow>
                        <TextView style="@style/androil_text_view" 
android:text="@string/
yuan_paid_str" />
                        <EditText style="@style/androil_edit_text" 
android:id="@+id/
yuan_paid_display" android:inputType="numberDecimal" />
                        <TextView style="@style/androil_text_view" 
android:text="@string/
yuan_str" />
                </TableRow>

                <TableRow>
                        <TextView style="@style/androil_text_view" 
android:text="@string/
gass_up_str" />
                        <RadioGroup android:orientation="horizontal"
                                android:padding="5dip" 
android:checkedButton="@+id/
gass_up_yes_display"
                                android:id="@+id/gass_up_group" 
android:layout_span="2">
                                <RadioButton 
android:text="@string/gass_up_yes_str"
                                        android:id="@id/gass_up_yes_display" 
android:textSize="20dip" />
                                <RadioButton 
android:text="@string/gass_up_no_str"
                                        android:id="@+id/gass_up_no_display" 
android:textSize="20dip" />
                        </RadioGroup>
                </TableRow>

        </TableLayout>

        <LinearLayout android:orientation="horizontal"
                android:layout_width="wrap_content"
android:layout_height="wrap_content">
                <Button android:id="@+id/btn_clear" 
android:text="@string/clear_str"
                        android:layout_width="wrap_content"
android:layout_height="wrap_content"
                        android:textStyle="bold" android:gravity="right"
android:textSize="20dip" />
                <Button android:id="@+id/btn_save" 
android:text="@string/save_str"
                        android:layout_width="wrap_content"
android:layout_height="wrap_content"
                        android:textStyle="bold" android:gravity="right"
android:padding="5dip"
                        android:textSize="20dip" />
        </LinearLayout>
<!--                    <TextView style="@style/androil_text_view" 
android:id="@+id/
date_display" android:gravity="left" />-->
</LinearLayout>

The exception:

09-01 12:07:12.728: ERROR/AndroidRuntime(858): Uncaught handler:
thread main exiting due to uncaught exception
09-01 12:07:12.838: ERROR/AndroidRuntime(858):
java.lang.StackOverflowError
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.SpannableStringBuilder.getChars
(SpannableStringBuilder.java:847)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.TextUtils.getChars(TextUtils.java:69)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.method.ReplacementTransformationMethod
$ReplacementCharSequence.getChars(ReplacementTransformationMethod.java:
151)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.TextUtils.getChars(TextUtils.java:69)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.graphics.Paint.measureText(Paint.java:1016)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.Styled.each(Styled.java:124)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.Styled.foreach(Styled.java:249)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.Styled.measureText(Styled.java:371)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.Layout.measureText(Layout.java:1600)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.Layout.getLineMax(Layout.java:654)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.text.Layout.draw(Layout.java:310)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.widget.TextView.onDraw(TextView.java:3921)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.View.draw(View.java:5838)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.View.draw(View.java:5841)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.widget.FrameLayout.draw(FrameLayout.java:352)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.View.draw(View.java:5841)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.widget.FrameLayout.draw(FrameLayout.java:352)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1486)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.drawChild(ViewGroup.java:1484)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.View.draw(View.java:5841)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.widget.FrameLayout.draw(FrameLayout.java:352)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
com.android.internal.policy.impl.PhoneWindow$DecorView.draw
(PhoneWindow.java:1847)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewRoot.draw(ViewRoot.java:1217)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.os.Handler.dispatchMessage(Handler.java:99)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.os.Looper.loop(Looper.java:123)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
java.lang.reflect.Method.invokeNative(Native Method)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
java.lang.reflect.Method.invoke(Method.java:521)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-01 12:07:12.838: ERROR/AndroidRuntime(858):     at
dalvik.system.NativeStart.main(Native Method)
09-01 12:07:12.898: INFO/Process(581): Sending signal. PID: 858 SIG: 3

--~--~---------~--~----~------------~-------~--~----~

2. Voice 2 text help

Hi guys,

I have been trying to develop an app around the voice recognition
functionality of Cupcake. As a sample code, I used the
VoiceRecognition.java project available under API Demos. (http://
developer.android.com/guide/samples/ApiDemos/src/com/example/android/
apis/app/VoiceRecognition.html)

I want to know if I can extract the text result on the list view and
use it as a String further on? The part of code I am refering to is
below where mList is defined as ListView:

ArrayList<String> matches = data.getStringArrayListExtra
(RecognizerIntent.EXTRA_RESULTS);
mList.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, matches));

I want to use the result to be able to take further action.

Thanks,

Abhi

--~--~---------~--~----~------------~-------~--~----~

3. How to compile a multilanguage version of android?

4. Cannot upload "Promotional Graphic" to Android Market

5. Running Application as Service

6. Platform 1.5 with Google Map API does it has any platform number

7. XML RPC Parsing Error