[android-developers] YouTube Android Player API - PlayerViewDemoActivity crash
Hii All, I am trying to use the youtube android api jar the samples from here : https://developers.google.com/youtube/android/player/ But everytime, i run this app press the back key continously, before the video is loaded in the activity, I see youtube crashing. It says : Unfortuantely, Youtube has stopped with a Report a Ok. The logs says an *unregisterReceiver() for youtubeservice is missing.* *Is this a known issue? Does anybody know anything about this?* 11-20 15:36:44.023: E/ActivityThread(5674): Service *com.google.android.youtube.api.service.YouTubeService has leaked IntentReceiver com.google.android.apps.youtube.core.utils.ConnectivityReceiver@40e52a38 that was originally registered here. Are you missing a call to unregisterReceiver()?* 11-20 15:36:44.023: E/ActivityThread(5674): android.app.IntentReceiverLeaked: Service com.google.android.youtube.api.service.YouTubeService has leaked IntentReceiver com.google.android.apps.youtube.core.utils.ConnectivityReceiver@40e52a38that was originally registered here. Are you missing a call to unregisterReceiver()? 11-20 15:36:44.023: E/ActivityThread(5674): at com.google.android.apps.youtube.core.utils.ConnectivityReceiver.init(SourceFile:53) 11-20 15:36:44.023: E/ActivityThread(5674): at com.google.android.apps.youtube.api.j.init(SourceFile:271) 11-20 15:36:44.023: E/ActivityThread(5674): at com.google.android.apps.youtube.api.j.a(SourceFile:110) 11-20 15:36:44.023: E/ActivityThread(5674): at com.google.android.apps.youtube.api.k.run(SourceFile:207) 11-20 15:36:44.064: I/dalvikvm(5674): Could not find method android.media.MediaPlayer.setVideoScalingMode, referenced from method com.google.android.apps.youtube.core.player.as.b 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.utils.ab.b(SourceFile:69) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.api.ApiPlayer.a(SourceFile:176) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.api.ApiPlayer.a(SourceFile:60) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.api.q.c(SourceFile:680) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.player.Director.G(SourceFile:943) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.player.Director.E(SourceFile:823) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.player.Director.h(SourceFile:761) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.player.bi.a(SourceFile:56) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.player.Director.a(SourceFile:746) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.player.Director.a(SourceFile:90) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.player.ae.a(SourceFile:1528) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.async.a.d.a(SourceFile:39) 11-20 15:36:44.074: E/AndroidRuntime(5674): at com.google.android.apps.youtube.core.async.a.h.run(SourceFile:346) 11-20 15:36:44.084: E/EmbeddedLogger(263): App crashed! Process: com.google.android.youtube.player 11-20 15:36:44.084: E/EmbeddedLogger(263): App crashed! Package: com.google.android.youtube v5227 (5.2.27) 11-20 15:36:44.084: E/EmbeddedLogger(263): Application Label: YouTube 11-20 15:36:46.276: D/PackageEnabler(5522): action: android.intent.action.PACKAGE_CHANGED, pkg: com.google.android.youtube, disabled: false, replacing: false thanks, Latha. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Need help: How to disable a view(provided there are 2 views in xml) ??
Hi All, In one of my applications i have 2 views(1 surfaceview and 1 videoview). And my main requirement now is to disable videoview( its corresponding surface obtained thru videoview-getholder-getsurface()) when i dont need it. The reason for me to do this, I have created these 2 views in the beginning of the app. SO they are always present. But in some cases where i want only 1 view(which is surfaceview) and if i dont need the 2nd view(i.e, videoview), i am still getting a black patch at the palce where i have defned a videoview. I want to get rid of this. Can anyone please tell me if it is possible to disable views/surfaces corresponding to them? If so how can we do this? Please do advise. Your help is very much needed. thanks, Latha. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] Need help: How to create Surfaces in Native layer(equivalent of view-getholder-getsurface)
Hii All, In one of my applications, i am doing some video playback and other display related stuffs in Surfaceviews and i create them in XML layouts. I am all fine in Java here. But now i need to do all this in C/C++(native layer), I have this doubt in this regard. Is it possible to create Surfaces in C/C++? (the main activity that needs this surface in my C file is the mediaplayer's setVideoSurface() method which requires this surface.) Could anyone please let me know how to achieve this? Your advice is highly appreciated. thanks, Latha. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] [Android-developers] Overlay in Views. Please suggest
Hii All I need your help/suggestion on this issue. In my application, i have a surfaceView and a videoView which are occupying the full screen. SurfaceView is on the top and thus VideoView is hidden below. But i need to see both SurfaceView and VideoView together. How do i achieve this? I tried giving surfaceholder.setFormat(PixelFormat.RGBA_); and tried even this: surfaceholder_push.setFormat(PixelFormat.TRANSLUCENT); But nothing seem to bring my VIdeoView on my SurfaceView :( Can anyone please suggest something. I would appreciate your help. thanks in advance, Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] [Android-developers] ApiDemos' MediaPlayerDemo_Video not playing the video fully in new SDK 'android-sdk_r05-windows'
Hii All, I just got a new SDK 'android-sdk_r05-windows' from the site and tried the {android-sdk_r05-windows\android-sdk-windows}\samples\android-7\ApiDemos , but I found something strange with the MediaPlayerDemo_Video.java When i tried running a 3gp file ( which used to run perfectly fine on sdk1.6), i could see it not running. It however starts playing the video file but after a first frame or so, it stopped the animation. Has anybody tried this? What is wrong in here? Please share your experiences. thanks, Latha. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] [Android-developers] General question: Can't we have 2 projects(same) in 2 different locations and import them in eclipse?
Hii All I always face this problem in my eclipse. I would like have a copy of the apps in all the versions of SDKs/NDKs. And once i have a project in eclipse, and if i have to import the same project from a new location, i get the message saying can't import, project of the same name already exists Is this how it is? We cant import the same project from its 2nd location in eclipse? Everytime i delete the project from old location and put it in new :( ( i know, it is a very unacceptable approach). Can anybody please suggest me. Thanks Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] [Android-developers]How many SurfaceHolder objects can be created in one activity having one view?
Hi All, I need to have an app where i can play both video and audio using mediaplayer APIs. But my problem here is , for video . i have to use SURFACE_TYPE_PUSH_BUFFERS and pass this to mp.setDisplay(). SurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); Where as, An audio file can not be played with SURFACE_TYPE_PUSH_BUFFERS being On. What is the best solution to achieve this? Is it possible to have more than 2 SurfaceHolder objects can be created in one activity having one view?(one for audio with no SURFACE_TYPE_PUSH_BUFFERS and other one is for Video) Please do advise. thanks Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need help:Any Opencore APi to get the decoded frame of a video into a buffer??
Hi All Is it possible to get the decoded frame of a video in a buffer using Opencore Apis? Or is it like, the Opencore Media APis would directly update these frames on screen display? Any reply is greatly appreciated. Please do advise. thanks Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need Help : canvas.drawtext() for a lengthy string
Hi All I am stuck in a very simple problem. I have one lengthy string I need to draw that on the device display. My code is as follows: void ShowText(String text) { canv = thread.mSurfaceHolder.lockCanvas(); if (text!= null) { canv.drawColor(Color.WHITE); //background color mPaint.setColor(Color.BLACK); //font color mPaint.setTextSize(15); //font size canv.drawText(text, 10, 200, mPaint); //startign at some (10,200) coordinates , dratext } unlockCanvasAndPost(canv); } But the problem here is, the string is going out of the screen. I want it to break down into multiple lines if it is too big for the screen width. Can anybody show me some example to do this? Is there any other better way than using canvas class? please do suggest. Thanks Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need Help : calling a non-static Java method from C in Android
Hi All In my Android app, I need to call a non static java method from C/C++. But i get a blunt crash when i do it using GetMethodID/CallVoidMethod()1 methods. I have done like this: 1. Register the method using GetMethodID() as follows (mine is a cpp file): jmethodID xyz = (env)-GetMethodID( cls, showxyz, ()V); 2. And I call this method as follows: env-CallVoidMethod(cls, xyz); 3. In java, my showxyz() is defined this way(this basically enables a button which was disabled) void showxyz() { findViewById(R.id.btnPass).setEnabled(true); } And this crashes. But I have been using this method of calling Java funcs from C using a set of GetStaticMethodID/CallStaticVoidMethod()(for nonstatic methods) and that works always. But in this case, I have to call a non-static method and i get a crash. Can anybody please tel me where I am going wrong. I know this is a basic JNI knowledge. But I am left high and dry. Please do advise. thanks Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need Help: Is widestrings like LString allowed in Android?
Hii All Does anybody know about the behavoir of Android’s compiler for target on wide strings like L”string” ?? I have a piece of code like this: Unsigned short* TESTWSTRING[] = { L.jpg”, L”.txt” }; Will TESTWSTRING[0] TESTWSTRING[1] be widestrings ? In Win32, memory used by TESTWSTRING[0] is 5x2 bytes(inclusive of null termination). But in Android this is not the case. So wondering whether prepending “L” to a string is valid in Android or not? Can someone please explain this difference in behavior? Please do advise. thanks, Latha. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need help : JSR s supported in Android
oh thanks ..but any idea on what all JSRs supported in android? please do share this info -Latha On Mon, Nov 9, 2009 at 12:11 PM, Romain Guy romain...@google.com wrote: JSR 226 is not supported. On Sun, Nov 8, 2009 at 10:39 PM, Latha Shivanna latha...@gmail.com wrote: Hii All What are all the JSR s supported in Android? Is JSR 226 supported? Can anybody please let me know this. Thanks a lot Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need help : JSR s supported in Android
Hii All What are all the JSR s supported in Android? Is JSR 226 supported? Can anybody please let me know this. Thanks a lot Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: [Android-developers] Display APIs in Android?
OoO , i used drawbitmap(int[],) apis to replace my createbitmap() and drawbitmap() methods. Thanks a lot for your replies. I felt really dumb not to hit ctrl+space on eclipse :-| On Wed, Nov 4, 2009 at 6:14 PM, niko20 nikolatesl...@yahoo.com wrote: Hi, OnDraw gets a Canvas object passed to it. You basically draw directly to this object (Use Canvas's methods to do the drawing). However, you won't be double buffering then so you may see some flicker. -niko On Nov 4, 5:33 am, Latha Shivanna latha...@gmail.com wrote: You can directly draw onto surface bound with canvas passed in in your draw handler. You don't have to always first draw into bitmap then copy from bitmap to surface. can you please give me some sample code for the same? It would be really helpful. Or any references where i can have a look at for this draw handler example? -Latha On Wed, Nov 4, 2009 at 8:50 AM, Westermann Fu westerman...@gmail.com wrote: You can directly draw onto surface bound with canvas passed in in your draw handler. You don't have to always first draw into bitmap then copy from bitmap to surface. In fact, no matter what strategy you use you have not really drawn onto screen framebuffer directly, the last action is composing done by surfaceflinger service which sit in native layer but it only export limited method you can access. I think directly accessing /dev/ graphics/fb0 is not recommand by android platform. On Nov 4, 12:35 am, Latha Shivanna latha...@gmail.com wrote: I need some 2D apis. can anybody suggest something? Are there any ways to display a buffer on screen in native layer? I am aware of using some ioctl calls on /dev/graphics/fb0.(But it needs root access) Please do advise. -Latha On Tue, Nov 3, 2009 at 7:12 PM, sham shamcs shamc...@gmail.com wrote: you can use opengl also On Tue, Nov 3, 2009 at 5:54 PM, Latha Shivanna latha...@gmail.com wrote: Hii All Can anybody please tell me how can we display a buffer on screen? Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap(). Is there any other way of doing this in Java layer? Please do share your thoughts. thanks in advance Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Need Help : Profiler/task manager in Android
oh ya...adb shell top was enough for me . thank you Lance :) On Mon, Oct 26, 2009 at 6:49 PM, Lance Nanek lna...@gmail.com wrote: I've used the top command inside adb shell to see what percent of the CPU time an app was using before. There's a more advanced tool called traceview you might want to look into as well: http://developer.android.com/intl/fr/guide/developing/tools/traceview.html I haven't needed to use that one yet. On Oct 26, 8:10 am, Latha Shivanna latha...@gmail.com wrote: Hii All, My android app is running very slow and I doubt that it is not given enough CPU. So wanted to know if there is any way to check the CPU utilization by all apps at the time when I am running my app. Or any tool, by which we can get to know what all applications are running at some instance of time? I mean, some kind of a “task manager”? profiler? Please do share your inputs. thanks, Latha. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: arrays to be accessed by both JAVA n C thru JNI in an Android app
ya...I now create the new array only once in the beginning and release it once my app ends. Untill this release my array would be retained n used without being created once again. thank you Latha On Fri, Oct 23, 2009 at 11:39 PM, fadden fad...@android.com wrote: On Oct 23, 3:51 am, Latha Shivanna latha...@gmail.com wrote: The whole procedure is followed for (480x640) times. And so there is a redundant creation of the array for every frame display. Why do you have to create a new array each time? Why can't you re-use an existing one? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: [Android-developers] Display APIs in Android?
You can directly draw onto surface bound with canvas passed in in your draw handler. You don't have to always first draw into bitmap then copy from bitmap to surface. can you please give me some sample code for the same? It would be really helpful. Or any references where i can have a look at for this draw handler example? -Latha On Wed, Nov 4, 2009 at 8:50 AM, Westermann Fu westerman...@gmail.com wrote: You can directly draw onto surface bound with canvas passed in in your draw handler. You don't have to always first draw into bitmap then copy from bitmap to surface. In fact, no matter what strategy you use you have not really drawn onto screen framebuffer directly, the last action is composing done by surfaceflinger service which sit in native layer but it only export limited method you can access. I think directly accessing /dev/ graphics/fb0 is not recommand by android platform. On Nov 4, 12:35 am, Latha Shivanna latha...@gmail.com wrote: I need some 2D apis. can anybody suggest something? Are there any ways to display a buffer on screen in native layer? I am aware of using some ioctl calls on /dev/graphics/fb0.(But it needs root access) Please do advise. -Latha On Tue, Nov 3, 2009 at 7:12 PM, sham shamcs shamc...@gmail.com wrote: you can use opengl also On Tue, Nov 3, 2009 at 5:54 PM, Latha Shivanna latha...@gmail.com wrote: Hii All Can anybody please tell me how can we display a buffer on screen? Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap(). Is there any other way of doing this in Java layer? Please do share your thoughts. thanks in advance Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] [Android-developers] Display APIs in Android?
Hii All Can anybody please tell me how can we display a buffer on screen? Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap(). Is there any other way of doing this in Java layer? Please do share your thoughts. thanks in advance Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] [Android-developers] Display APIs in Android?
I need some 2D apis. can anybody suggest something? Are there any ways to display a buffer on screen in native layer? I am aware of using some ioctl calls on /dev/graphics/fb0.(But it needs root access) Please do advise. -Latha On Tue, Nov 3, 2009 at 7:12 PM, sham shamcs shamc...@gmail.com wrote: you can use opengl also On Tue, Nov 3, 2009 at 5:54 PM, Latha Shivanna latha...@gmail.com wrote: Hii All Can anybody please tell me how can we display a buffer on screen? Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap(). Is there any other way of doing this in Java layer? Please do share your thoughts. thanks in advance Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Need Help : Profiler/task manager in Android
Hii All, My android app is running very slow and I doubt that it is not given enough CPU. So wanted to know if there is any way to check the CPU utilization by all apps at the time when I am running my app. Or any tool, by which we can get to know what all applications are running at some instance of time? I mean, some kind of a “task manager”? profiler? Please do share your inputs. thanks, Latha. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] [Android-developers]arrays to be accessed by both JAVA n C thru JNI in an Android app
Hii All, I am facing a problem in my Android app which is calling native functions through JNI. So thought somebody in this group can help me to resolve this. The current code : 1. Create an array in JNI layer ( by NewIntArray()) which can be used by both Java C. 2. we can name that array as type ‘jintArray arrayX’. 3. We call GetIntArrayElements() on this ‘arrayX’ to get its elements i.e, int * elementsX. 4. This ‘elementsX’ would be used by a native call which will set it to some value.(project specific* : may not need interest for this issue) 5. We now get the updated value of ‘elementsX’. And copy it back to ‘arrayX’ using ReleaseIntArrayElements() . 6. We use ‘arrayX’ in bitmap/canvas class of Java layer to display on screen. The whole procedure is followed for (480x640) times. And so there is a redundant creation of the array for every frame display. Is there any way to avoid this creation of array for each frame. Any better solution to achieve the above? I am not getting a way out of this the performance of my app has gotten very low too:( Any JNI code snippets to modify steps (1 to 3 5) would be of great help to me. Appreciate your suggestions on this. thanks, Latha. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need Help : getheight()/width() API returning wrong screensize on device.
thanks a lot Lance and Richard. I was wrong when I said my API version is set. On changing uses-sdk android:minSdkVersion=3 / to uses-sdk android:minSdkVersion=4 / my issue was solved. thanks once again. cheers Latha On Thu, Oct 22, 2009 at 8:38 AM, Lance Nanek lna...@gmail.com wrote: Have you tried the android:targetSdkVersion attribute on the uses-sdk tag in AndroidManifest.xml? I was able to get the default display returned by the window service to switch from reporting 480x533 to 480x800 in a quick test just now by changing from this: uses-sdk android:minSdkVersion=3 / To this: uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4 / Both on the WVGA800 skin. No targetSdkVersion attribute and just setting minSdkVersion to 4 also gave 480x800. No uses-sdk tag at all gave 480x533. Not sure if you meant these attributes or the build target when you wrote that the API version is set. On Oct 21, 6:34 am, Latha Shivanna latha...@gmail.com wrote: Yes .. API version is set to 4 in my app. Even all the samples under SDK 1.6 are all 4. Still there is problem. Has anybody seen seen the APIDemos in SDK1.6 in a large screen by any chance? Please do share your knowledge. -Latha On Wed, Oct 21, 2009 at 3:08 PM, RichardC richard.crit...@googlemail.com wrote: Have you set your API version to 4 (SDK 1.6)? If I remember correctly - if your API is set to version 3 (or lower) the platform will run your application in emulation mode and scale it to the actual screen size. So you will never see the large screen. -- RichardC On Oct 21, 10:22 am, Latha Shivanna latha...@gmail.com wrote: Hii All, I am facing a small problem in my android app regarding its display resolution. Getwidth()/height() in my app is always giving me a screen size of (320x480) though the actual screensize of the target is (480x640). I checked APIdemos/lunarlander n other sample examples from the Android SDK on this device with 480x640. But they too are taking only the size ~320x480. Why is it? What API i should use to make my app occupy the entire screen? Any input from you is highly appreciated. thanks, Latha. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Need Help : getheight()/width() API returning wrong screensize on device.
Hii All, I am facing a small problem in my android app regarding its display resolution. Getwidth()/height() in my app is always giving me a screen size of (320x480) though the actual screensize of the target is (480x640). I checked APIdemos/lunarlander n other sample examples from the Android SDK on this device with 480x640. But they too are taking only the size ~320x480. Why is it? What API i should use to make my app occupy the entire screen? Any input from you is highly appreciated. thanks, Latha. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need Help : getheight()/width() API returning wrong screensize on device.
Yes .. API version is set to 4 in my app. Even all the samples under SDK 1.6 are all 4. Still there is problem. Has anybody seen seen the APIDemos in SDK1.6 in a large screen by any chance? Please do share your knowledge. -Latha On Wed, Oct 21, 2009 at 3:08 PM, RichardC richard.crit...@googlemail.com wrote: Have you set your API version to 4 (SDK 1.6)? If I remember correctly - if your API is set to version 3 (or lower) the platform will run your application in emulation mode and scale it to the actual screen size. So you will never see the large screen. -- RichardC On Oct 21, 10:22 am, Latha Shivanna latha...@gmail.com wrote: Hii All, I am facing a small problem in my android app regarding its display resolution. Getwidth()/height() in my app is always giving me a screen size of (320x480) though the actual screensize of the target is (480x640). I checked APIdemos/lunarlander n other sample examples from the Android SDK on this device with 480x640. But they too are taking only the size ~320x480. Why is it? What API i should use to make my app occupy the entire screen? Any input from you is highly appreciated. thanks, Latha. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Video problem - How to use a surface for both canvas and mediaplayer
Hii All I have a requirement in my application where i need to do 2 things : 1.use canvas to display a bitmap 2.use mediaplayer class to display a video. I tried using getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); and could see the video alone followed by an exception for canvas. This is expected as i am using SURFACE_TYPE_PUSH_BUFFERS. But if i dont use 'SURFACE_TYPE_PUSH_BUFFERS' then the video will not be seen but everythign that i have given for 'canvas' works. But i need to use both canvas and mediaplayer(for video) in my app. How can i achieve this? Or is it possible to create 2 surfaceviews, one for canvas and the other for mediaplayer.setDisplay() ?? can anybody please share with me the code if they have tried something like this? Please show me some path out of this. Any help is greatly appreciated. thanks in advance, Latha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Any API to get the time elapsed since the system was started?
Hi All In one of my Android app, I need to get the number of milliseconds that have elapsed since the system was started.(soemthing like GetTickCount() in Windows mobile) Is there any API for the same ? Or can anybody share the code, if they have done it already? Please do share your thoughts. Thanks for your help, Latha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Audio on Android : \frameworks\base\media\tests\mediaframeworktest
Hii All, I need to understand how an audio is being played by Android in its native level. I started looking at its '\frameworks\base\media\tests\MediaFrameworkTest' to track down the call sequence into the native level. I gave a LOG statement everywhere in all the functions that come under frameworks\base\media\jni\ thinking any Java Android API would call its corresponding JNI function which would then call its native code. But i did not see any of these LOG statements on my logcat. Can anybody please give me a call sequence for MediaPlayer.start(); till its native code?? i.e, MediaPlayer.start() - which JNI call(JNI File) in Android tree? - which Native function ?? I am sure there is a lot of expertise with you people on this. Could you please share it with me and help me to come out of my problem. Would be really grateful for any help. Thanks Latha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Query: Packing resources into an APK
Hii All, In one of my applications, I am pushing few image files say xyz.png into the device using adb push command. And I use these files in my application by giving their exact filepaths (say if I have pushed them into /data, I wud say /data/xyz.png). So to short it down, i wud say, I have a .apk and to run this apk I would push few files manually using adb commands and I use these files in my application by giving their full path. But my requirement is that I should not be pushing the files manually into the device. Instead I need these images to be a part of my .apk itself. And I should get their fullpath which are the input parameter to my method in the application. Is there any way to do this? Could anybody please help me in this. Any of your help is highly appreciated!! Please do suggest. Thanks Latha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] [android-developers]Query : Mouse event codes on Android
Hi All I am writing an application in which i need to handle mouse events. I am infact not sure on how Android supports mouse pointers. With all the discussions on android groups, i got a vague idea that it is nto suported. But could anyone please tel me if mouse is suported on Android. On WindowsMobile,we have WM_MOUSEMOVE ://move the pointer/cursor while pressing the left mouse button. WM_LBUTTONDOWN ://press the left mouse button WM_LBUTTONUP : //release the left mouse button WM_LBUTTONDBLCLK : //double-clicks the mouse I need to know the exact equivalent for these above events. I am trying with MotionEvent.ACTION_MOVE/MotionEvent.ACTION_DOWN/MotionEvent.ACTION_UP.But I am not quite sure if i am right or not. Please do help me,if you know anythign about this.Would appreciate any help. Thanks Latha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Messaging between 2 threads
Hi All I am writing an application in which i need to handle messages between the main thread(the deafult UI related thread) and the user created Gamethread. The requirement is like this. An activity(say Activity_X) is setting the view by setContentView(some View_Y). In Activity_X i have implemeted onCreateOptionsMenu() and onOptionsItemSelected() fucntions for creating menus a switch case for action to be taken on selecting those menus.Menu has items like resume/pause/zoom/ . All action to be take on selecting these menus are implemented in View_Y in a separate Gamethread by extending Thread class. So whenever a menu is selected in Activity_X i need to send a message to View_Y. And on receiving this ,a particular action/method should be called in View_Y(GameThread). How can i achieve this using Handlers?Is there any other way of doing this? Please do share with me some code snippets for these. Your advises are highly appreciable. Thank you for your time. -Latha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---