[android-developers] Re: Is it possible to rotate screen by program code but not accelerometer sensor?
You can set the orientation of the app in your manifest using android:screenOrientation on your activity element. That will hard-code it to rotate to landscape or portrait by default, then just use SENSOR_DELAY_UI when creating the handler as I think that's the slowest and uses the least battery. Maybe you can switch between landscape and portrait by modifying the activity since it's exposed in the xml it is probably exposed in the api too. Adam On Sep 18, 10:59 pm, San Zhang wrote: > I known it can be disabled by Settings. My meaning is if there are APIs to > manage rotate screen on system level but not my app only. > > 2010/9/19 Dianne Hackborn > > > On Fri, Sep 17, 2010 at 5:17 PM, San Zhang wrote: > > >> 2. Accelerometer consumed power greatly. > > > The power needed for the accelerometer is trivial next to the power needed > > for the screen. > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. 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] Live Wallpaper Preview/Real Conflict
I've made a LWP, and it seemingly runs perfectly, but the problem seems to lie in the fact that when you set the wallpaper, after the preview has loaded, it gets a out-of-memory. It seems that since all the engines are in the same VM I don't have enough memory to start it a second time. How can I tell if the preview is dead and freed? I've done what I could to ensure that as much is shared between the engines as possible, yet still out-of-memory on setting after the preview is loaded? Any thoughts would be great. -- 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: Easiest way to know if SD card has been prepared?
Perfect, the getExternalStorageState tells me everything I need to fix my bug, thanks. Adam On Sep 15, 7:51 am, Kumar Bibek wrote: > I guess, you can also check for Broadcasts, if you mount-remount your > sdcard frequently when your application/service is running. > > But, checking for the storage state is the surest way. > > -Kumar Bibekhttp://techdroid.kbeanie.com > > On Sep 15, 4:51 pm, Mark Murphy wrote: > > > On Wed, Sep 15, 2010 at 7:46 AM, HaMMeReD wrote: > > > How would one know if the SD card has been mounted at startup. > > > Environment.getExternalStorageState(). > > > > Perhaps some sort of callback/event/message that I can grab that tells > > > me when SD has been mounted/unmounted? > > > See the ACTION_MEDIA_* broadcast Intents, documented on the Intent class: > > >http://developer.android.com/reference/android/content/Intent.html > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy -- 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] Easiest way to know if SD card has been prepared?
How would one know if the SD card has been mounted at startup. Perhaps some sort of callback/event/message that I can grab that tells me when SD has been mounted/unmounted? My LWP starts before SD is available, but can check for add-ons that are on the SD card. I need to delay load until after it is ready when there is a dependency. Thanks in advance, Adam -- 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: Live Wallpaper WIN DEATH upon restart
I should say my solution to this problem was to create a new project and move the code into it. I didn't change any code at all, I just moved it all into another project and there is no more crash at shutdown. The only thing that has changed slightly is the manifest and wallpaper.xml which I changed so there would be no name collision on the phone. I don't really like solutions that don't make sense, but it works now and the bug seems to be gone. Adam On Sep 13, 3:09 pm, HaMMeReD wrote: > I pulled the logs during a logcat during the shutdown half of a > reboot. My wallpapers that do not uninstall on reboot do not show > those exact log records. > > It's the force close though, I'm not entirely sure why this wallpaper > isn't gracefully shutting down when earlier versions did. > > I'll probably have to use git-bisect to narrow it down to the commit > that the bug got introduced. > > Adam > > On Sep 13, 12:15 pm, Dianne Hackborn wrote: > > > > > That log isn't from a shutdown, it is from the app either being > > re-installed, uninstalled, or force stopped... and it is a pretty typical > > log for that case. > > > On Mon, Sep 13, 2010 at 2:02 AM, HaMMeReD wrote: > > > I'm getting a WIN DEATH message on shutdown from one of my live > > > wallpapers. Since this occurs at shutdown the user doesn't really > > > notice, it does however reset the lwp to the default paper upon the > > > next restart. > > > > Pertinent log message afaik follows. > > > > I/PackageManager( 120): Removing non-system > > > package:Hammer.App.VirtualWorld2^M > > > I/Process ( 120): Sending signal. PID: 692 SIG: 9^M > > > I/ActivityManager( 120): Force stopping package > > > Hammer.App.VirtualWorld2 uid=10111^M > > > W/ActivityManager( 120): Scheduling restart of crashed service > > > Hammer.App.VirtualWorld2/.GlDynamicBackground2 in 5000ms^M > > > I/ActivityManager( 120): Force stopping service > > > ServiceRecord{4429a6c8 Hammer.App.VirtualWorld2/.GlDynamicBackground2} > > > ^M > > > W/WallpaperService( 120): Wallpaper service gone: > > > ComponentInfo{Hammer.App.VirtualWorld2/ > > > Hammer.App.VirtualWorld2.GlDynamicBackground2}^M > > > I/WindowManager( 120): WIN DEATH: Window{44249828 > > > Hammer.App.VirtualWorld2.GlDynamicBackground2 paused=false}^M > > > > As far as I can tell the lwp isn't being destroyed via > > > Engine.onDestroy() on shutdown, I'm not entirely sure what else I need > > > to take care of so that the system can destroy it cleanly at shutdown? > > > > -- > > > 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 > > cr...@googlegroups.com> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. 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
[android-developers] Re: Live Wallpaper WIN DEATH upon restart
I pulled the logs during a logcat during the shutdown half of a reboot. My wallpapers that do not uninstall on reboot do not show those exact log records. It's the force close though, I'm not entirely sure why this wallpaper isn't gracefully shutting down when earlier versions did. I'll probably have to use git-bisect to narrow it down to the commit that the bug got introduced. Adam On Sep 13, 12:15 pm, Dianne Hackborn wrote: > That log isn't from a shutdown, it is from the app either being > re-installed, uninstalled, or force stopped... and it is a pretty typical > log for that case. > > > > On Mon, Sep 13, 2010 at 2:02 AM, HaMMeReD wrote: > > I'm getting a WIN DEATH message on shutdown from one of my live > > wallpapers. Since this occurs at shutdown the user doesn't really > > notice, it does however reset the lwp to the default paper upon the > > next restart. > > > Pertinent log message afaik follows. > > > I/PackageManager( 120): Removing non-system > > package:Hammer.App.VirtualWorld2^M > > I/Process ( 120): Sending signal. PID: 692 SIG: 9^M > > I/ActivityManager( 120): Force stopping package > > Hammer.App.VirtualWorld2 uid=10111^M > > W/ActivityManager( 120): Scheduling restart of crashed service > > Hammer.App.VirtualWorld2/.GlDynamicBackground2 in 5000ms^M > > I/ActivityManager( 120): Force stopping service > > ServiceRecord{4429a6c8 Hammer.App.VirtualWorld2/.GlDynamicBackground2} > > ^M > > W/WallpaperService( 120): Wallpaper service gone: > > ComponentInfo{Hammer.App.VirtualWorld2/ > > Hammer.App.VirtualWorld2.GlDynamicBackground2}^M > > I/WindowManager( 120): WIN DEATH: Window{44249828 > > Hammer.App.VirtualWorld2.GlDynamicBackground2 paused=false}^M > > > As far as I can tell the lwp isn't being destroyed via > > Engine.onDestroy() on shutdown, I'm not entirely sure what else I need > > to take care of so that the system can destroy it cleanly at shutdown? > > > -- > > 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 > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. 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
[android-developers] Re: how to know an opengl method is implemented?
Use glGetString and then search the resulting string to see if your extension exists. http://www.opengl.org/sdk/docs/man/xhtml/glGetString.xml Adam On Sep 13, 3:44 am, luma wrote: > I mean in runtime. > > Sometimes I get "called unimplemented OpenGL ES API" error but it can not be > catched. > Is there a way to figure out what function is implemented or not, in > runtime? -- 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] Live Wallpaper WIN DEATH upon restart
I'm getting a WIN DEATH message on shutdown from one of my live wallpapers. Since this occurs at shutdown the user doesn't really notice, it does however reset the lwp to the default paper upon the next restart. Pertinent log message afaik follows. I/PackageManager( 120): Removing non-system package:Hammer.App.VirtualWorld2^M I/Process ( 120): Sending signal. PID: 692 SIG: 9^M I/ActivityManager( 120): Force stopping package Hammer.App.VirtualWorld2 uid=10111^M W/ActivityManager( 120): Scheduling restart of crashed service Hammer.App.VirtualWorld2/.GlDynamicBackground2 in 5000ms^M I/ActivityManager( 120): Force stopping service ServiceRecord{4429a6c8 Hammer.App.VirtualWorld2/.GlDynamicBackground2} ^M W/WallpaperService( 120): Wallpaper service gone: ComponentInfo{Hammer.App.VirtualWorld2/ Hammer.App.VirtualWorld2.GlDynamicBackground2}^M I/WindowManager( 120): WIN DEATH: Window{44249828 Hammer.App.VirtualWorld2.GlDynamicBackground2 paused=false}^M As far as I can tell the lwp isn't being destroyed via Engine.onDestroy() on shutdown, I'm not entirely sure what else I need to take care of so that the system can destroy it cleanly at shutdown? -- 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: Opengl visual artifacts on droid
Still have this outstanding issue I think. Can't recreate because I don't make enough money to buy all the phones that my app fucks up on. It might be solved, but I did it using a solution I'd prefer to do better. Basically I'm assuming that it's texture corruption, because the OS isn't guaranteed to keep things in texture memory around. Right now I reload textures on every onSurfaceChanged() call which puts a delay in there, but should ensure free textures whenever it's visible. Basically what I'm trying to figure out is how do I quickly test if a texture needs to be reloaded. I can easily adapt this for all textures used in my app, I just need to know how do I ask the question "Is opengl texture id #x still valid?" I don't want to force reloads everytime they might be corrupt, I'd rather do it on a texture by texture basis and test only in the situations where they might have gone corrupt, to minimize any user delays. Adam On Aug 14, 3:41 pm, HaMMeReD wrote: > A user sent me a screenshot of visual artifacting on droid. Apparently > it only happens with multi-texturing enabled. > --> Screenshot:http://adamhammer.ca/images/stories/cap201008140037.jpg > > If I understand correctly though the GPU in the Droid 1 is ES2.0 > Compliant, so it should have at least 2 texture units, any idea why > I'm getting this weird look in my app on the Droid 1? > > Adam -- 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] Opengl visual artifacts on droid
A user sent me a screenshot of visual artifacting on droid. Apparently it only happens with multi-texturing enabled. --> Screenshot: http://adamhammer.ca/images/stories/cap201008140037.jpg If I understand correctly though the GPU in the Droid 1 is ES2.0 Compliant, so it should have at least 2 texture units, any idea why I'm getting this weird look in my app on the Droid 1? Adam -- 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: Opengl Direct/NonDirect Buffer
Fixed, problem was that I forget the "bb.order(ByteOrder.nativeOrder())" so that the memory was in the correct format. On Aug 4, 5:40 pm, HaMMeReD wrote: > Been getting a headache with some 2d Opengl coordinates and putting > them in a direct buffer. > > I have a basic square defined as such > > static float[] Coords = new float[] { > -0.5f,-0.5f, > 0.5f,-0.5f, > 0.5f,0.5f, > -0.5f,0.5f, > }; > static FloatBuffer VertexBuffer; > > This Works, but no guarantee of direct buffer, exception thrown when > indirect buffer is used > static { > VertexBuffer = FloatBuffer.wrap(Coords); > } > > This runs, no segfault or anything, and when I iterate through the > buffer the size and values seem exactly the same (8 elements, ordered > just as the array). What happens though is that my draw() function > draws nothing, it works one way, but doesn't work the other way. I use > Direct Buffers in a lot of my other geometry. I have to get direct > buffers working or I know that my software might not be reliable. > > static { > ByteBuffer bb = > ByteBuffer.allocateDirect(Coords.length*(Float.SIZE/ > Byte.SIZE)); > VertexBuffer = bb.asFloatBuffer(); > for (int i=0; i< Coords.length; i++) { > VertexBuffer.put(i, Coords[i]); > } > } > > My Drawing function is as follows, if it helps. > > public void draw (GL10 gl) { > gl.glPushMatrix(); > gl.glTranslatef(x,y,0); > gl.glScalef(width,height,0); > gl.glEnable(GL10.GL_VERTEX_ARRAY); > gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); > gl.glTexCoordPointer(2,GL10.GL_FLOAT,0, MapBuffer); > gl.glFrontFace(GL10.GL_CW); > gl.glVertexPointer(2,GL10.GL_FLOAT, 0, VertexBuffer); > gl.glBindTexture(GL10.GL_TEXTURE_2D, Textures[0]); > gl.glDrawArrays(GL10.GL_TRIANGLE_FAN, 0, 4); > gl.glBindTexture(GL10.GL_TEXTURE_2D, 0); > gl.glDisable(GL10.GL_VERTEX_ARRAY); > gl.glDisable(GL10.GL_COLOR_ARRAY); > gl.glPopMatrix(); > } -- 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] Opengl Direct/NonDirect Buffer
Been getting a headache with some 2d Opengl coordinates and putting them in a direct buffer. I have a basic square defined as such static float[] Coords = new float[] { -0.5f,-0.5f, 0.5f,-0.5f, 0.5f,0.5f, -0.5f,0.5f, }; static FloatBuffer VertexBuffer; This Works, but no guarantee of direct buffer, exception thrown when indirect buffer is used static { VertexBuffer = FloatBuffer.wrap(Coords); } This runs, no segfault or anything, and when I iterate through the buffer the size and values seem exactly the same (8 elements, ordered just as the array). What happens though is that my draw() function draws nothing, it works one way, but doesn't work the other way. I use Direct Buffers in a lot of my other geometry. I have to get direct buffers working or I know that my software might not be reliable. static { ByteBuffer bb = ByteBuffer.allocateDirect(Coords.length*(Float.SIZE/ Byte.SIZE)); VertexBuffer = bb.asFloatBuffer(); for (int i=0; i< Coords.length; i++) { VertexBuffer.put(i, Coords[i]); } } My Drawing function is as follows, if it helps. public void draw (GL10 gl) { gl.glPushMatrix(); gl.glTranslatef(x,y,0); gl.glScalef(width,height,0); gl.glEnable(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); gl.glTexCoordPointer(2,GL10.GL_FLOAT,0, MapBuffer); gl.glFrontFace(GL10.GL_CW); gl.glVertexPointer(2,GL10.GL_FLOAT, 0, VertexBuffer); gl.glBindTexture(GL10.GL_TEXTURE_2D, Textures[0]); gl.glDrawArrays(GL10.GL_TRIANGLE_FAN, 0, 4); gl.glBindTexture(GL10.GL_TEXTURE_2D, 0); gl.glDisable(GL10.GL_VERTEX_ARRAY); gl.glDisable(GL10.GL_COLOR_ARRAY); gl.glPopMatrix(); } -- 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: EglSwapBuffers
Thanks for the response, It just takes a huge block in the profiler, but I do understand that the JNI calls are like a black hole to the profiler and I can't see what's happening inside them, nor do I understand the inner working mechanics of opengl all that well. I'll just forget about it for now and call my code optimized for now. Adam On Jul 15, 3:39 am, Alexey Kryshen wrote: > Hello! > > 5% for the SwapBuffer is not a big deal. It is possible it took the > 90% of frame time under some circumstances. > > Please note following: > 1) SwapBuffer has implicit glFinish() semantic. All the GL commands > issued prior the SwapBuffer will be completed before actual swap is > occur. And it is can take the time. > 2) eglSwapBuffer also involve something similar to the "VSync" and it > can take the time too.Please see the eglSwapInterval() in the EGL > specification for details > 3) If you have issued extremely small number of GL commands per frame > then it can be just that they really executed faster compared to > SwapBuffer in respect to (1) and (2) > > But in my opinion 5% is not the value to be bothered with. > > Best regards, Alexey > > On Jul 15, 12:17 pm, HaMMeReD wrote: > > > > > I noticed in the profiler that eglSwapBuffers is taking up about 5% of > > my time each frame in some opengl code I'm writing. It seems like > > quite a heavy for something that should just be a blit, is there > > anything in my egl setup I can do to optimize this more? -- 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] EglSwapBuffers
I noticed in the profiler that eglSwapBuffers is taking up about 5% of my time each frame in some opengl code I'm writing. It seems like quite a heavy for something that should just be a blit, is there anything in my egl setup I can do to optimize this more? -- 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: Bitmap GetPixel broken??
Thanks Romain, solved my problem quickly. Adam On Jul 11, 12:36 pm, Romain Guy wrote: > When an image is opaque, it is dithered at loading time. You can use > BitmapFactory.Options to disable dithering. You can also force > BitmapFactory to load the image in ARGB_ format to avoid > dithering. > > > > > > On Sun, Jul 11, 2010 at 12:31 PM, HaMMeReD wrote: > > I'm trying to load a image, for the purpose of debugging I've made the > > image a solid grey #494949. > > > I load it with the following code > > > inputstream = > > context.getResources().openRawResource(R.drawable.level1_heightmap); > > level1_heightmap = BitmapFactory.decodeStream(inputstream); > > > Although when I run getpixel on the image it does not give a uniform > > value, I put this debugging code in to confirm > > for (int i=0;i<100;i++) > > { > > Log.d("Debug", > > "COLOR"+level1_heightmap.getPixel((int) > > (Math.random()*level1_heightmap.getWidth()),(int) > > (Math.random()*level1_heightmap.getWidth(; > > } > > > Which outputs the following colors > > COLOR-11908790 and COLOR 11383470 > > > Considering the image is a solid grey, shouldn't it just be outputting > > one number? Is there 2 levels of loading for BitmapFactory and how do > > I ensure that the image is fully loaded before working with it? > > > -- > > 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
[android-developers] Bitmap GetPixel broken??
I'm trying to load a image, for the purpose of debugging I've made the image a solid grey #494949. I load it with the following code inputstream = context.getResources().openRawResource(R.drawable.level1_heightmap); level1_heightmap = BitmapFactory.decodeStream(inputstream); Although when I run getpixel on the image it does not give a uniform value, I put this debugging code in to confirm for (int i=0;i<100;i++) { Log.d("Debug", "COLOR"+level1_heightmap.getPixel((int) (Math.random()*level1_heightmap.getWidth()),(int) (Math.random()*level1_heightmap.getWidth(; } Which outputs the following colors COLOR-11908790 and COLOR 11383470 Considering the image is a solid grey, shouldn't it just be outputting one number? Is there 2 levels of loading for BitmapFactory and how do I ensure that the image is fully loaded before working with it? -- 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: Avoiding GPL
If you can use it without modifying the source then just do it, and provide credit to the library creator clearly in your app. If you need to modify the source, then you need to be able to provide the modifications. If you need to integrate it with your app deeply so that you can't use the modified version without your app, then you need to open source the entire thing. IANAL but using a open source library in a closed source project without any modification should not provide any serious legal issues as long as everyone is properly credited and there is no stipulations in the license or on the creators website. I wouldn't recommend doing complex workarounds, because it just increases the amount of changes and dependencies between your app and the open source app, and shows that you were trying to circumvent things. Just do your best to not change it, and check the creators site to see if they sell alternate licenses that might server your needs better, if you do need to modify the source in certain ways. Adam Hammer On Jun 22, 12:10 am, Naveen wrote: > Hi! > I need to use some open source code with GPL3. > > As usual I don't want to open source code for full application. > > Now what I understand is if I make two separate process one with my > main application code and other as a service or something with Open > source library then in that case I have to open source code only for > the other one. > > Now the question is what is the best way to do so in Android. > > Suppose > My Main App is A > Open Source code is B > > So A will give some data to B. B will process this and sends data back > to A. B may not need to have any UI. > > 1. Is it possible to install 2 seperate applications / processes from > one APK? > 2. What is the best way ?Should B be a service? How will be the > communication between A and B ? > 3. Is it possible to run/call B from A? > > Pls. advice > > Thanks -- 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: MusicVis live wallpaper
Thank you for your response. Has this functionality been standardized or made available in froyo? I can't seem to get it to work there either? Just a bit annoying to have features I want to implement but nice to know it isn't from lack of trying. Was doing some development around that feature, while I can put it aside for now it would be nice to know the roadmap for this since eclair shipped with wallpapers that support this feature. I'll sideline any attempts to use this feature in any of my apps for the time being but it'd be nice to know I can infact make more music-vis wallpapers, it's something I really like the idea of doing. Adam On May 28, 11:27 am, Romain Guy wrote: > Hi, > > The music live wallpapers rely on APIs that we have not made public in > the SDK yet. These APIs were added very late in the development > process and we haven't had the time to properly turn them into > maintainable and documented APIs. > > > > > > On Fri, May 28, 2010 at 12:48 AM, HaMMeReD wrote: > > The live wallpapers that do music visualization rely on a function > > MediaPlayer.snoop(shortarray, offset?) , but I can't seem to find > > these static functions in the official api. > > > Eclipse doesn't seem to want to compile if I use the function in my > > code. > > > Any idea's? > > > -- > > 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
[android-developers] MusicVis live wallpaper
The live wallpapers that do music visualization rely on a function MediaPlayer.snoop(shortarray, offset?) , but I can't seem to find these static functions in the official api. Eclipse doesn't seem to want to compile if I use the function in my code. Any idea's? -- 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] NDK / glsl / Es 2.0 advice please?
Working with NDK here. How are perspective correct projection supposed to occur in es 2.0. I can currently draw my geometry to the screen, but it is not getting transformed to 2d. Is there some sort of way of getting meaningful compiler errors out of the shader compiler? Is there a android specific reference to glsl support on it? Am I even supposed to be doing projections in my glsl? I was using "hello-gl2" as a baseline, and then modified it to load additional geometry, which is rendering correctly although flat, without any translation or projection. Any advice on translation/ projection is appreciated too, since it seems that all of that has disappeared from es2.0. I've got a opengl 1.1 live screensaver that I've developed that I want to work on porting critical sections to NDK and es2.0, so any advice on porting gl11 to gl20 is appreciated. -- 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