This works

Intent intent = new Intent(Intent.ACTION_SEARCH);
intent.setPackage("com.google.android.youtube");
intent.putExtra("query", "Android");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);


Thanks and Regards,
Kumar Bibek.

On Mar 11, 1:21 pm, "David" <[email protected]> wrote:
> Actually, I tried like this:
> Intent intent = new Intent(Intent.ACTION_SEARCH);
>                                                         
> intent.setClassName("com.google.android.youtube", 
> "com.google.android.youtube.QueryActivity");
> intent.putExtra("query", "Susan, American");                                  
>               
> intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> startActivity(intent);
>
> but occurred android.content.ActivityNotFoundException: Unable to find 
> explicit activity class 
> {com.google.android.youtube/com.google.android.youtube.QueryActivity}; have 
> you declared this activity in your AndroidManifest.xml?
>
> So I think I got the wrong YouTube package name and QueryActivity name.
>
> Who know what's the exactly package name and QueryActivity name for YouTube 
> in Éclair?
>
> Thanks in advance.
>
> Best Regards,
> David
>
> -----邮件原件-----
> 发件人: [email protected] 
> [mailto:[email protected]] 代表 a a
> 发送时间: 2010年3月11日 16:00
> 收件人: [email protected]
> 主题: Re: 答复: [android-developers] Where is the source project location of 
> YouTube in Eclair?
>
> Dear kumar,
>
>    David what's to invoke the yutube only, and invoke it directly, not
> like you gave he method that list all of the activity and let user to
> choose..
>
> Dear David,
>
>    i'm harvey, you konw me..haha....Do you know how to translate the          
>                                 
> "放長線調大魚" with english?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to