Hi Mark,
here is my AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
          package="com.example">
    <application android:icon="@drawable/icon"
android:label="helloworld">
        <activity android:name=".TestHelloWorld "
android:label="test">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <action android:name="android.intent.action.PICK"/>

                <category
android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

and class to start activity
----
public class TestHelloWorld extends Activity {
    TextView helloView;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        helloView = new TextView(this);
        setContentView(helloView);
        Intent helloIntent = new Intent();
        helloIntent.setAction("android.intent.action.PICK");
        helloIntent.setType("vnd.example.greeting/vnd.example.greeting-
text");
        startActivityForResult(helloIntent, 0);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode,
Intent result) {
        if (resultCode == RESULT_OK) {
            String greeting = result.getStringExtra("result");
            helloView.setText(greeting);
        }
    }
}
-----
Could you be so kind to help me with finding mistake in
AndroidManifest.xml or class file (it looks okay) ?
Thanks

On 18 янв, 23:17, "Mark Murphy" <[email protected]> wrote:
> > Hi all,
> > I'm trying to launch simple ipc example using intent. Example from
> > o'reilly book :
>
> > (http://books.google.com.ua/books?
> > id=SoOvFjTXwA4C&pg=PA259&lpg=PA259&dq=Example:+An+Intent+to+Pick+How+We
> > +Say+%E2%80%9CHello+World
> > %E2%80%9D&source=bl&ots=oD2oE4Dey8&sig=XSVaZPBXAbLTNhEhR-
> > OMFK6g_1g&hl=ru&ei=jMxUS7vlNp6KngOHq-2VCg&sa=X&oi=book_result&ct=result&resnum=1&ved=0CAkQ6AEwAA#v=onepage&q=Example
> > %3A%20An%20Intent%20to%20Pick%20How%20We%20Say%20%E2%80%9CHello%20World
> > %E2%80%9D&f=false)
>
> > When I trying to launch app with intent I get an exception:
>
> <snip>
>
> > E/AndroidRuntime(  926): java.lang.RuntimeException: Unable to start
> > activity ComponentInfo{com.example/com.example.T}:
> > android.content.ActivityNotFoundException: No Activity found to handle
> > Intent { action=android.intent.action.PICK type=v
> > nd.example.greeting/vnd.example.greeting-text }
>
> You do not have an activity that knows how to handle ACTION_PICK of
> vnd.example.greeting/vnd.example.greeting-text. Perhaps the activity is
> not properly registered in the AndroidManifest.xml file.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to