Note that there are some explanatory texts on larger screens.

plurals
  1. POYoutube API ActivityNotFoundException on Gingerbread
    primarykey
    data
    text
    <p>I am getting ActivityNotFoundException error when i am trying to run youtube api StandAlonePlayerActivity on ginger bread. Where as it runs fine on ICS </p> <p>here is my log cat</p> <pre><code>01-23 15:34:28.071: E/AndroidRuntime(3378): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.google.android.youtube.api.StandalonePlayerActivity.START (has extras) } 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1545) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1515) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.app.Activity.startActivityForResult(Activity.java:2988) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:701) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.support.v4.app.Fragment.startActivity(Fragment.java:787) 01-23 15:34:28.071: E/AndroidRuntime(3378): at com.example.demo.TipsFragment$2.onClick(TipsFragment.java:143) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.view.View.performClick(View.java:2533) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.view.View$PerformClick.run(View.java:9320) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.os.Handler.handleCallback(Handler.java:587) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.os.Handler.dispatchMessage(Handler.java:92) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.os.Looper.loop(Looper.java:150) 01-23 15:34:28.071: E/AndroidRuntime(3378): at android.app.ActivityThread.main(ActivityThread.java:4389) 01-23 15:34:28.071: E/AndroidRuntime(3378): at java.lang.reflect.Method.invokeNative(Native Method) 01-23 15:34:28.071: E/AndroidRuntime(3378): at java.lang.reflect.Method.invoke(Method.java:507) 01-23 15:34:28.071: E/AndroidRuntime(3378): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849) 01-23 15:34:28.071: E/AndroidRuntime(3378): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607) 01-23 15:34:28.071: E/AndroidRuntime(3378): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>and here is the code which i have used for starting Player</p> <pre><code>String vid=getYoutubeVideoId(vlink); Intent intent=YouTubeStandalonePlayer.createVideoIntent(getActivity(),DEVELOPER_KEY, vid, 0,true,false); startActivity(intent); </code></pre> <p>I am getting error on <code>startActivity</code></p> <p>Here is getYoutubeVideoID() code :</p> <pre><code>/* * Getting id of video from url */ public static String getYoutubeVideoId(String youtubeUrl) { String video_id=""; if (youtubeUrl != null &amp;&amp; youtubeUrl.trim().length() &gt; 0 &amp;&amp; youtubeUrl.startsWith("http")) { String expression = "^.*((youtu.be"+ "\\/)" + "|(v\\/)|(\\/u\\/w\\/)|(embed\\/)|(watch\\?))\\??v?=?([^#\\&amp;\\?]*).*"; // var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&amp;\?]*).*/; CharSequence input = youtubeUrl; Pattern pattern = Pattern.compile(expression,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(input); if (matcher.matches()) { String groupIndex1 = matcher.group(7); if(groupIndex1!=null &amp;&amp; groupIndex1.length()==11) video_id = groupIndex1; } } return video_id; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload