How to play youtube videos in an Android application?

by Dipin » Thu, 04 Dec 2008 00:56:28 GMT


Sponsored Links
 Is there any way to play a youtube video in an Android application?
Using MediaPlayer or VideoView can we play a youtube video?

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



How to play youtube videos in an Android application?

by RTM » Wed, 21 Jan 2009 00:31:47 GMT


 Hi,
  Are you able to run the YouTube video with an Android Application?.
I guess due to lack of Flash support in Android browser, we are not
able to play YouTube videos. Is there any way we can overcome this?

Regards



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


Sponsored Links


How to play youtube videos in an Android application?

by kolby » Wed, 21 Jan 2009 02:06:58 GMT


 You can send a VIEW intent with the video uri. The YouTube app on the
G1 should pick it up.

Michael




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



How to play youtube videos in an Android application?

by RTM » Wed, 21 Jan 2009 12:40:40 GMT


 Thanks Michael for the reply.  Can I also run the YouTube video with
the SDK?.

Regards





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



How to play youtube videos in an Android application?

by kolby » Wed, 21 Jan 2009 20:44:11 GMT


 The emulator doesn't provide you with the YouTube application (I don't
know about the developer phone), so the above only works on the actual
device.

Michael






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



How to play youtube videos in an Android application?

by RoelandP » Tue, 27 Jan 2009 04:27:40 GMT


 Dear Michael Kolby, can you show us a working example of how to
exactly implement this youtube view? Would be great to see this!

thank you in advance!








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



Other Threads

1. Segfault in Bitmap.getPixel()

Hi,

I have a larger 512x512 32-bit ARGB Bitmap loaded from a PNG in my
application. I traverse each pixel in this bitmap as follows:

int height = bitmap.getHeight()-1;
for( int y = 0; y < bitmap.getHeight(); y++ )
{
   for( int x = 0; x < bitmap.getWidth(); x++ )
   {
      int pixel = bitmap.getPixel( x, y);
      collisionMap[x][height-y] =  pixel != -1 ?(byte)BACKGROUND_PIXEL:
0;
   }
}

I check each pixel in the bitmap for a specific color value and set a
byte in a corresponding 2D array that has the same dimensions as the
image. This works perfectly fine on my droid, on my hero as well as on
the emulator. I send the app containing this code to some other people
that have a g1 and a mytouch and there this few lines fail horribly
with a segfault:

02-01 17:47:25.532 I/ActivityManager(   74): Process
android.process.media (pid 3920) has died.
02-01 17:47:25.622 I/DEBUG   (   48): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
02-01 17:47:25.622 I/DEBUG   (   48): Build fingerprint: 'tmobile/opal/
sapphire/sapphire:1.6/DRC92/15632:user/ota-rel-keys,release-keys'
02-01 17:47:25.622 I/DEBUG   (   48): pid: 4033, tid: 4039  >>>
com.badlogic.doodleescape <<<
02-01 17:47:25.622 I/DEBUG   (   48): signal 7 (SIGBUS), fault addr
00000000
02-01 17:47:25.622 I/DEBUG   (   48):  r0 44527d84  r1 4622700a  r2
00000001  r3 00000000
02-01 17:47:25.622 I/DEBUG   (   48):  r4 00000001  r5 4622700a  r6
44527d84  r7 4104be78
02-01 17:47:25.622 I/DEBUG   (   48):  r8 44527d9c  r9 4104be6c  10
4104be5c  fp 00000001
02-01 17:47:25.622 I/DEBUG   (   48):  ip 4622700a  sp 44527d70  lr
ad346c1f  pc ad3469a0  cpsr 00000030
02-01 17:47:26.242 I/DEBUG   (   48):          #00  pc 000469a0  /
system/lib/libandroid_runtime.so
02-01 17:47:26.242 I/DEBUG   (   48):          #01  pc 00046c1c  /
system/lib/libandroid_runtime.so
02-01 17:47:26.242 I/DEBUG   (   48):          #02  pc 0000e434  /
system/lib/libdvm.so
02-01 17:47:26.252 I/DEBUG   (   48): stack:
02-01 17:47:26.252 I/DEBUG   (   48):     44527d30  ad083e1c  /system/
lib/libdvm.so
02-01 17:47:26.252 I/DEBUG   (   48):     44527d34  ad0159f4  /system/
lib/libdvm.so
02-01 17:47:26.252 I/DEBUG   (   48):     44527d38  0000032c
02-01 17:47:26.252 I/DEBUG   (   48):     44527d3c  0000002a
02-01 17:47:26.252 I/DEBUG   (   48):     44527d40  00000054
02-01 17:47:26.252 I/DEBUG   (   48):     44527d44  ad083e1c  /system/
lib/libdvm.so
02-01 17:47:26.252 I/DEBUG   (   48):     44527d48  00000064
02-01 17:47:26.262 I/DEBUG   (   48):     44527d4c  0000001a
02-01 17:47:26.262 I/DEBUG   (   48):     44527d50  00000000
02-01 17:47:26.262 I/DEBUG   (   48):     44527d54  4104be78
02-01 17:47:26.262 I/DEBUG   (   48):     44527d58  00000001
02-01 17:47:26.262 I/DEBUG   (   48):     44527d5c  41c3a728  /system/
framework/framework.odex
02-01 17:47:26.262 I/DEBUG   (   48):     44527d60  00000003
02-01 17:47:26.262 I/DEBUG   (   48):     44527d64  41c3a728  /system/
framework/framework.odex
02-01 17:47:26.262 I/DEBUG   (   48):     44527d68  df002777
02-01 17:47:26.262 I/DEBUG   (   48):     44527d6c  e3a070ad
02-01 17:47:26.262 I/DEBUG   (   48): #00 44527d70  ad346999  /system/
lib/libandroid_runtime.so
02-01 17:47:26.262 I/DEBUG   (   48):     44527d74  001aae00  [heap]
02-01 17:47:26.262 I/DEBUG   (   48):     44527d78  00000001
02-01 17:47:26.262 I/DEBUG   (   48):     44527d7c  ad346c1f  /system/
lib/libandroid_runtime.so
02-01 17:47:26.262 I/DEBUG   (   48): #01 44527d80  00000027
02-01 17:47:26.262 I/DEBUG   (   48):     44527d84  ffffffff
02-01 17:47:26.262 I/DEBUG   (   48):     44527d88  44527dc0
02-01 17:47:26.262 I/DEBUG   (   48):     44527d8c  00000004
02-01 17:47:26.262 I/DEBUG   (   48):     44527d90  ad346bed  /system/
lib/libandroid_runtime.so
02-01 17:47:26.262 I/DEBUG   (   48):     44527d94  ad00e438  /system/
lib/libdvm.so
02-01 17:47:28.122 I/ActivityManager(   74): Process
com.badlogic.doodleescape (pid 4033) has died.

The bitmap is loaded successfully otherwise i'd get a
NullPointerException when requesting its height in the first line of
code. It seems that Bitmap.getPixel() fails with a segfault.

I have not the slightest clou of what is happening here. The really
frightening part is that it works on the droid,hero and emulator but
not on g1 hardware. I'd really appreciate any pointers.

-- 

2. How to implement the long click event for the ExpandableListView

Hi,

can any one please suggest me how to implement the long click
(onItemLongClick()) for the Expandable list view?

Thanks,
Manoj.

-- 

3. Problem with expandable list view

4. Querying the contacts content provider for values with accent

5. ArrayList items are missing

6. TableLayout will not draw new row addition

7. how to use style