[android-developers] Re: OpenGL texture corrupted when there's an interruption.
I don't see gl.glEnableClientState(GL10.{GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY}) in your code. Also don't forget to call GLSurfaceView's onPause() and onResume() methods (in corresponding Activity methods). Dmitry On Aug 11, 11:42 am, alucard20004 alucard20...@gmail.com wrote: I took the source from API demos (TriangleRenderer.java) Here's the code on how textures are loaded in onSurfaceCreated(): /* * Create our texture. This has to be done each time the * surface is created. */ int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); mTextureID = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_REPLACE); InputStream is = mContext.getResources() .openRawResource(R.drawable.robot); Bitmap bitmap; try { bitmap = BitmapFactory.decodeStream(is); } finally { try { is.close(); } catch(IOException e) { // Ignore. } } GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle(); And here's how I mapped my texture: / public void onDrawFrame(GL10 gl) { //Init gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); //Draw Cube gl.glPushMatrix(); gl.glTranslatef(0, 0, -2); gl.glRotatef(azimuthZ, 0, 0, 1); //azimuthZ is from the sensors //texBuff and boxBuff are texture and box coordinates gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, texBuff); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, boxBuff); //top gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4); //bottom gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 4, 4); // followed by left, right, front and back sides... gl.glPopMatrix(); / Problem: 1. The box is rendering normally. 2. I press 'Call' button, the Dialer app comes up. 3. I press 'Back' button. My box app comes up. 4. The texture became corrupted... - This does not happen if I press back while in the box app, and re- launch the box app. - This also does not happen in the Textured Triangle in API demos. I've no idea what did I do wrong. -_- Thank you in advance. --~--~-~--~~~---~--~~ 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: sharing database across applications
My suggestion'd be to go for the custom content provider. That'd make things much easier for u... But thats me. It depends on ur application its current architecture. On Tue, Aug 11, 2009 at 10:43 AM, Acchao blazin...@gmail.com wrote: What's the most convenient way to share a database across applications? For example, I want my application's dbadapter to query the android's native contact database so when a contact on the phone is deleted, similarly that contact is removed from my application. Should i use an attach statement to attach the table? Or would the better/more secure approach be to create a custom contentprovider query onCreate of my app to verify all contacts in my application still reside on the Contacts.db ? Any help or suggestions would be appreciated. Thanks in advance. Best, Acchao -- Regards, Sujay Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html - Computers are useless. They can only give you answers. --~--~-~--~~~---~--~~ 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: Dialog windowBackground makes parent window go black
I kept running into this problem, and I think I have found the cause. Specifying an activity is a dialog in the manifest, for me, kept causing the background screen to be lost (not all the time - some dialogs would work ok). However, if I made my dialogs via code, Ie: sub-classed Dialog, and in the dialog I call this.getContext().setTheme (R.style.SpecialDialog); Then, so far, it keeps the background screen. Hooray! On Aug 7, 12:03 am, CraigsRace craig...@gmail.com wrote: The parent window had a 120Kb jpeg picture on it. I used more compression on the jpeg and got it down to 32Kb, and bingo, the parent window stopped disappearing! Yay me! On Aug 6, 10:39 am, CraigsRace craig...@gmail.com wrote: Hi, I wanted to change the frame around my Dialog. So I set up a style: resources style name=SpecialDialog parent=android:Theme.Dialog item name=android:windowBackground@drawable/my_frame/ item /style /resources and assigned it in the manifest: activity android:name=.MyActivity android:theme=@style/ SpecialDialog And yay! I get my new frame. However, the parent window disappears (goes black). Having a normal dialog: activity android:name=.MyActivity android:theme=@android:style/ Theme.Dialog keeps the parent window visible. Can I have a custom frame on a dialog and keep the parent window visible? 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: How/where to submit the apps to ADC2?
Any update as whats going on ? On Aug 10, 8:44 pm, manoj manojkumar.m...@gmail.com wrote: Thanks for your reply. On Aug 10, 4:37 pm, Mark Murphy mmur...@commonsware.com wrote: manoj wrote: Hi friends, I developed an application for android. I would like to submit the same to ADC2 (Android Developer Challenge2). I didnt find any source to submit the apps. Can any one please suggest me the sites to submit the apps? They have not announced the process for this yet. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android 1.5 Programming Books:http://commonsware.com/books.html- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: why camera is rotated
Hi, I use google htc innovation and i am developing and apllication which uses camera to take picture and capture video. in both cases i get rotated picture\video. On Aug 10, 9:42 pm, Dash125 paulgig...@gmail.com wrote: Hi, I think it would be helpful to know which devices you are developing/testing on. On Aug 5, 6:31 pm, engin enginarsla...@gmail.com wrote: Hi, I am trying to useCamerato take picture and to video recording but it always runs in portrait mode. Even if I tried to sreenOrientatiton=landscape it solved screen appearance but when I take photo andcapturevideo they are still saved rotated 90 degrees. I searched it but ı could not find clear solution. Can anybody help me Thanks.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Back Navigation to defined Activity
Hi Marco Nelissen, thanks for the quick response. The code I posted before is implemented within a base Activity within my test project. The other Activities are derived from this one. The only difference is, they set a different title. The problem was, that the other activities remain on the stack and when I use the back navigation, they are displayed instead of closing the application. The strangest thing happened this morning – as I tested it again to confirm this post, it worked. :-) Don't ask me why but it did. So, thanks again but the problem solved itself. Best regards, Aracos --~--~-~--~~~---~--~~ 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] movie gif 图片显示 时被分割
在用Movie类显示“老婆我爱你”这几个字的图片时,“我爱你”被分割成“我爱”和“你”且斜着显示? --~--~-~--~~~---~--~~ 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] sdk for windows from source code
how to build the sdk for windows from android source code? Regards Pradeep --~--~-~--~~~---~--~~ 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] Liniting no of values in Grid
Hello all, Is it possible to limit the number of values in the GridView? I want a gridView which will display only 9 elements(like Images 3X3) at a time while user can move it in horizontal way so that next elements will replace the current Elements in same View. Thanks in advance. Regards; Swapnil Dalal. --~--~-~--~~~---~--~~ 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] Chart API
Hi, I got a Mail from Google they would/could a App of mine if I improve my Chart. The Lady recommended to use: http://code.google.com/apis/chart/types.html but how do I implement that in Android? Any Experience in that, Demo Code, whatever? Greets Chris --~--~-~--~~~---~--~~ 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 texture corrupted when there's an interruption.
Hi. Thank you for your reply. Actually I've done as you suggested. Here's my full onSurfaceCreated() and my activity's onPause(): public void onSurfaceCreated(GL10 gl, EGLConfig config) { frontTextureId = loadTexture(gl, frontTextureBitmap); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glShadeModel(GL10.GL_SMOOTH); gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); gl.glClearDepthf(1.0f); gl.glEnable(GL10.GL_DEPTH_TEST); gl.glDepthFunc(GL10.GL_LEQUAL); gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); } @Override protected void onPause() { super.onPause(); mySurfaceView.onPause(); } While waiting for your answer I'll take a look at TriangleRenderer.java again to see what is the difference between that code and mine. Thanks again. --~--~-~--~~~---~--~~ 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: Launching a Service at the startup
I was also considering a service for my app, but reading this thread i have second thoughts... Basically, all i want is a function to be called at a preset time (every day). What's the recommended way of doing this without a service? Thanks, Teo On Aug 4, 2:09 am, Mark Murphy mmur...@commonsware.com wrote: R Ravichandran wrote: Thanks Mark. Actually the code I posted missed out the 'onStart' method details that I actually tried. Here is the actual 'onStart' method of the MyService class I used where I create the thread and starting it. @Override public void onStart(Intent intent, int startId) { System.out.println (MyService ))); super.onStart(intent, startId); Thread t = new Thread(this); t.start(); } I modified the run method I put some System.out. statement inside a while(true) loop. The idea was to keep this service running as long as the device is on. But it looks like the system is sending a SIG 9 to kill the process (process id 697) for the 'service'. Here is the logcat lines that I see. D/installd( 557): DexInv: --- BEGIN '/data/app/vmdl51510.tmp' --- I/System.out( 697): =: inside the run methodCount = 49 I/System.out( 697): =: inside the run methodCount = 50 D/dalvikvm( 722): DexOpt: load 41ms, verify 52ms, opt 1ms D/installd( 557): DexInv: --- END '/data/app/vmdl51510.tmp' (success) --- D/PackageManager( 583): Services: com.bn.InStoreWifiConnectivityManager D/PackageManager( 583): Receivers: com.bn.InStoreWiFiServiceInitiator I/System.out( 697): =: inside the run methodCount = 51 I/installd( 557): move /data/dalvik-cache/d...@a...@vmdl51510@classes.dex - /data/dalvik-cache/d...@a...@com.bn@classes.dex D/PackageManager( 583): New package installed in /data/app/com.bn.apk I/System.out( 697): =: inside the run methodCount = 52 D/AndroidRuntime( 708): Shutting down VM D/dalvikvm( 708): DestroyJavaVM waiting for non-daemon threads to exit D/dalvikvm( 708): DestroyJavaVM shutting VM down D/dalvikvm( 708): HeapWorker thread shutting down D/dalvikvm( 708): HeapWorker thread has shut down D/jdwp ( 708): JDWP shutting down net... D/dalvikvm( 708): VM cleaning up D/dalvikvm( 708): LinearAlloc 0x0 used 627404 of 4194304 (14%) D/ActivityManager( 583): Uninstalling process com.bn http://com.bn I/System.out( 697): =: inside the run methodCount = 53 D/ActivityManager( 583): Force removing process ProcessRecord{436ea918 697:com.bn/10020 http://com.bn/10020} (com.bn/10020 http://com.bn/10020) W/ActivityManager( 583): Scheduling restart of crashed service com.mypackage/.MyService in 5000ms I/Process ( 583): Sending signal. PID: 697 SIG: 9 D/ActivityManager( 583): Received spurious death notification for thread android.os.binderpr...@436c0898 E/ActivityThread( 583): Failed to find provider info for android.server.checkin W/Checkin ( 583): Can't log event SYSTEM_SERVICE_LOOPING: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/events Looks the process Id 583 is the one that sends SIG 9. Any idea why this is happening? Possibly, it's because your service crashed: W/ActivityManager( 583): Scheduling restart of crashed service com.mypackage/.MyService in 5000ms Usually, logcat will show a stack trace associated with service crashes. Bear in mind, though, that your process will be shut down for other reasons as well, such as memory reclamation. Keeping a service running all the time is an Android code smell -- while it is possible, and there are occasions when it is the right design, it feels like the vast majority of people try it when they don't need it. Consider using an AlarmManager to start your service on a periodic basis, and have the service stopSelf() when the background thread is done performing that cycle's worth of work. This will be more reliable and, for reasonably long alarm periods, more efficient. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! --~--~-~--~~~---~--~~ 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: Launching a Service at the startup
Sorry, i forgot that i can pass any intent to the alarm, please ignore my question :) On Aug 11, 11:05 am, Teo teomina...@gmail.com wrote: I was also considering a service for my app, but reading this thread i have second thoughts... Basically, all i want is a function to be called at a preset time (every day). What's the recommended way of doing this without a service? Thanks, Teo On Aug 4, 2:09 am, Mark Murphy mmur...@commonsware.com wrote: R Ravichandran wrote: Thanks Mark. Actually the code I posted missed out the 'onStart' method details that I actually tried. Here is the actual 'onStart' method of the MyService class I used where I create the thread and starting it. @Override public void onStart(Intent intent, int startId) { System.out.println (MyService ))); super.onStart(intent, startId); Thread t = new Thread(this); t.start(); } I modified the run method I put some System.out. statement inside a while(true) loop. The idea was to keep this service running as long as the device is on. But it looks like the system is sending a SIG 9 to kill the process (process id 697) for the 'service'. Here is the logcat lines that I see. D/installd( 557): DexInv: --- BEGIN '/data/app/vmdl51510.tmp' --- I/System.out( 697): =: inside the run methodCount = 49 I/System.out( 697): =: inside the run methodCount = 50 D/dalvikvm( 722): DexOpt: load 41ms, verify 52ms, opt 1ms D/installd( 557): DexInv: --- END '/data/app/vmdl51510.tmp' (success) --- D/PackageManager( 583): Services: com.bn.InStoreWifiConnectivityManager D/PackageManager( 583): Receivers: com.bn.InStoreWiFiServiceInitiator I/System.out( 697): =: inside the run methodCount = 51 I/installd( 557): move /data/dalvik-cache/d...@a...@vmdl51510@classes.dex - /data/dalvik-cache/d...@a...@com.bn@classes.dex D/PackageManager( 583): New package installed in /data/app/com.bn.apk I/System.out( 697): =: inside the run methodCount = 52 D/AndroidRuntime( 708): Shutting down VM D/dalvikvm( 708): DestroyJavaVM waiting for non-daemon threads to exit D/dalvikvm( 708): DestroyJavaVM shutting VM down D/dalvikvm( 708): HeapWorker thread shutting down D/dalvikvm( 708): HeapWorker thread has shut down D/jdwp ( 708): JDWP shutting down net... D/dalvikvm( 708): VM cleaning up D/dalvikvm( 708): LinearAlloc 0x0 used 627404 of 4194304 (14%) D/ActivityManager( 583): Uninstalling process com.bn http://com.bn I/System.out( 697): =: inside the run methodCount = 53 D/ActivityManager( 583): Force removing process ProcessRecord{436ea918 697:com.bn/10020 http://com.bn/10020} (com.bn/10020 http://com.bn/10020) W/ActivityManager( 583): Scheduling restart of crashed service com.mypackage/.MyService in 5000ms I/Process ( 583): Sending signal. PID: 697 SIG: 9 D/ActivityManager( 583): Received spurious death notification for thread android.os.binderpr...@436c0898 E/ActivityThread( 583): Failed to find provider info for android.server.checkin W/Checkin ( 583): Can't log event SYSTEM_SERVICE_LOOPING: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/events Looks the process Id 583 is the one that sends SIG 9. Any idea why this is happening? Possibly, it's because your service crashed: W/ActivityManager( 583): Scheduling restart of crashed service com.mypackage/.MyService in 5000ms Usually, logcat will show a stack trace associated with service crashes. Bear in mind, though, that your process will be shut down for other reasons as well, such as memory reclamation. Keeping a service running all the time is an Android code smell -- while it is possible, and there are occasions when it is the right design, it feels like the vast majority of people try it when they don't need it. Consider using an AlarmManager to start your service on a periodic basis, and have the service stopSelf() when the background thread is done performing that cycle's worth of work. This will be more reliable and, for reasonably long alarm periods, more efficient. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! --~--~-~--~~~---~--~~ 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: clear sms notifications
i think the sound notification can be switched off for all incoming sms. after filtering the control- sms you send a notification for the normal messages. but there will still be the problem of the notification on the status bar. Mak --~--~-~--~~~---~--~~ 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] One picture, ACTION_VIEW, and no navigation
Hi all, I have a small clickable ImageView representing one of the pictures the user took with the device. When the user clicks on this ImageView, I’d like the picture to be displayed in full screen mode. I’ve found the ACTION_VIEW action to do that, except that with ACTION_VIEW, the user can then navigate into his entire picture gallery. Is there a way to avoid that? I only want this one picture do be reachable. I know I can always create an activity that displays the picture, but it won’t be that easy to handle the zoom in and zoom out buttons I guess… Thanks for your answers! --~--~-~--~~~---~--~~ 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] standart c library
Hi folks, i dont understand why the speaker in the video anatomy physiology of an Android is saying that the standard libc library stands under the GPL license and not LGPL. The Video a href=http://sites.google.com/site/io/anatomy--physiology-of-an- android The Video look at 17:40 until 19:00 /a Thanks in advance --~--~-~--~~~---~--~~ 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: Dialog windowBackground makes parent window go black
Hi! I am facing a similar problem. All I want to do is remove the title from an Activity that I am trying to show as a Dialog. Could you please post some more details on how you managed to solve the problem? I am using the following code to modify the Dialog theme: ?xml version=1.0 encoding=utf-8? resources style name=MyCustomTheme parent=@android:style/ Theme.Dialog item name=android:windowNoTitletrue/item /style /resources It doesn't matter where I apply the theme, I always loose the background. Thanks! On 11 avg., 08:02, CraigsRace craig...@gmail.com wrote: I kept running into this problem, and I think I have found the cause. Specifying an activity is a dialog in the manifest, for me, kept causing the background screen to be lost (not all the time - some dialogs would work ok). However, if I made my dialogs via code, Ie: sub-classed Dialog, and in the dialog I call this.getContext().setTheme (R.style.SpecialDialog); Then, so far, it keeps the background screen. Hooray! On Aug 7, 12:03 am, CraigsRace craig...@gmail.com wrote: The parent window had a 120Kb jpeg picture on it. I used more compression on the jpeg and got it down to 32Kb, and bingo, the parent window stopped disappearing! Yay me! On Aug 6, 10:39 am, CraigsRace craig...@gmail.com wrote: Hi, I wanted to change the frame around my Dialog. So I set up a style: resources style name=SpecialDialog parent=android:Theme.Dialog item name=android:windowBackground@drawable/my_frame/ item /style /resources and assigned it in the manifest: activity android:name=.MyActivity android:theme=@style/ SpecialDialog And yay! I get my new frame. However, the parent window disappears (goes black). Having a normal dialog: activity android:name=.MyActivity android:theme=@android:style/ Theme.Dialog keeps the parent window visible. Can I have a custom frame on a dialog and keep the parent window visible? 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: Setting a listener for drag animations in MapView
Is is really true that there are no hooks for pan and zoom events for MapView? If this is true then how are we supposed to handle these common cases where we have more data than we can or want to fit on a single overlay for the entire globe? Please tell me I'm missing something here, this would seem to make MapView a very limited tool indeed. It's the way it's appearing to me. I didn't want to jump to conclusions since I'm just starting with the framework, but I've tried every Scroll and Animation hook I could find, and I couldn't get any results. Christoph's solution in this thread seems to have the same issues, so I assume that it's indeed a problem with the library. I'll try to submit a bug report to google, if I can find their issues page. --~--~-~--~~~---~--~~ 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: Slow GPS updates
On my G1, it seems that the fastest updates from the GPS occur every two seconds. They can be quite accurate, within two metres, but I haven't found out how to increase the frequency. Paul. --~--~-~--~~~---~--~~ 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] book page flip transition
Hi Experts, i am trying to have a nextpage transition like book page. at the moment i just change the image on imageview and move from left to right but this doesn't look good. i believe book page transition is available in iphone but i doesn't seem to have any single example for android. 3d rotation in api demo doesn't help me any help would be 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 -~--~~~~--~~--~--~---
[android-developers] How to activate the flashlight of the Samsung Galaxy
Hello everybody, I am developing a photo app and I want to add a flashlight for taking better photos. The app should know: This is a Samsung Galaxy,I have to activate the flashlight. Do you know how to realize it? Thank you so much in advance Viktor --~--~-~--~~~---~--~~ 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] Changes in API in 1.5 - onFreeze and friends
In order to bring myself up to speed with Android, I'm trying to get this example application: http://www.helloandroid.com/node/110 working in Android 1.5. I'm making reasonable progress, and most of the API changes I've successfully overcome so far make sense. But one class, URLEditor (subclassing Activity), has a method: @Override protected void onFreeze(Bundle outState) { super.onFreeze(outState); outState.putString(url, mText.getText().toString()); } I understand that the purpose of onFreeze was to enable the state of an activity to be persisted through a period of dormancy. Is it no longer necessary to do this, and if it is still necessary, what mechanism does the 1.5 API provide for this? --~--~-~--~~~---~--~~ 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: fatal: Out of memory, malloc failed fatal: index-pack failed
human android wrote: I am trying to do repo sync and every time I get this error. fatal: Out of memory, malloc failed fatal: index-pack failed Any ideas how to get by this? That would seem to be a better question for the [repo-discuss] Google Group: http://groups.google.com/group/repo-discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ 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: Changes in API in 1.5 - onFreeze and friends
Simon Brooke wrote: In order to bring myself up to speed with Android, I'm trying to get this example application: http://www.helloandroid.com/node/110 Gadzooks, that's old. working in Android 1.5. I'm making reasonable progress, and most of the API changes I've successfully overcome so far make sense. But one class, URLEditor (subclassing Activity), has a method: @Override protected void onFreeze(Bundle outState) { super.onFreeze(outState); outState.putString(url, mText.getText().toString()); } I understand that the purpose of onFreeze was to enable the state of an activity to be persisted through a period of dormancy. Is it no longer necessary to do this, and if it is still necessary, what mechanism does the 1.5 API provide for this? onFreeze() was renamed onSaveInstanceState(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ 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: Chart API
guruk wrote: Hi, I got a Mail from Google they would/could a App of mine if I improve my Chart. The Lady recommended to use: http://code.google.com/apis/chart/types.html but how do I implement that in Android? Any Experience in that, Demo Code, whatever? For on-device charting, you might examine: http://code.google.com/p/achartengine http://www.keepedge.com/ http://www.artfulbits.com/Android/aiCharts.aspx http://www.java4less.com/charts/chart.php?info=android -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ 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] Invitation to connect on LinkedIn
LinkedIn Manikandan Jayagopal requested to add you as a connection on LinkedIn: -- Michele, I'd like to add you to my professional network on LinkedIn. - Manikandan View invitation from Manikandan Jayagopal http://www.linkedin.com/e/LLkLpmh1-H9DJacyTMkv6XzPQQAN5aX4GK1ApDHb9BOx5AxLj59i/blk/I1353596684_2/39vd3wSdzARcPkPckALqnpPbOYWrSlI/svi/ -- Why might connecting with Manikandan Jayagopal be a good idea? Manikandan Jayagopal's connections could be useful to you: After accepting Manikandan Jayagopal's invitation, check Manikandan Jayagopal's connections to see who else you may know and who you might want an introduction to. Building these connections can create opportunities in the future. -- (c) 2009, LinkedIn Corporation --~--~-~--~~~---~--~~ 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] How to add scrollview to linearlayout programtically.
Hi, I am trying to add scrollview to linearlayout but it showing error like ScrollView can have only one direct child.. I tried like this Scrollview scrollview = new ScrollView(context) linearlayout.removeAllViews(); linearlayout.addview(listview) scrollView.addView(linearlayout); Can anybody point out where i am doing mistake. --~--~-~--~~~---~--~~ 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] rotation of phone
Hi, do you know that can we control phone rotation. I mean that when i rotate phone from horizantal position to vertical position, can i call another activity or do sth else. for summary I want to call to activity with respect to telephone position which are horizantal or vertical. Thanks for help --~--~-~--~~~---~--~~ 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: Waiting Dialog?
Hi Yusuf, thx for the code, BUT I think u did not get my probleme ^^ It's no probleme to get the input of the text in a dialoge, BUT (important!!!) I have to get the input of the dialoge before the method returns. # public int showDlg() { int iSelectedChoice = -1; //show Dlg //wait for Dlg to be finished (ok or cancel is clicked, DO NOT PROCEED until it is clicked) return iSelectedChoice; //return selected choice } # but in the code u posted the Dialog is displayed and then the return iSelectedChoice is executed, even without pressing ok or cancel. Now u know my probleme? --~--~-~--~~~---~--~~ 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: UnknownHostException
Could any please confirm that this is a bug in the SDK.Due to this we face a lot of issues in our app. http://code.google.com/p/android/issues/detail?id=2764 On Thu, Jul 23, 2009 at 9:10 AM, Guru gurudut...@gmail.com wrote: I saw this thread(since it is a dead thread--starting a new one): http://groups.google.com/group/android-developers/browse_thread/thread/cd5be36a07ad1a3d/ba559f2e2ff06e32#ba559f2e2ff06e32 I have also encountered such problems in the emulator. What I was interested in knowing is that ,is this an emulator problem or a problem in the SDK. Many of our users complain of errors while they are using the app.Actually the users get Unknownhost exception.And this exception does not appear when the users re-start their device.Can some one shed some light on this. Thanks Guru -- Thanks and Regards Gurudutt P.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] Re: AppAccelerator for Android and iPhone
I am positive on the approach that Titanium and other appcelerator products are taking for applicationd development. I am currently doing a bit of research to see the capabilities. You can take a look at the larger set of my notes here: http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURLreportId=3263ownerUserId=satya At a high level Titanium seems to be a wrapper around webkit which forms the core of many open source browsers including chrome, android, safari, firefox etc. Titanium supplements the 'webit' capabilities with some needed apis from the native os platform which includes such things as android, iphone, windows etc. It doesnt look like a big deal on the initial thought, but combine it with something like jquery which gives all of a sudden legs to webkit allowing you to: 1. Render html and forms in your native app 2. run javascript in your native app 3. use javascript and jquery (or an equivalent) tool to create rich UIs I haven't gotten to the android interface yet but I will report on it as soon as I get a good sample app running, I think this gives an additional tool kit for someone that is working on Android. This may or may completely replace your android development model but supplements it immensely. The power of titanium comes from familiar technologies: webkit, javascript, jquery, etc. This is what I gathered in the last few days playing with it. Hope this helps Satya On Mon, Aug 10, 2009 at 5:56 AM, Premiera.grum...@gmail.com wrote: does someone knows and uses appaccelerator (http:// www.appcelerator.com/products/titanium-mobile/) for android? What do you think about? --~--~-~--~~~---~--~~ 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: list with multiple selection
I tried same code in my application but it is not working. Please suggest me something. On Aug 10, 8:05 pm, Jack Ha jack...@t-mobile.com wrote: Take a look at List11.java in ApiDemos. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 10, 4:36 am, Honest honestsucc...@gmail.com wrote: Hello, I want to create list with multiple selection. Can some one tell me how can i create it ? code snippt will be much useful. --~--~-~--~~~---~--~~ 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: listview (text+icon) inside a class Atcivity and not ListActivity
Thanks Mark So my code is complete but I have an issu when I want to choice the icon on getView(). I want to choice my icon like thre following code. But I have to use the oClient object to find Flag. oClient is on TabVoicemail class. But IconicAdapter is a class and I can't touch oClient. So I try to touch oClient because IconicAdapter is into my TabVoicemail class. but I have a : 08-11 12:00:02.176: ERROR/AndroidRuntime(1169): java.lang.NullPointerException My java code : package com.dany.android.socketinterface; import java.io.IOException; import java.util.ArrayList; import android.app.Activity; import android.app.ListActivity; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; public class TabVoicemail extends ListActivity { public TextView selection; public ArrayListString mStrings = new ArrayListString(); private Button effacer, repondre; private static final String TAG = MyActivity; public Client oClient; public void setClient(Client oClient) { this.oClient = oClient; } /*public Client getClient() { return oClient; }*/ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.content_tab_voicemail); /** CLIENT (début) **/ // Création de l'objet Client permettant de se connecter au serveur IMAP Client oClient = new Client(); try { // Connection et récupération des messages oClient.start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } TabVoicemail mTabVoicemail = new TabVoicemail(); mTabVoicemail.setClient(oClient); /* String flag = empty; flag = mTabVoicemail.oClient.getMsg(0).getFlag(); Log.v(TAG,Flag (0) dans la classe IconicAdapter : + flag); */ /** CLIENT (fin) **/ /** GERER LES BOUTONS (début) **/ effacer = (Button)findViewById(R.id.effacer); repondre = (Button)findViewById(R.id.repondre); effacer.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { // Action lorsque je presse le bouton Effacer Log.v(TAG, J'ai bien appuyé sur le bouton effacer); } }); repondre.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { // Action lorsque je presse le bouton Répondre Log.v(TAG, J'ai bien appuyé sur le bouton repondre); } }); /** GERER LES BOUTONS (fin) **/ /** GERER LES INFOS LIST VOICEMAIL (début) **/ // ListView list=(ListView) findViewById(R.id.ListView01); //ArrayListString mStrings = new ArrayListString(); ArrayAdapterString mAdapter = new ArrayAdapterString (this,R.layout.row_voicemail, R.id.label, mStrings); /*mAdapter.add(itemAdd0); Log.v(TAG, mAdapter.getItem(0));*/ // Récupérer les infos pour chaque message ex: Date for(int i=0 ; i oClient.getnbMess() ; i++) { mAdapter.add(oClient.getMsg(i).getDate()); String flag = empty; flag = oClient.getMsg(i).getFlag(); Log.v(TAG,Flag ( + i +) dans la classe TabVoicemail : + flag); } //list.setAdapter(mAdapter); //setListAdapter(mAdapter); setListAdapter(new
[android-developers] Re: rotation of phone
override onConfigurationChanged() in the activity... read the docs for more help. u need to set the configs in the manifest first. On Tue, Aug 11, 2009 at 5:11 PM, engin enginarsla...@gmail.com wrote: Hi, do you know that can we control phone rotation. I mean that when i rotate phone from horizantal position to vertical position, can i call another activity or do sth else. for summary I want to call to activity with respect to telephone position which are horizantal or vertical. Thanks for help --~--~-~--~~~---~--~~ 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] dynamically add checkbox
Hello, I want to create the checkbox dyananically and display them to the screen. My problem is that at compilation time i will not know that how many check boxes i will have to create. So can some one tell me how can i do it ? I am so thankful to you as i have wasted already 2 days behind this bloody issue. --~--~-~--~~~---~--~~ 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: AppAccelerator for Android and iPhone
By the way this is also a similar approach taken by Adobe AIR and advanced IDEs like Aptana Studio can provide the needed IDE support around these ideas. Satya On Tue, Aug 11, 2009 at 8:12 AM, Satya Komatinenisatya.komatin...@gmail.com wrote: I am positive on the approach that Titanium and other appcelerator products are taking for applicationd development. I am currently doing a bit of research to see the capabilities. You can take a look at the larger set of my notes here: http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURLreportId=3263ownerUserId=satya At a high level Titanium seems to be a wrapper around webkit which forms the core of many open source browsers including chrome, android, safari, firefox etc. Titanium supplements the 'webit' capabilities with some needed apis from the native os platform which includes such things as android, iphone, windows etc. It doesnt look like a big deal on the initial thought, but combine it with something like jquery which gives all of a sudden legs to webkit allowing you to: 1. Render html and forms in your native app 2. run javascript in your native app 3. use javascript and jquery (or an equivalent) tool to create rich UIs I haven't gotten to the android interface yet but I will report on it as soon as I get a good sample app running, I think this gives an additional tool kit for someone that is working on Android. This may or may completely replace your android development model but supplements it immensely. The power of titanium comes from familiar technologies: webkit, javascript, jquery, etc. This is what I gathered in the last few days playing with it. Hope this helps Satya On Mon, Aug 10, 2009 at 5:56 AM, Premiera.grum...@gmail.com wrote: does someone knows and uses appaccelerator (http:// www.appcelerator.com/products/titanium-mobile/) for android? What do you think about? --~--~-~--~~~---~--~~ 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: book page flip transition
can anybody help me? On Aug 11, 11:14 am, zeeshan genx...@gmail.com wrote: Hi Experts, i am trying to have a nextpage transition like book page. at the moment i just change the image on imageview and move from left to right but this doesn't look good. i believe book page transition is available in iphone but i doesn't seem to have any single example for android. 3d rotation in api demo doesn't help me any help would be 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 -~--~~~~--~~--~--~---
[android-developers] The SDK documentation problems of package android.widget.ListView
I found some issues about the Android SDK documentation of the methods in package android.widget.ListView. The sentenses after number 1, 2, and 3 are the original descriptions while the sentenses after modified are the modified ones after I reviewed the code of Android. The original description can be found in the link: http://developer.android.com/reference/android/widget/ListView.html 1. public int getCheckedItemPosition () Returns the currently checked item. The result is only valid if the choice mode has NOT been set to CHOICE_MODE_SINGLE. Modified: public int getCheckedItemPosition () Returns the currently checked item. The result is only valid if the choice mode has been set to CHOICE_MODE_SINGLE. 2. public SparseBooleanArray getCheckedItemPositions () Returns the set of checked items in the list. The result is only valid if the choice mode has not been set to CHOICE_MODE_SINGLE. Modified: public SparseBooleanArray getCheckedItemPositions () Returns the set of checked items in the list. The result is only valid if the choice mode has not been set to CHOICE_MODE_NONE. 3. public boolean isItemChecked (int position) Returns the checked state of the specified position. The result is only valid if the choice mode has not been set to CHOICE_MODE_SINGLE or CHOICE_MODE_MULTIPLE. Modified: public boolean isItemChecked (int position) Returns the checked state of the specified position. The result is only valid if the choice mode has not been set to CHOICE_MODE_NONE. --~--~-~--~~~---~--~~ 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] ScrollView disappears when the keyboard appears on the screen
I have the following layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=wrap_content android:layout_height=wrap_content TextView android:id=@+id/title android:text=@string/ main_updateStatus android:textStyle=bold android:padding=2dip android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentLeft=true / TextView android:id=@+id/advanced android:text=@string/ link_advanced android:textStyle=bold android:textSize=12sp android:padding=4dip android:clickable=true android:layout_width=wrap_content android:layout_height=wrap_content android:layout_toRightOf=@id/ title android:textColor=@color/blue_link / /RelativeLayout RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=wrap_content android:layout_height=wrap_content TextView android:id=@+id/photo android:text=@string/link_photo android:textStyle=bold android:textSize=12sp android:padding=4dip android:clickable=true android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=@color/ blue_link / /RelativeLayout ScrollView android:layout_marginBottom=180dip android:id=@+id/ ScrollView01 android:layout_height=wrap_content android:layout_width=fill_parent LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content EditText android:id=@+id/updateStatus android:padding=3dip android:scrollHorizontally=true android:layout_width=fill_parent android:layout_height=wrap_content / TextView android:id=@+id/titleLabel android:text=@string/ label_titleField android:layout_width=wrap_content android:layout_height=wrap_content android:visibility=gone / EditText android:id=@+id/titleField android:padding=3dip android:scrollHorizontally=true android:layout_width=fill_parent android:layout_height=wrap_content android:visibility=gone / RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=wrap_content android:layout_height=wrap_content Button android:id=@+id/updateStatusButton android:text=@string/ button_updateStatus android:layout_width=wrap_content android:layout_height=wrap_content / Button android:id=@+id/removePhotoButton android:text=@string/ button_removePhoto android:layout_width=wrap_content android:layout_height=wrap_content android:layout_toRightOf=@id/updateStatusButton android:visibility=gone / /RelativeLayout ImageView android:id=@+id/my_image android:layout_width=wrap_content android:layout_height=wrap_content android:scaleType=fitCenter android:layout_gravity=center_horizontal / !-- android:layout_marginTop=2px android:layout_marginBottom=2px -- /LinearLayout /ScrollView LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginTop=-180dip TextView android:id=@+id/history android:text=@string/ title_history android:textStyle=bold android:layout_width=fill_parent android:layout_height=wrap_content android:background=#00 android:textColor=#FF /
[android-developers] Re: listview (text+icon) inside a class Atcivity and not ListActivity
its Fixed On Aug 11, 2:24 pm, Dany BREARD dany.bre...@gmail.com wrote: Thanks Mark So my code is complete but I have an issu when I want to choice the icon on getView(). I want to choice my icon like thre following code. But I have to use the oClient object to find Flag. oClient is on TabVoicemail class. But IconicAdapter is a class and I can't touch oClient. So I try to touch oClient because IconicAdapter is into my TabVoicemail class. but I have a : 08-11 12:00:02.176: ERROR/AndroidRuntime(1169): java.lang.NullPointerException My java code : package com.dany.android.socketinterface; import java.io.IOException; import java.util.ArrayList; import android.app.Activity; import android.app.ListActivity; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; public class TabVoicemail extends ListActivity { public TextView selection; public ArrayListString mStrings = new ArrayListString(); private Button effacer, repondre; private static final String TAG = MyActivity; public Client oClient; public void setClient(Client oClient) { this.oClient = oClient; } /*public Client getClient() { return oClient; }*/ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.content_tab_voicemail); /** CLIENT (début) **/ // Création de l'objet Client permettant de se connecter au serveur IMAP Client oClient = new Client(); try { // Connection et récupération des messages oClient.start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } TabVoicemail mTabVoicemail = new TabVoicemail(); mTabVoicemail.setClient(oClient); /* String flag = empty; flag = mTabVoicemail.oClient.getMsg(0).getFlag(); Log.v(TAG,Flag (0) dans la classe IconicAdapter : + flag); */ /** CLIENT (fin) **/ /** GERER LES BOUTONS (début) **/ effacer = (Button)findViewById(R.id.effacer); repondre = (Button)findViewById(R.id.repondre); effacer.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { // Action lorsque je presse le bouton Effacer Log.v(TAG, J'ai bien appuyé sur le bouton effacer); } }); repondre.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { // Action lorsque je presse le bouton Répondre Log.v(TAG, J'ai bien appuyé sur le bouton repondre); } }); /** GERER LES BOUTONS (fin) **/ /** GERER LES INFOS LIST VOICEMAIL (début) **/ // ListView list=(ListView) findViewById(R.id.ListView01); //ArrayListString mStrings = new ArrayListString(); ArrayAdapterString mAdapter = new ArrayAdapterString (this,R.layout.row_voicemail, R.id.label, mStrings); /*mAdapter.add(itemAdd0); Log.v(TAG, mAdapter.getItem(0)); */ // Récupérer les infos pour chaque message ex: Date for(int i=0 ; i oClient.getnbMess() ; i++) { mAdapter.add(oClient.getMsg(i).getDate()); String flag = empty; flag = oClient.getMsg(i).getFlag(); Log.v(TAG,Flag ( + i +) dans la classe
[android-developers] Re: why camera is rotated
Setting screenorientation does it for G1. On Aug 10, 11:43 pm, engin enginarsla...@gmail.com wrote: Hi, I use google htc innovation and i am developing and apllication which uses camera to take picture and capture video. in both cases i get rotated picture\video. On Aug 10, 9:42 pm, Dash125 paulgig...@gmail.com wrote: Hi, I think it would be helpful to know which devices you are developing/testing on. On Aug 5, 6:31 pm, engin enginarsla...@gmail.com wrote: Hi, I am trying to useCamerato take picture and to video recording but it always runs in portrait mode. Even if I tried to sreenOrientatiton=landscape it solved screen appearance but when I take photo andcapturevideo they are still saved rotated 90 degrees. I searched it but ı could not find clear solution. Can anybody help me Thanks.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Using AsyncTask as Serializable or Parcelable -- To void activity destruction(orientation or during incoming phone call)
Any idea Guys? On Aug 10, 11:58 am, Vikas vik...@hotmail.com wrote: Hello, I was able to come up with a small framework to handle all types of issues(phone calls/orientation changes etc), and it is behaving pretty well. Thanks Mark/Maher/Dianne. There is another question I wanted to ask which I thought I might utilize in my framework.(Sorry for a big message again) Basically now I have a mediator object which acts as a decoupling layer between Activity and AsyncTask. Currently, onPostExecute method(of async task) I get hold of the reference of mediator object and do a call back on it, which in-turn gets hold of activity and copy the results to the view components. Now Can I use a handler as a means of communication between async task (onPostExecute method) and the mediator i.e. rather than calling a method on mediator directly in onPostExecute, just get hold of the reference of the handler(originally instantiated and handleMessage defined in the mediator and stored in a static map) from the static map in the onPostExecute() method and call sendMessage on it. This should in-turn invoke the handle message on the mediator, and in-turn can give loose coupling between async task and mediator. (FYI: The static map approach I am using to cache the references to handle activity destruction process, rather than going through onSaveInstanceState route). Does the above startegy makes sense? The Android documentation for handler says There are two main uses for a Handler: (1) to schedule messages and runnables to be executed as some point in the future; and (2) to enqueue an action to be performed on a different thread than your own. Basically, if i understand it correctly, handler is used for communicating between two different threads Now, can there be (3) scenario(as I described above) where it can be used in the same thread but between two different objects(working as a callback mechanism). If yes, then if I make a call to sendMessage, will that immediately call handleMessage or will it still(even though we just have one thread) put it in a messagequeue and will invoke handlemessage when its turn come(as it does in case when we are communicating between two different threads). The reason why I asked this is(it is another question ofcourse) a.) When I just make a call to mediator.process method(and no handler) from postexecute, and suppose the user changes the orientation before the the mediator.process method exits, it still maintains the sanity i.e. the activity does not get recreated untill the method exits, because postExecute gets called on same thread so any other call to destroy activity even by android framework waits untill the postexecute (because I call mediator.process in it so it becomes part of postExecute) method exits, and hence atomicity is maintained and the logic does not mess up. b.) So If I use handler approach, will the steps be: 1.) Will the call inside the onPostExecute method to sendMessage on handler be blocking call or will the postExecute method exit immediately. 2.)if its a non-blocking call-- Then when onPostexecute method exits, and say orientation changes then can i be assured(as in a.) above) that handlemessage call be made before the activity destruction(in which atomicity is maintained) or can it be made before(in that case things can get messed up) On Aug 5, 4:27 pm, Maher Ali maher@gmail.com wrote: Vikas, Maybe you can create a mediator for every activity type. If an activity wants something from the server, it adds a job to this mediator passing its *this* as the key. The mediator will then contact a server proxy that does the server interaction async by default. The mediator can ask the activity to show a busy signal or not (it depends.) When the server finishes the job, it calls onSuccess on an object of an anonymous class passed by the mediator. The mediator then checks to see if the activity has not been destroyed (the activity will cancel the job by removing its *this* from the mediator's job list on its destruction.) If it has (no entry for that activity,) it discards the server's result. If not, it delivers the result to the activity (to refresh, etc.) and removes the job from its list. Hope this helps. Regards, Maher On Wed, Aug 5, 2009 at 1:49 PM, Vikas vik...@hotmail.com wrote: Hello David/Mark, Thanks a lot for replying. Since this use case is so common that any form based application needs it and I think a correct answer to this will avoid lots of pains and confusions for many people who are trying to write any enterprise level applications. Let me just describe a very simple use case step by step(rather than a big paragraph above It is still big{sorry about that}) : I am asking now in a more general way. I will take a two screen scenario. Here are Requirements(Steps): 1.) Screen 1 -- Search
[android-developers] Re: The SDK documentation problems of package android.widget.ListView
http://code.google.com/p/android/issues/detail?id=2366 -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 11, 7:01 am, Zhiguo Ge zhiguo.ge.w...@gmail.com wrote: I found some issues about the Android SDK documentation of the methods in package android.widget.ListView. The sentenses after number 1, 2, and 3 are the original descriptions while the sentenses after modified are the modified ones after I reviewed the code of Android. The original description can be found in the link:http://developer.android.com/reference/android/widget/ListView.html 1. public int getCheckedItemPosition () Returns the currently checked item. The result is only valid if the choice mode has NOT been set to CHOICE_MODE_SINGLE. Modified: public int getCheckedItemPosition () Returns the currently checked item. The result is only valid if the choice mode has been set to CHOICE_MODE_SINGLE. 2. public SparseBooleanArray getCheckedItemPositions () Returns the set of checked items in the list. The result is only valid if the choice mode has not been set to CHOICE_MODE_SINGLE. Modified: public SparseBooleanArray getCheckedItemPositions () Returns the set of checked items in the list. The result is only valid if the choice mode has not been set to CHOICE_MODE_NONE. 3. public boolean isItemChecked (int position) Returns the checked state of the specified position. The result is only valid if the choice mode has not been set to CHOICE_MODE_SINGLE or CHOICE_MODE_MULTIPLE. Modified: public boolean isItemChecked (int position) Returns the checked state of the specified position. The result is only valid if the choice mode has not been set to CHOICE_MODE_NONE. --~--~-~--~~~---~--~~ 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] ItemizedOverlay is unstable
Hi all, I made a post talking about the exception I had with the Itemized overlay when there are no items in. The workaround was to check and remove the ItemizedOverlay when it's empty. But another problem occurs when I attempt to remove it and invalidate the MapView directly after, I have sometimes the following exception that shoots my app (the sometimes is probably due to multitasking, even though I thought only one thread handles the view). Note that this was noticed on the emulator, I must check if it happens on the phone also (maybe there were updates). And by the way? does the emulator check for updates? 08-11 17:05:00.385: WARN/dalvikvm(1375): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 08-11 17:05:00.405: ERROR/AndroidRuntime(1375): Uncaught handler: thread main exiting due to uncaught exception 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): java.lang.ArrayIndexOutOfBoundsException 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.google.android.maps.ItemizedOverlay.maskHelper (ItemizedOverlay.java:562) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.google.android.maps.ItemizedOverlay.setFocus(ItemizedOverlay.java: 365) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.google.android.maps.ItemizedOverlay.focus(ItemizedOverlay.java: 539) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.google.android.maps.ItemizedOverlay.onTap(ItemizedOverlay.java: 455) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.google.android.maps.OverlayBundle.onTap(OverlayBundle.java:83) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.google.android.maps.MapView$1.onSingleTapUp(MapView.java:346) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.GestureDetector.onTouchEvent(GestureDetector.java:503) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.google.android.maps.MapView.onTouchEvent(MapView.java:623) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.View.dispatchTouchEvent(View.java:3368) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:831) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.android.internal.policy.impl.PhoneWindow $DecorView.superDispatchTouchEvent(PhoneWindow.java:1707) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent (PhoneWindow.java:1197) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.app.Activity.dispatchTouchEvent(Activity.java:1993) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.android.internal.policy.impl.PhoneWindow $DecorView.dispatchTouchEvent(PhoneWindow.java:1691) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.view.ViewRoot.handleMessage(ViewRoot.java:1525) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.os.Handler.dispatchMessage(Handler.java:99) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.os.Looper.loop(Looper.java:123) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at android.app.ActivityThread.main(ActivityThread.java:3948) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at java.lang.reflect.Method.invokeNative(Native Method) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at java.lang.reflect.Method.invoke(Method.java:521) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 08-11 17:05:00.584: ERROR/AndroidRuntime(1375): at dalvik.system.NativeStart.main(Native Method) Best Regards, Zied Hamdi http://nextstreet.eu --~--~-~--~~~---~--~~ 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: The SDK documentation problems of package android.widget.ListView
I believe we fixed all these issues in Donut. On Tue, Aug 11, 2009 at 7:01 AM, Zhiguo Gezhiguo.ge.w...@gmail.com wrote: I found some issues about the Android SDK documentation of the methods in package android.widget.ListView. The sentenses after number 1, 2, and 3 are the original descriptions while the sentenses after modified are the modified ones after I reviewed the code of Android. The original description can be found in the link: http://developer.android.com/reference/android/widget/ListView.html 1. public int getCheckedItemPosition () Returns the currently checked item. The result is only valid if the choice mode has NOT been set to CHOICE_MODE_SINGLE. Modified: public int getCheckedItemPosition () Returns the currently checked item. The result is only valid if the choice mode has been set to CHOICE_MODE_SINGLE. 2. public SparseBooleanArray getCheckedItemPositions () Returns the set of checked items in the list. The result is only valid if the choice mode has not been set to CHOICE_MODE_SINGLE. Modified: public SparseBooleanArray getCheckedItemPositions () Returns the set of checked items in the list. The result is only valid if the choice mode has not been set to CHOICE_MODE_NONE. 3. public boolean isItemChecked (int position) Returns the checked state of the specified position. The result is only valid if the choice mode has not been set to CHOICE_MODE_SINGLE or CHOICE_MODE_MULTIPLE. Modified: public boolean isItemChecked (int position) Returns the checked state of the specified position. The result is only valid if the choice mode has not been set to CHOICE_MODE_NONE. -- 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] how to avoid restarting activity on keyboard flip change
Hi Dear, when i open my keyboard, it restarts the activity. i use only landscape mode and dont want the activity to restart. any help plz --~--~-~--~~~---~--~~ 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: MediaPlayer bug, pls help!
Sounds are loaded asynchronously, and may not have been loaded yet if you try to play them immediately after calling SoundPool.load(). A simple workaround (until we add a callback API for this) is to retry until it succeeds. On Mon, Aug 10, 2009 at 4:29 PM, Illidaneillid...@gmail.com wrote: Thanks, SoundPool works almost fine. Here is my code: soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100); soundPoolMap = new HashMapInteger, Integer(); soundPoolMap.put(SOUND_CLICK, soundPool.load(Context, R.raw.click, 1)); soundPoolMap.put(SOUND_DEATH, soundPool.load(Context, R.raw.death, 1)); public static void playSound(int sound) { AudioManager mgr = (AudioManager)Context.getSystemService (Context.AUDIO_SERVICE); int streamVolume = mgr.getStreamVolume (AudioManager.STREAM_MUSIC); soundPool.play(soundPoolMap.get(sound), streamVolume, streamVolume, 1, 0, 1f); } ... playSound(SOUND_CLICK); But there is some issue, when I start my app my sounds somethimes(not always) may not to play. Just silence. What's the problem? Thanks! On 10 авг, 17:41, Illidane illid...@gmail.com wrote: Thanks for answer! When I calling seek(0) before start() nothing changes.. Thanks for the SoundPool, I'll try it. On 10 авг, 17:31, Marco Nelissen marc...@android.com wrote: On Mon, Aug 10, 2009 at 5:48 AM, Illidaneillid...@gmail.com wrote: Hello! I have such code: public static MediaPlayer mp_click; mp_click = MediaPlayer.create(Context, R.raw.click); ... mp_click.start(); When my sound played for the first time, it's all fine. But when for second, third, etc.. it sounds like cutted, just little part of my click.wav. If I put there sound in another format like mp3 or ogg - all just fine. Are you just calling start() again, or are you calling seek(0) before that? Or if I write like this: mp_click = MediaPlayer.create(CubeTest_Main.Context, R.raw.click); mp_click.start(); All if fine too, but this is a bit slow, becouse this sound is playing very often. If You now how to fix it, pls help me. Thanks. You might want to look in to using SoundPool. --~--~-~--~~~---~--~~ 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: sdk for windows from source code
You could try to use Cygwin on Windows. Make sure that you install the development tools needed for the Source build. Normally I select the complete development package. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 11, 12:08 am, and.pradeep and.prad...@gmail.com wrote: how to build the sdk for windows from android source code? Regards Pradeep --~--~-~--~~~---~--~~ 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: problems purchasing my own app
I tried it a while ago and i could not buy my own app either (i got the same error). I read (somewhere in this forum or another forum) that buying your own app is not allowed. I just wished that the error message was more clear you cannot buy your own application instead of server error has occurred. On Aug 11, 1:23 am, michael m mgmait...@gmail.com wrote: I published my first paid for app, NoteToMe, and when I went to purchase it to for testing I got the error A server error has occurred. Retry, or cancel and return to the previous screen. I tested my credit card info by successfully purchasing another app, and I've double/triple checked my settings and all the requirments for publishing an app, but haven't found anything. Just the fact that I was able to successfully upload it to the Developer Console and see it via the market tells me that I signed the app correctly. I even uploaded it to my blog and was able to download it and run from there. Does anyone have any debugging tips that I could try, or have seen this issue before. I did a search and came up with this page, http://www.google.com/support/forum/p/Android%20Market/thread?tid=3f8... but the fact that I can purchase other apps leads me to believe something else is wrong. I went ahead and kept it published to see if other people will be able to purchase itthis is not a solicitation for others to attempt to purchase the app , just was wondering if anyone else has had this issue. thanks, - michael --~--~-~--~~~---~--~~ 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: dynamically add checkbox
You can create an empty LinearLayout and call its addView() function to add the checkboxes dynamically in your code. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 11, 5:44 am, Honest honestsucc...@gmail.com wrote: Hello, I want to create the checkbox dyananically and display them to the screen. My problem is that at compilation time i will not know that how many check boxes i will have to create. So can some one tell me how can i do it ? I am so thankful to you as i have wasted already 2 days behind this bloody issue. --~--~-~--~~~---~--~~ 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: book page flip transition
Hi zeeshan, Even ive been trying to implement this but in vain. Will post and also mail you incase if im able to get through. Do post in case your able to find the actual implementation. Regards, R.Karthik On Aug 11, 6:58 pm, zeeshan genx...@gmail.com wrote: can anybody help me? On Aug 11, 11:14 am, zeeshan genx...@gmail.com wrote: Hi Experts, i am trying to have a nextpage transition like book page. at the moment i just change the image on imageview and move from left to right but this doesn't look good. i believe book page transition is available in iphone but i doesn't seem to have any single example for android. 3d rotation in api demo doesn't help me any help would be appreciated- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: code to uninstall applications
Hello all, I have a to show a message to user before uninstall of my application happens. I could of think of two options: 1. Receiving the notification of Uninstall by intent receiver with action: Action.Package_Removed . This is not working as Framework first uninstall the application and then send the notification and this intent receiver belongs to my app only :(. 2. If Android provides some way probably in application info screen to show message to the user. On this I have no clue. Could any of you please give me some direction? Appreciate your help. Thanks Irfan On Jul 6, 2:56 am, aljo aljochim...@gmail.com wrote: I don't know if this is the one you meant about launching uninstaller activity but I found something which might be the same... http://android.amberfog.com/ I put this in the manifest... activity android:name=.UninstallerActivity intent-filter action android:name=android.intent.action.VIEW / action android:name=android.intent.action.DELETE / category android:name=android.intent.category.DEFAULT / data android:scheme=package / /intent-filter /activity then this one in the source... Uri packageURI = Uri.parse(package:com.android.myapp); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent); It redirected me to the uninstall confirmation... How about before the uninstaller activity... the window where it shows the information of the applications you selected... Whats the name of that activity?? How do I redirect to that activity?? On Jul 6, 11:01 am, aljo aljochim...@gmail.com wrote: Hmmm... that's why I can't see the deletePackage method when I type getPackageManager(). What do you mean I need to launch the uninstaller activity? Is that the uninstaller app when you go to Settings/ Applications/ManageApplications in the phone?? If that's the case, is it not possible yet to uninstall apps using our own applications? Is there a way or code to just redirect to the ManageApplications window using my application? On Jul 6, 9:32 am, Dianne Hackborn hack...@android.com wrote: The deletePackage method is not available to third party apps. To uninstall an app you need to launch the uninstaller activity to have the user confirm what is going on. On Sat, Jul 4, 2009 at 10:43 AM, Roman roman.baumgaert...@t-mobile.comwrote: Check out the UninstallAppProgress.java source in packages/apps/ PackageInstaller/src/com/android/packageinstaller Have a look at the method and follow the flow of deletePackage. You should be able to find out what exactly is called. public void initView() { requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.op_progress); //initialize views PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); TextView installTextView = (TextView)findViewById (R.id.center_text); installTextView.setText(R.string.uninstalling); final ProgressBar progressBar = (ProgressBar) findViewById (R.id.progress_bar); progressBar.setIndeterminate(true); PackageDeleteObserver observer = new PackageDeleteObserver(); getPackageManager().deletePackage(mAppInfo.packageName, observer, 0); } -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 2, 7:54 pm, aljo aljochim...@gmail.com wrote: I wan't to uninstall applications using my application... I can retrieve the list of packages installed but I don't know how to remove them... I used the PackageManager class, getInstalledApplications() method... I can't find any method like removeApplication() or uninstallApplication(). the only method I saw in this class is the removePackageFromPreferred (String packageName) method... It retrieves a list of preferred packages.. I don't exactly know what preferred packages means or somehow how to retrieve them... I tried to put a package name in the method removePackageFromPreferred (com.dev5.fivegame) but it gives an error... I'm kinda new to these stuffs so pardon me for my questions... -- 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.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are
[android-developers] Re: how to avoid restarting activity on keyboard flip change
i just added this line in manifest and it solved my problem android:configChanges=orientation|keyboardHidden On Aug 11, 4:32 pm, zeeshan genx...@gmail.com wrote: Hi Dear, when i open my keyboard, it restarts the activity. i use only landscape mode and dont want the activity to restart. any help plz --~--~-~--~~~---~--~~ 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: Waiting Dialog?
You can't. If you block waiting for the dialog, you block the main thread, preventing the dialog from being shown and run. On Tue, Aug 11, 2009 at 4:56 AM, Chaoz1336 stoffe...@gmail.com wrote: Hi Yusuf, thx for the code, BUT I think u did not get my probleme ^^ It's no probleme to get the input of the text in a dialoge, BUT (important!!!) I have to get the input of the dialoge before the method returns. # public int showDlg() { int iSelectedChoice = -1; //show Dlg //wait for Dlg to be finished (ok or cancel is clicked, DO NOT PROCEED until it is clicked) return iSelectedChoice; //return selected choice } # but in the code u posted the Dialog is displayed and then the return iSelectedChoice is executed, even without pressing ok or cancel. Now u know my probleme? -- 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] Intent to pick appwidget?
Reposting this from Android Discuss, as it's probably more on-topic here. There's an ongoing issue with users who install an appwidget app from the Market and then don't know how to add the widget to their home screen. It's been suggested to add a Help or About activity with instructions - and I've done that - but I'd really rather include an Install Widget button on my main activity. Anyone have any clues on how to make that happen? I tried firing off an ACTION_APPWIDGET_PICK intent, but that always seems to NPE. I suspect I don't have the extras right, but OTOH, reading the docs it doesn't sound like exactly what I want anyway. Thanks, String --~--~-~--~~~---~--~~ 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: Waiting Dialog?
On Aug 11, 5:19 pm, Dianne Hackborn hack...@android.com wrote: You can't. If you block waiting for the dialog, you block the main thread, preventing the dialog from being shown and run. -- Dianne Hackborn Android framework engineer many UI frameworks (X11/Xt/Qr) have concept of 'local' event loop where such modal dialogs can be done. so i assume android has no such feature of controlled processing all events in few api calls that way implementing modal dialogs? thanks pskink --~--~-~--~~~---~--~~ 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: sdk for windows from source code
Please refer to section 3 (Building an SDK for Windows) in the {Android_Root}/devlopement/docs/howto_build_SDK.txt file. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 11, 12:08 am, and.pradeep and.prad...@gmail.com wrote: how to build the sdk for windows from android source code? Regards Pradeep --~--~-~--~~~---~--~~ 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: ADC 2 - Can I post my app to the app store after August 1st?
Hi Yusuf Saib Any updates as why Google might be delaying the competition ? On Aug 5, 10:51 pm, Yusuf T. Mobile yusuf.s...@t-mobile.com wrote: According to the rules, TheADC2 contest is open only to applications that have not been made publicly available through the Android Market prior to August 1, 2009. So according to my unofficial interpretation, you would not disqualify yourself. ADC2 is not yet accepting app uploads, but should soon, sometime, hopefully. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 4, 2:37 pm, Alexander Kosenkov alexan...@kosenkov.com wrote: well, it's 5th of August... where should we upload applications? http://code.google.com/intl/ru-RU/android/adc/doesnot give any practical information on this topic...- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Any updates on ADC-2?
Hi David Any update on deadlines - we are ready with our application and looking for the submission site. Khurram Samad GeniTeam | Generation Internet Team www.geniteam.com On Jul 14, 3:21 am, David M. d...@google.com wrote: We've posted an update onADC2 to the official Android blog: http://android-developers.blogspot.com/2009/07/adc-2-updates.html Key points to highlight: 1. Final deadline for submissions is August 31 2. The official terms and conditions are available (seehttp://code.google.com/android/adc/adc2_terms.html) 3. We've clarified eligibility of applications. To be specific, applications that are available on Android Market before August 1, 2009 will not be eligible to participate in the contest. Thus, open source projects are eligible so long as the app itself is not made available on the Android Market prior to August 1. Enjoy, David --~--~-~--~~~---~--~~ 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: Intent to pick appwidget?
Hi, unfortunately you can't do this yourself, since it is the container that wants to host the widget that needs to start the widget picker. So the user has to go to their home screen, and in its UI ask to add a widget. On Tue, Aug 11, 2009 at 9:37 AM, String sterling.ud...@googlemail.comwrote: Reposting this from Android Discuss, as it's probably more on-topic here. There's an ongoing issue with users who install an appwidget app from the Market and then don't know how to add the widget to their home screen. It's been suggested to add a Help or About activity with instructions - and I've done that - but I'd really rather include an Install Widget button on my main activity. Anyone have any clues on how to make that happen? I tried firing off an ACTION_APPWIDGET_PICK intent, but that always seems to NPE. I suspect I don't have the extras right, but OTOH, reading the docs it doesn't sound like exactly what I want anyway. Thanks, String -- 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: Waiting Dialog?
Correct, Android very deliberately does not do this. On Tue, Aug 11, 2009 at 9:50 AM, skink psk...@gmail.com wrote: On Aug 11, 5:19 pm, Dianne Hackborn hack...@android.com wrote: You can't. If you block waiting for the dialog, you block the main thread, preventing the dialog from being shown and run. -- Dianne Hackborn Android framework engineer many UI frameworks (X11/Xt/Qr) have concept of 'local' event loop where such modal dialogs can be done. so i assume android has no such feature of controlled processing all events in few api calls that way implementing modal dialogs? thanks pskink -- 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: code to uninstall applications
Don't put anything in your manifest. Just start an activity with the DELETE action and data package:your package name. On Sun, Jul 5, 2009 at 11:56 PM, aljo aljochim...@gmail.com wrote: I don't know if this is the one you meant about launching uninstaller activity but I found something which might be the same... http://android.amberfog.com/ I put this in the manifest... activity android:name=.UninstallerActivity intent-filter action android:name=android.intent.action.VIEW / action android:name=android.intent.action.DELETE / category android:name=android.intent.category.DEFAULT / data android:scheme=package / /intent-filter /activity then this one in the source... Uri packageURI = Uri.parse(package:com.android.myapp); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent); It redirected me to the uninstall confirmation... How about before the uninstaller activity... the window where it shows the information of the applications you selected... Whats the name of that activity?? How do I redirect to that activity?? On Jul 6, 11:01 am, aljo aljochim...@gmail.com wrote: Hmmm... that's why I can't see the deletePackage method when I type getPackageManager(). What do you mean I need to launch the uninstaller activity? Is that the uninstaller app when you go to Settings/ Applications/ManageApplications in the phone?? If that's the case, is it not possible yet to uninstall apps using our own applications? Is there a way or code to just redirect to the ManageApplications window using my application? On Jul 6, 9:32 am, Dianne Hackborn hack...@android.com wrote: The deletePackage method is not available to third party apps. To uninstall an app you need to launch the uninstaller activity to have the user confirm what is going on. On Sat, Jul 4, 2009 at 10:43 AM, Roman roman.baumgaert...@t-mobile.comwrote: Check out the UninstallAppProgress.java source in packages/apps/ PackageInstaller/src/com/android/packageinstaller Have a look at the method and follow the flow of deletePackage. You should be able to find out what exactly is called. public void initView() { requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.op_progress); //initialize views PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); TextView installTextView = (TextView)findViewById (R.id.center_text); installTextView.setText(R.string.uninstalling); final ProgressBar progressBar = (ProgressBar) findViewById (R.id.progress_bar); progressBar.setIndeterminate(true); PackageDeleteObserver observer = new PackageDeleteObserver(); getPackageManager().deletePackage(mAppInfo.packageName, observer, 0); } -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 2, 7:54 pm, aljo aljochim...@gmail.com wrote: I wan't to uninstall applications using my application... I can retrieve the list of packages installed but I don't know how to remove them... I used the PackageManager class, getInstalledApplications() method... I can't find any method like removeApplication() or uninstallApplication(). the only method I saw in this class is the removePackageFromPreferred (String packageName) method... It retrieves a list of preferred packages.. I don't exactly know what preferred packages means or somehow how to retrieve them... I tried to put a package name in the method removePackageFromPreferred (com.dev5.fivegame) but it gives an error... I'm kinda new to these stuffs so pardon me for my questions... -- 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.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- 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
[android-developers] Re: code to uninstall applications
Hi, Android does not currently provide any way for an application to run when it is being uninstalled. On Tue, Aug 11, 2009 at 9:19 AM, Iroid irfan.f.k...@gmail.com wrote: Hello all, I have a to show a message to user before uninstall of my application happens. I could of think of two options: 1. Receiving the notification of Uninstall by intent receiver with action: Action.Package_Removed . This is not working as Framework first uninstall the application and then send the notification and this intent receiver belongs to my app only :(. 2. If Android provides some way probably in application info screen to show message to the user. On this I have no clue. Could any of you please give me some direction? Appreciate your help. Thanks Irfan On Jul 6, 2:56 am, aljo aljochim...@gmail.com wrote: I don't know if this is the one you meant about launching uninstaller activity but I found something which might be the same... http://android.amberfog.com/ I put this in the manifest... activity android:name=.UninstallerActivity intent-filter action android:name=android.intent.action.VIEW / action android:name=android.intent.action.DELETE / category android:name=android.intent.category.DEFAULT / data android:scheme=package / /intent-filter /activity then this one in the source... Uri packageURI = Uri.parse(package:com.android.myapp); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent); It redirected me to the uninstall confirmation... How about before the uninstaller activity... the window where it shows the information of the applications you selected... Whats the name of that activity?? How do I redirect to that activity?? On Jul 6, 11:01 am, aljo aljochim...@gmail.com wrote: Hmmm... that's why I can't see the deletePackage method when I type getPackageManager(). What do you mean I need to launch the uninstaller activity? Is that the uninstaller app when you go to Settings/ Applications/ManageApplications in the phone?? If that's the case, is it not possible yet to uninstall apps using our own applications? Is there a way or code to just redirect to the ManageApplications window using my application? On Jul 6, 9:32 am, Dianne Hackborn hack...@android.com wrote: The deletePackage method is not available to third party apps. To uninstall an app you need to launch the uninstaller activity to have the user confirm what is going on. On Sat, Jul 4, 2009 at 10:43 AM, Roman roman.baumgaert...@t-mobile.comwrote: Check out the UninstallAppProgress.java source in packages/apps/ PackageInstaller/src/com/android/packageinstaller Have a look at the method and follow the flow of deletePackage. You should be able to find out what exactly is called. public void initView() { requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.op_progress); //initialize views PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); TextView installTextView = (TextView)findViewById (R.id.center_text); installTextView.setText(R.string.uninstalling); final ProgressBar progressBar = (ProgressBar) findViewById (R.id.progress_bar); progressBar.setIndeterminate(true); PackageDeleteObserver observer = new PackageDeleteObserver(); getPackageManager().deletePackage(mAppInfo.packageName, observer, 0); } -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 2, 7:54 pm, aljo aljochim...@gmail.com wrote: I wan't to uninstall applications using my application... I can retrieve the list of packages installed but I don't know how to remove them... I used the PackageManager class, getInstalledApplications() method... I can't find any method like removeApplication() or uninstallApplication(). the only method I saw in this class is the removePackageFromPreferred (String packageName) method... It retrieves a list of preferred packages.. I don't exactly know what preferred packages means or somehow how to retrieve them... I tried to put a package name in the method removePackageFromPreferred (com.dev5.fivegame) but it gives an error... I'm kinda new to these stuffs so pardon me for my questions... -- 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
[android-developers] Re: Launching/Installing an APK with command-line like options
Doug, I could think of the following - your partner specific version comes in two APKs. - when your client downloads the app from your web server two APKs are downloaded and installed on the device - The additional APK is only used to write an entry in a persistent data record (sharedPreferences or DB) after your apps are installed. - The persistent data is used to distinguish which kind of version is installed on the device. If a user downloads the normal version the persistent data record would be empty or not existing. - the second APK can be uninstalled after the persistent data record is created This might be not the best way to do this but pretty easy to implement. Let me know whether you come up with another solution. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 10, 7:03 pm, Doug dougforp...@gmail.com wrote: Hi, I have an interesting problem: My boss/the-marketing-team want to be able to distribute a separate version of our application to a number of 'partners'. The application itself would be *exactly* the same app, except that they'd like a partner-specific property to be passed to our web-service when the app runs (for tracking). The last thing I want to do is have 'n' builds of the product, each with a single constant changed (or a difference in the Manifest). This would be a maintenance nightmare, as well as the obvious issues you have when you have multiple mostly-identical versions of a product floating around. I also suspect the Android Market would have a problem with MyProduct for X users, MyProduct for Y users, etc... showing up for download. In a perfect world everyone would download the same app, and there would be some cool undiscovered Android feature where the Market URL could include vendorcode=X that would be passed into the app on install. My question is this: Since the install process would be initiated by the user clicking on a link in their browser of choice (on the Android device), is there *any* way that the web server could be sent some 'device specific identifier' by the browser that would also be available to my APK? (In this way the web server would be able to match up the original install request and the first run of the app after install). Thanks Doug --~--~-~--~~~---~--~~ 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] GridView vs. horizontal scroll
Hi, currently I'm working on an activity which should display some data in a GridView provided by a sqlite database. The table contains many columns, so I'm trying to make the GridView horizontally scrollable, so the user could easily navigate through the fields. I'he already tried to use HorizontalScrollView, as follows: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/panelcaption android:layout_width=fill_parent android:layout_height=wrap_content android:gravity=center android:textSize=20sp / HorizontalScrollView android:id=@+id/frame android:layout_width=wrap_content android:layout_height=fill_parent GridView android:id=@+id/grid android:layout_width=wrap_content android:layout_height=fill_parent android:columnWidth=100dp android:stretchMode=none / /HorizontalScrollView /LinearLayout However, the solution didn't work, on the emulator only one column showed up, I couldn't figure it out why. Does GridView support HorizontalScrollView anyway? After that, I've tried to implement the horizontal scrolling programmatically, using the GridView.scrollBy() method: public class CustomGridView extends GridView { ... @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_DPAD_RIGHT) { this.scrollBy(100, 0); } else if(keyCode==KeyEvent.KEYCODE_DPAD_LEFT) { this.scrollBy(-100, 0); } return super.onKeyDown(keyCode, event); } } In that case, I could navigate between the columns, but It's seems to me, that the scrolling and the onItemClick method doesn't work together properly: after scrolling, I've tried to click on a View in the Grid, but the onItemClick method always received wrong parameters. I suppose, the GridView doesn't refresh the value of the mFirstPosition (the position of the first child displayed) variable. Or have I done something wrong? Any help on this topic would be very useful. Thanks, bela --~--~-~--~~~---~--~~ 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] Keeping writable database instance open... Bad practice?
Hi Guys, Is keeping a writable instance of a database open (SQLiteOpenHelper.getWritableDatabase()) during the running application a bad practice? Because every once in a while and with every activity screen some database operations are done as well (both read/write), I open the database at startup of my application (Application.onCreate()) and close it on shutdown (Application.onTerminate()). Just in case it matters, I have background service as well (getting started on BOOT_COMPLETED) which uses the same database via a separate call to SQLiteOpenHelper.getWritableDatabase(). Of course here I open the database whenever service onStart() is called and close it at end of the call. Best Regards, Armond --~--~-~--~~~---~--~~ 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: Error during preparation
Hi, I get the same problem. Did you solve this? Did you find out what error (1, -10) means? :Popper On 6 Aug, 17:25, matthieu nicolazo matthieu.nicol...@gmail.com wrote: Hello guys, I try to read some radio streaming with android media player but some errors occurs during the prepare() method. Here is my source code : Log.w([Player], + setDataSource); mp.setDataSource(http://streaming.radio.rtl.fr/rtl-1-44-96;); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); Log.w([Player], + prepare); mp.prepareAsync(); mp.setOnPreparedListener(this); mp.setOnBufferingUpdateListener(this); Here is the log of device debugging on HTC Hero (target api level 3): 08-06 16:03:04.241: WARN/[Player](715): + setDataSource 08-06 16:03:04.361: WARN/[Player](715): + prepare 08-06 16:03:07.561: ERROR/PlayerDriver(432): Command PLAYER_INIT completed with an error or info PVMFErrCorrupt 08-06 16:03:07.561: ERROR/MediaPlayer(715): error (1, -10) Is there anybody that realize successfully a stream player like this ? Can anybody help me to correct my source code ? Or does media player can just play audio stream ? Regards, Matthieu --~--~-~--~~~---~--~~ 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] Animation Problem
Hello All, I'm new to Android and trying to develop an app that has loads of animation. Its a small game. Currently i have a object (image) moving around the canvas. I used animation to animate it around the screen. But the problem here is i dont have the XY coordinates of that object while its animating. I want to get the coordinates of the bitmap whenever i want during the animation. I think if there was some way where i can read the presentation layer probably i could get the cordinates of the object. Please help me guys i'm stuck here now for like a week. My another problem is with rotate animation, i some how dont seem to understand its functionality. I have played with it for a couple of days but no luck, i'm still new to it and dont get anything. The object makes big arcs even if the x,y values are 0,0 and the object jumps around when i try to give it random values. Any help would be highly appreciated. Thanks in advance. HVT --~--~-~--~~~---~--~~ 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] Inserting small icon over Image
Hi, I wish to insert a small icon (bottom roght corner) over images in gallery. Is there any image processing library available? Please Reply. Warm Regards, Sagar --~--~-~--~~~---~--~~ 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: push or push-like options
There's nothing to stop you forcing the packet data connection to remain open by sending something like a heartbeat from the server That's based on having your own protocol of course Cheers, Jim On Aug 10, 9:51 pm, Jefftoaster jefftoas...@gmail.com wrote: Hey all - I'm looking at 3 different apps to develop for the Android, but I'm new to the platform (come over from Blackberry - yuck!). Anyhow - I need to know if there is some way to push data to the phone from a server. I'd prefer to avoid using SMS to push (user charges), or constantly polling the server (lets see, every 5 seconds = 12 times a minute, 720 times an hour, over 17000 a day - No way, uh uh) So push technology - anyone? Thanks! Jeff Owens --~--~-~--~~~---~--~~ 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] Can I use the picture of Dev Phone 1 in my app? (copyright question)
Say, if I want the G1 (3D OpenGL model skinned like G1) to be the main character in my game. Will I get into copyright problem? Well this sounds silly I presume. Since the picture of G1 or ADP1 can be found anywhere. And there should be no reason at all to prohibit developer from using the G1 picture. But better safe than sorry so I asked here. I know this type of question should be answered consult a lawyer. But well I don't expect a decisive answer here. Just want to hear your ideas for this type of things. Thank you. --~--~-~--~~~---~--~~ 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] How to set Adapter extending BaseAdapter to single choice list
Hi, I have a class which extends ListActivity public class GenericListActivity extends ListActivity { ... @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new GenericListAdapter(this)); } } public class GenericListAdapter extends BaseAdapter { public GenericListAdapter(Context context) { ... } public View getView(int position, View convertView, ViewGroup parent) { convertView = mInflater.inflate (R.layout.genericlistview, null); return convertView; } } Here everything works fine. Now I want this adapter to work like the ArrayAdapter having the property of android.R.layout.simple_list_item_single_choice. That is single item choicable like the ArrayAdapter of this next line setListAdapter(new ArrayAdapterString(this, android.R.layout.simple_list_item_single_choice, GENRES)); GENRES = an array of string I just want the views returned by getView method of the GenericListAdapter should be single choice list items in the ListActivity. Please help me --~--~-~--~~~---~--~~ 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] Cellid returned by NeighboringCellInfo's getCid() ?
Hi I am interested in getting the neighboring cell's cell id information and correspondent RSSI value. So I am using the TelephonyManager's getNeighboringCellInfo() function to get the neighboring cell information. It successfully returned a list of neighboringcellinfo. However, when I try to use the getCid() function to retrieve the cell id information, the cell id looks quite different from what I got via the GsmCellLocation's getCid() function. Following is a list of the cell id I got Cell ID returned by NeighboringCellInfo's getCid() cell id[0]: 340696450 signal: 4 cell id[1]: 334470609 signal: 4 Cell ID returned by GsmCellLocation's getCid() CID: 41803 Any idea why they look so different? Also, is there any way to get the neighboring cell's LAC if it locates in different location area? Thanks a lot for the help! --~--~-~--~~~---~--~~ 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] Camera Preview on Emulator
Hi, I want to preview my camera on emulator. I have also written small app for that. But it only show black and white squares and gray square moving. Does anybody has any idea about this ? Thanks in advance, Swapnil --~--~-~--~~~---~--~~ 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] WifiReceiver not part of SDK 1.5???
I don't see this in the list of WiFi classes on the latest documentation found here http://developer.android.com/reference/android/net/wifi/package-summary.html I am refering to a WifiScanner code (snippet below) to scan wireless networks public class WifiTester extends Activity { TextView mainText; WifiManager mainWifi; WifiReceiver receiverWifi; ListScanResult wifiList; ... and it gives me an error in Eclipse saying 'WifiReceiver cannot be resolved to a type'. Any help would be appreciated. Please also let me knw how to replace the part of code that has WifiReceiver in it with any of the existing classes. Thanks, Abhi --~--~-~--~~~---~--~~ --~--~-~--~~~---~--~~ 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] Simultaneous audio playback and record?
Is it possible to simultaneously play an audio file while recording via the microphone? When I start a recording audio in the standard way with the MediaRecorder class, and then start playing back audio in the standard way with the MediaPlayer class (on an HTC Magic), it seems that the recorder is cut off when the player starts, resulting in an empty shell of a 3gp file. --~--~-~--~~~---~--~~ 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] Cupcake CSS3 (border-image) support
We are seeing a weird behavior of Cupcake rendering buttons that use - webkit-border-image. They look great on Safari, iPhone, Chrome, but it displays chunked on the handset.Given the Webkit build number it seems it should work. Is there any information available about this item? I have not been able to find any specifics. Thanks, marc --~--~-~--~~~---~--~~ 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] Good practise
I was wondering if the following is considered good practice. I am creating mulitple Dot instance. A Dot instance is a value object containing x,y, color, diameter fields. I draw each created Dot to a view: code canvas.drawCircle( dot.getX(),dot.getY(),dot.getDiameter (),paint); /code Now i want all the Dots to listen to a certain event, lets say that i want to click a button and move all the Dots. What i do is in the Dot constructor i add this code: code IntentFilter intentFilter = new IntentFilter (org.dadata.demo.SEND_TO_REACTOR); Appcontext.registerReceiver(this, intentFilter); ... @Override public void onReceive(Context context, Intent intent) { this.x += 5; } /code Then from my button i send the intent : code intent.setAction(org.dadata.demo.SEND_TO_REACTOR); getApplicationContext().sendBroadcast(intent); View.invalidate(); /code I am wondering if someone could give me some feedback on this. Is it expensive for instance, and are there better ways to achive the same. Thank you, Jiri --~--~-~--~~~---~--~~ 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] How to read Sensors from home screen Widget (1.5 cupcake)?
Hey all. I am having a difficult time figuring out a way to read the sensor data from a home screen widget. I can successfully create a home screen widget that extends AppWidgetProvider. I can successfully create a stand-alone application that reads sensor data (extends Activity). What seems to be impossble (for me) is combining them into a home screen widget that reads sensor data. The classes that you have to use, like SensorManager, SensorListener all seem to require an Activity which the AppWidgetProdiver doesnt have. I have also tried keeping my sensor data reader in a separate class that extends Activity and then instantiating that class in my widget. Makes sense in my head but no data is ever read from the sensors. Any tips or examples of how this works is appretiated! --~--~-~--~~~---~--~~ 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] Incredible bug reading a network stream
Hello ! First, sorry but my english is bad ^^ ! I'm develloping an app for android. I use a function (see below) for transfert a file on the network. private void fromTo(InputStream in, OutputStream out, int offset, long length){ try{ byte[] buffer = new byte[buffer_size]; long total = 0; while(total = length+offset-buffer_size){ in.read(buffer); out.write(buffer); total+=buffer_size; } int end = ((int)(length-total))+offset; in.read(buffer, 0, end); out.write(buffer, 0, end); } catch(Exception e){} } ___ NB:i've removed some code... Two situation: -S1: in is get from a socket and out is a locale file -S2: in is the local file and out is get from a socket Well ! S1 and S2 work on the emulator. But, on a real device, S1 make some problem. The file is mixed :/ ! For exemple i would to tranfert this text: 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF But i receive this: 123456789ABCDEF 12345678923456789ABCDEF 123456789ABCDEF 123456789ABCDEF 12345678ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789 (not realy a real exemple) The content received have same size as the source. Look at this: 123456789ABCDEF is send and 12345678ABCDEF is received :/ ! How does it is possible ? Someone can help me ? Thank in advance. --~--~-~--~~~---~--~~ 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: Good practise
Code first for simplicity then optimize if/as needed. That being said (well, more like pontificated, sorry), a simpler design would be to aggregate all your dots into a DotManager. This would listen and draw all the dots as needed. Aggregation works if all the dots are similar enough that their code can be centralized, and if I understand your problem correctly (all dots listen for the same event and then they all move), my brilliant and royalty-free design would be appropriate. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 11, 9:13 am, jiriheitla...@googlemail.com jiriheitla...@googlemail.com wrote: I was wondering if the following is considered good practice. I am creating mulitple Dot instance. A Dot instance is a value object containing x,y, color, diameter fields. I draw each created Dot to a view: code canvas.drawCircle( dot.getX(),dot.getY(),dot.getDiameter (),paint); /code Now i want all the Dots to listen to a certain event, lets say that i want to click a button and move all the Dots. What i do is in the Dot constructor i add this code: code IntentFilter intentFilter = new IntentFilter (org.dadata.demo.SEND_TO_REACTOR); Appcontext.registerReceiver(this, intentFilter); ... @Override public void onReceive(Context context, Intent intent) { this.x += 5; } /code Then from my button i send the intent : code intent.setAction(org.dadata.demo.SEND_TO_REACTOR); getApplicationContext().sendBroadcast(intent); View.invalidate(); /code I am wondering if someone could give me some feedback on this. Is it expensive for instance, and are there better ways to achive the same. Thank you, Jiri --~--~-~--~~~---~--~~ 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: Animation Problem
I'm not sure about the coordinates thing, but if you are trying to use rotateAnimation to rotate something such that it looks like it is spinning in-place, then 0,0 are not the coordinates you want. The coordinates are a 'pivot point'; you could think of them as the 'middle' of the rotation. If you want an object to rotate or spin without moving up/down/left/ right, then what you actually want is: RotateAnimation spin = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); This gives the middle of the image as the 'pivot' so it doesn't move in an arc. Hope this helps! On Aug 11, 1:59 am, HVT vikramhiman...@gmail.com wrote: Hello All, I'm new to Android and trying to develop an app that has loads of animation. Its a small game. Currently i have a object (image) moving around the canvas. I used animation to animate it around the screen. But the problem here is i dont have the XY coordinates of that object while its animating. I want to get the coordinates of the bitmap whenever i want during the animation. I think if there was some way where i can read the presentation layer probably i could get the cordinates of the object. Please help me guys i'm stuck here now for like a week. My another problem is with rotate animation, i some how dont seem to understand its functionality. I have played with it for a couple of days but no luck, i'm still new to it and dont get anything. The object makes big arcs even if the x,y values are 0,0 and the object jumps around when i try to give it random values. Any help would be highly appreciated. Thanks in advance. HVT --~--~-~--~~~---~--~~ 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: Can I use the picture of Dev Phone 1 in my app? (copyright question)
I was pointed to http://www.android.com/branding.html when I had questions about some different legal issues. I checked and there isn't anything there regarding the G1 hardware... I guess because T-Mobile or somebody else probably owns the hardware licensing? I doubt anybody is really going to get after you about using a 3D model skinned like a G1, but if you're really worried about it, maybe one of the T-mobile guys who read Android Developers will get back to you on it :) On Aug 11, 3:09 am, hzakimoto hzakim...@gmail.com wrote: Say, if I want the G1 (3D OpenGL model skinned like G1) to be the main character in my game. Will I get into copyright problem? Well this sounds silly I presume. Since the picture of G1 or ADP1 can be found anywhere. And there should be no reason at all to prohibit developer from using the G1 picture. But better safe than sorry so I asked here. I know this type of question should be answered consult a lawyer. But well I don't expect a decisive answer here. Just want to hear your ideas for this type of things. Thank you. --~--~-~--~~~---~--~~ 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: movie gif 图 片显示时被分割
使用 Canvas.drawTextOnPath 两次。 Yusuf Saib 机器人 Ť移动粘在一起 的看法,意见和声明此电子邮件是那些作者只是以个人身份,并不一定代表美国T - Mobile公司 On Aug 11, 12:08 am, xiaofeng rwgcz...@163.com wrote: Movie-type show with I love you my wife, the words of the picture, I love you split up I love and you and diagonally on display? --~--~-~--~~~---~--~~ 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: push or push-like options
You could try to implement a select similar mechanism. In such a case you could wait for incoming traffic on a selected socket You find information on this topic at http://www.developer.com/java/other/article.php/626271 http://www.javaworld.com/javaworld/jw-04-2003/jw-0411-select.html -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 11, 1:26 am, Jim (sjjh) jhawk...@good.com wrote: There's nothing to stop you forcing the packet data connection to remain open by sending something like a heartbeat from the server That's based on having your own protocol of course Cheers, Jim On Aug 10, 9:51 pm, Jefftoaster jefftoas...@gmail.com wrote: Hey all - I'm looking at 3 different apps to develop for the Android, but I'm new to the platform (come over from Blackberry - yuck!). Anyhow - I need to know if there is some way to push data to the phone from a server. I'd prefer to avoid using SMS to push (user charges), or constantly polling the server (lets see, every 5 seconds = 12 times a minute, 720 times an hour, over 17000 a day - No way, uh uh) So push technology - anyone? Thanks! Jeff Owens --~--~-~--~~~---~--~~ 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: Slow GPS updates
I have now measured the sample rate, and it is quite consistent with 500m/s between each sample. I removed my filter, and the application became far more responsive, but it still takers quite some time before I get accurate readings after stopping. Anyway, I am quite satisfied with the response of the application... That should teach me to start simple :) (phone = HTC-magic) --~--~-~--~~~---~--~~ 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: Incredible bug reading a network stream
On Aug 11, 6:35 pm, Vermouth ggauthier@gmail.com wrote: How does it is possible ? Someone can help me ? Thank in advance. you have to check how many bytes in.read() actually read pskink --~--~-~--~~~---~--~~ 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: dynamically add checkbox
Thanks Jack Ha for your reply. Can you give me code snippt to do it ? Sorry but i am new bie in UI desing. I am just wasting my much time so please tell me how can i do it. On Aug 11, 8:54 pm, Jack Ha jack...@t-mobile.com wrote: You can create an empty LinearLayout and call its addView() function to add the checkboxes dynamically in your code. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 11, 5:44 am, Honest honestsucc...@gmail.com wrote: Hello, I want to create the checkbox dyananically and display them to the screen. My problem is that at compilation time i will not know that how many check boxes i will have to create. So can some one tell me how can i do it ? I am so thankful to you as i have wasted already 2 days behind this bloody issue. --~--~-~--~~~---~--~~ 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: dynamically add checkbox
On Aug 11, 4:54 pm, Jack Ha jack...@t-mobile.com wrote: You can create an empty LinearLayout and call its addView() function to add the checkboxes dynamically in your code. if Honest doesn't know how many check boxes to add chanses are there may be too many to fit them all in physical screen. so maybe the better idea is to use ScrollView or ListView pskink --~--~-~--~~~---~--~~ 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: Can't get my widget to show up?
hmm? On Aug 5, 2:02 pm, cvance383 cvance...@yahoo.com wrote: bump.. anyone? On Aug 4, 1:42 pm, cvance383 cvance...@yahoo.com wrote: I followed the tutorial off code.google.com to add widgets to your app. For some reason, when I run the app on the phone for testing, then long click the home screen to add widgets, my widget is not an option. I imagine I am doing something wrong, but I thought I followed the tutorial pretty well. Here is some of my code, please offer a suggestion of why I can't add my widget. BTW i dont care that it doesnt do anything yet, or even if it breaks, I just want to see it as an option first (small steps). Thanks for any help or feedback Any * you see, is just a place holder for the real name. My widget provider public class * extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { final int N = appWidgetIds.length; // Perform this loop procedure for each App Widget that belongs to this provider for (int i=0; iN; i++) { int appWidgetId = appWidgetIds[i]; // Create an Intent to launch ExampleActivity Intent intent = new Intent(context, MobileApp.class); PendingIntent pendingIntent = PendingIntent.getActivity (context, 0, intent, 0); // Get the layout for the App Widget and attach an on- click listener to the button RemoteViews views = new RemoteViews(context.getPackageName (), R.layout.widget); views.setOnClickPendingIntent(R.id.widget_next_label, pendingIntent); // Tell the AppWidgetManager to perform an update on the current App Widget appWidgetManager.updateAppWidget(appWidgetId, views); } } } My manifest ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.*.android android:versionCode=1 android:versionName=1.0.0 application android:label=* activity android:name=.MobileApp android:label=* android:configChanges=orientation|keyboardHidden android:theme=@style/Theme.NoBackground android:icon=@drawable/icon_gs intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity service android:name=.audio.AudioPlayerService android:exported=false android:enabled=true / /application receiver android:name=.*AppWidgetProvider android:label=* Widget intent-filter action android:name=android.appwidget.action.APPWIDGET_UPDATE / /intent-filter meta-data android:name=android.appwidget.provider android:resource=@xml/app_widget_info / /receiver uses-sdk minSdkVersion=2 / uses-permission android:name=android.permission.INTERNET/ uses-permission android:name=android.permission.READ_PHONE_STATE/ uses-permission android:name=android.permission.ACCESS_NETWORK_STATE/ uses-permission android:name=android.permission.WAKE_LOCK/ /manifest and my info .xml file... ?xml version=1.0 encoding=utf-8? appwidget-provider xmlns:android=http://schemas.android.com/apk/res/ android android:minWidth=294dp android:minHeight=72dp android:updatePeriodMillis=8640 android:initialLayout=@layout/widget /appwidget-provider my widget layout file ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=wrap_content android:layout_height=wrap_content Button android:id=@+id/widget_play_button android:layout_width=25px android:layout_height=25px android:layout_alignParentLeft=true android:layout_centerVertical=true android:text=Play / Button android:id=@+id/widget_next_button android:layout_width=25px android:layout_height=25px android:layout_toRightOf=@id/widget_play_button android:text=Next / TextView android:id=@+id/widget_song_label android:layout_width=wrap_content android:layout_height=wrap_content android:layout_toRightOf=@id/widget_next_button android:layout_marginTop=5px android:text=Song Name by Song Artist android:textSize=16px/ TextView android:id=@+id/widget_next_label android:layout_width=wrap_content android:layout_height=wrap_content
[android-developers] Re: dynamically add checkbox
Thanks pskink for you reply. But can you tell me how can i use ListView or ScroolView. My basic requirement is that i want to display more then one String and user should be able to select multiple item from them. Please advice me and if possible give me code snippt. I am doing this silly things from last two days. Sometimes easy things take time. On Aug 11, 10:58 pm, skink psk...@gmail.com wrote: On Aug 11, 4:54 pm, Jack Ha jack...@t-mobile.com wrote: You can create an empty LinearLayout and call its addView() function to add the checkboxes dynamically in your code. if Honest doesn't know how many check boxes to add chanses are there may be too many to fit them all in physical screen. so maybe the better idea is to use ScrollView or ListView pskink --~--~-~--~~~---~--~~ 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: Find Default Activity corresponding to Intent
Inspite of choosing a Default app for my intent, isDefault is set to false to for both the ResolveInfos in my list. The order of the ResolveInfo seems to be based on install time - I verified this by choosing the second app in my Intent Resolver dialog and called queryIntentActivities again; my default app still showed up second in the list and isDefault was set to false. Also, the documentation of isDefault says nothing about it being the default app, rather just that if the category of the intent was DEFAULT - This filter has specified the Intent.CATEGORY_DEFAULT, meaning it would like to be considered a default action that the user can perform on this data. (Related question: When does this become true?) Any other pointers? Will PackageManager.getPreferredActivities help me in anyway? -George On Aug 10, 8:41 pm, Dianne Hackborn hack...@android.com wrote: Oh sorry, you are right, this function always return the full list. They are ordered by how good they match the intent; if there is a default it will be the first in the list with isDefault set to true. On Mon, Aug 10, 2009 at 7:24 PM, George bipi...@gmail.com wrote: That is not what I am seeing. I have two email applications which handle the same intent ie in their manifest files I have intent-filter action android:name=com..compose'/ category android:name=android.intent.category.DEFAULT/ /intent-filter in my calling app, Intent intent = new Intent(); intent.setAction(com..compose); when I call ListResolveInfo l =queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); l.size() always returns two -irrespective of chosing a default when the intent resolver dialog is shown. And the values in the resolveinfo list points to my email applications. I want to know programatically, if a default has been chosen by the user. On Aug 10, 6:40 pm, Dianne Hackborn hack...@android.com wrote: If the user has selected a default activity, that is the only one that is returned. If they haven't, and there are multiple matching activities, than the system's intent resolver activity will be returned. On Mon, Aug 10, 2009 at 6:18 PM, George bipi...@gmail.com wrote: PacakgeManager.queryIntentActivities(Intent intent, int flags) with flags = MATCH_DEFAULT_ONLY returns a list of applications that handle a particular intent. How do I find the default activity that is chosen by the user? Note: The default activity is chosen by the user the first time he is prompted with a list of applications that handle a particular intent. -- 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. -- 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: problems purchasing my own app
I can see where it could be to the disadvantage of us 3rd party developers if those with bigger pockets could buy their apps multiple times with the goal of pushing up it's ratings. But it would be nice to be able to buy it once just to have that last confirmation that everything was good. Regardless, I wish this would be confirmed by the Google folks and was a WELL documented feature, like right there on the Developer Console page, or at least in a FAQ somewhere. On Aug 11, 8:49 am, Streets Of Boston flyingdutc...@gmail.com wrote: I tried it a while ago and i could not buy my own app either (i got the same error). I read (somewhere in this forum or another forum) that buying your own app is not allowed. I just wished that the error message was more clear you cannot buy your own application instead of server error has occurred. On Aug 11, 1:23 am, michael m mgmait...@gmail.com wrote: I published my first paid for app, NoteToMe, and when I went to purchase it to for testing I got the error A server error has occurred. Retry, or cancel and return to the previous screen. I tested my credit card info by successfully purchasing another app, and I've double/triple checked my settings and all the requirments for publishing an app, but haven't found anything. Just the fact that I was able to successfully upload it to the Developer Console and see it via the market tells me that I signed the app correctly. I even uploaded it to my blog and was able to download it and run from there. Does anyone have any debugging tips that I could try, or have seen this issue before. I did a search and came up with this page, http://www.google.com/support/forum/p/Android%20Market/thread?tid=3f8... but the fact that I can purchase other apps leads me to believe something else is wrong. I went ahead and kept it published to see if other people will be able to purchase itthis is not a solicitation for others to attempt to purchase the app , just was wondering if anyone else has had this issue. thanks, - michael --~--~-~--~~~---~--~~ 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: dynamically add checkbox
Honest wrote: Thanks pskink for you reply. But can you tell me how can i use ListView or ScroolView. My basic requirement is that i want to display more then one String and user should be able to select multiple item from them. Please advice me and if possible give me code snippt. I am doing this silly things from last two days. Sometimes easy things take time. On Aug 11, 10:58 pm, skink psk...@gmail.com wrote: On Aug 11, 4:54 pm, Jack Ha jack...@t-mobile.com wrote: You can create an empty LinearLayout and call its addView() function to add the checkboxes dynamically in your code. if Honest doesn't know how many check boxes to add chanses are there may be too many to fit them all in physical screen. so maybe the better idea is to use ScrollView or ListView pskink --~--~-~--~~~---~--~~ 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: dynamically add checkbox
On Aug 11, 8:12 pm, Honest honestsucc...@gmail.com wrote: Thanks pskink for you reply. But can you tell me how can i use ListView or ScroolView. My basic requirement is that i want to display more then one String and user should be able to select multiple item from them. Please advice me and if possible give me code snippt. I am doing this silly things from last two days. Sometimes easy things take time. well, add ScrollView in your layout file, inside it add empty LinearLayout with some id then in java obtain that LinearLayout by calling findViewById, cast it to LinearLayout and finally call addView once or more times pskink --~--~-~--~~~---~--~~ 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: Find Default Activity corresponding to Intent
Sorry yes I am wrong again... it's been a while since I've looked at the code. :} Okay so hopefully this will be right -- the method in the package manager for determining the default activity is not public (it is PackageManagerService.findPreferredActivity() fwiw). The only suggestion I can make is to just call resolveIntentActivity(), which will always only return a single activity, either the one matching activity, the current default if the user has picked a default, or the intent resolver if there is no default. On Tue, Aug 11, 2009 at 11:13 AM, George bipi...@gmail.com wrote: Inspite of choosing a Default app for my intent, isDefault is set to false to for both the ResolveInfos in my list. The order of the ResolveInfo seems to be based on install time - I verified this by choosing the second app in my Intent Resolver dialog and called queryIntentActivities again; my default app still showed up second in the list and isDefault was set to false. Also, the documentation of isDefault says nothing about it being the default app, rather just that if the category of the intent was DEFAULT - This filter has specified the Intent.CATEGORY_DEFAULT, meaning it would like to be considered a default action that the user can perform on this data. (Related question: When does this become true?) Any other pointers? Will PackageManager.getPreferredActivities help me in anyway? -George On Aug 10, 8:41 pm, Dianne Hackborn hack...@android.com wrote: Oh sorry, you are right, this function always return the full list. They are ordered by how good they match the intent; if there is a default it will be the first in the list with isDefault set to true. On Mon, Aug 10, 2009 at 7:24 PM, George bipi...@gmail.com wrote: That is not what I am seeing. I have two email applications which handle the same intent ie in their manifest files I have intent-filter action android:name=com..compose'/ category android:name=android.intent.category.DEFAULT/ /intent-filter in my calling app, Intent intent = new Intent(); intent.setAction(com..compose); when I call ListResolveInfo l =queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); l.size() always returns two -irrespective of chosing a default when the intent resolver dialog is shown. And the values in the resolveinfo list points to my email applications. I want to know programatically, if a default has been chosen by the user. On Aug 10, 6:40 pm, Dianne Hackborn hack...@android.com wrote: If the user has selected a default activity, that is the only one that is returned. If they haven't, and there are multiple matching activities, than the system's intent resolver activity will be returned. On Mon, Aug 10, 2009 at 6:18 PM, George bipi...@gmail.com wrote: PacakgeManager.queryIntentActivities(Intent intent, int flags) with flags = MATCH_DEFAULT_ONLY returns a list of applications that handle a particular intent. How do I find the default activity that is chosen by the user? Note: The default activity is chosen by the user the first time he is prompted with a list of applications that handle a particular intent. -- 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. -- 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. -- 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: why camera is rotated
When I use screenOrientation=landscape screen get normal but when I take photo or capture video and save it , the saved picture/video is still not normal they are atill rotated. ScreenOrientation just rotate preview not settings of camera On 11 Ağustos, 17:38, doubleslash doublesl...@gmail.com wrote: Setting screenorientation does it for G1. On Aug 10, 11:43 pm, engin enginarsla...@gmail.com wrote: Hi, I use google htc innovation and i am developing and apllication which uses camera to take picture and capture video. in both cases i get rotated picture\video. On Aug 10, 9:42 pm, Dash125 paulgig...@gmail.com wrote: Hi, I think it would be helpful to know which devices you are developing/testing on. On Aug 5, 6:31 pm, engin enginarsla...@gmail.com wrote: Hi, I am trying to useCamerato take picture and to video recording but it always runs in portrait mode. Even if I tried to sreenOrientatiton=landscape it solved screen appearance but when I take photo andcapturevideo they are still saved rotated 90 degrees. I searched it but ı could not find clear solution. Can anybody help me Thanks.- Hide quoted text - - Show quoted text -- Alıntıyı gizle - - Alıntıyı göster - --~--~-~--~~~---~--~~ 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: Why does my PhoneStateListener go quiet?
On Aug 10, 9:00 am, Ne0 liamjamesalf...@googlemail.com wrote: Thanks for you input Chris. I have managed to get around the issue by using SCREEN_DIM_WAKE_LOCK, the PhoneStateListener still receives updates when held in that state. As my app is for engineering purposes and will not be for the general Market, i have decided to make it a platform application so i am no longer bound by the SDK API's. I would have preferred to stick to the SDK, but it is in need of some work. According to issue 700 (i think) google is planning on making that API better. Liam On Aug 7, 12:32 pm, chrisnew ch...@floor51.com wrote: On Jul 29, 2:59 pm, Ne0 liamjamesalf...@googlemail.com wrote: I am using ACCESS_COARSE_LOCATION in my manifest. On 29 July, 14:49, Ne0 liamjamesalf...@googlemail.com wrote: Hi, Been having some issues with my PhoneStateListener, what i would like it to do is to always listen to CellLocationUpdates even when the phone sleeps. I am currently trying to do this with the following code. public class MyService extends Service { ... public void onCreate() { // Start listening to the phone mMyPhoneListener = new MyPhoneStateListener(this); mTelephonyManager = (TelephonyManager)getSystemService (TELEPHONY_SERVICE); mTelephonyManager.listen(mMGPhoneListener, PhoneStateListener.LISTEN_CELL_LOCATION) mPm = (PowerManager) getSystemService(Context.POWER_SERVICE); mWl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, MYS); mWl.acquire(); Log.d(MGS, ServiceOnCreate); } public void onDestroy() { // Stop listen to the location updates mTelephonyManager.listen(mMGPhoneListener, PhoneStateListener.LISTEN_NONE); // Release wake lock mWl.release(); Log.d(MGS, ServiceOnDestroy); } } public class MyPhoneStateListener extends PhoneStateListener { public voidonCellLocationChanged(CellLocation location) { // DOING SOME LOGGING } } Even though i am using a PARTIAL_WAKE_LOCK the CellLocationUpdates stop when the phone sleeps, i am almost certain that my service is not getting destroyed as i have debug in place onDestroy to show this happening on logcat. I have also noticed this on logcat, D/MGS ( 6153): ServiceOnCreate (my debug of the service starting) and D/SurfaceFlinger( 59): About to give-up screen, flinger = 0x1841e8 D/dalvikvm( 143): GC freed 54 objects / 2328 bytes in 146ms D/dalvikvm( 6153): GC freed 2115 objects / 126456 bytes in 140ms Is this android freeing up the memory from my service? looks like the same PID? Can anyone shed some light on why i am not receiving any updates after the screen/phone sleeps? Thanks Liam. Hi Liam, I've tried the following: - create a Service which creates a PhoneStateListener based class - setup a Handler in the Service to run every minute and reset the TelephonyManager.listen call with LISTEN_CELL_LOCATION and LISTEN_SIGNAL_STRENGTH - make the Handler in the Service run PowerManager.WakeLock.acquire every minute with SCREEN_DIM_WAKE_LOCK - create a class that is called by RECEIVE_BOOT_COMPLETED to run the service on phone boot with the idea that maybe services started on boot are treated differently I've found that the PhoneStateListener class begins returning -1 for cell and signal when it is forcefully sent a listen request every minute which I think illustrates why the cell listener goes quiet - ie. the Android framework is no longer receiving the cell/signal data from the modem. I think that a possible solution is to call PowerManager.WakeLock.acquire with SCREEN_DIM_WAKE_LOCK after the phone is sent to idle state though I need to leave it running for a while to see how it behaves. Obviously this has a significant battery impact so it would be much better if the framework is modified. Perhaps the framework is meant to stop receiving cell/signal updates from the modem when the phone is idle to save power though a forceful wakeup must clearly be sent when a call/message comes in at which point I guess the cell/ signal data is made available again to correctly set the signal indicator on the UI. I have seen an enableLocationUpdates method in the TelephonyManager.java code in the source download and maybe it is this which is being called by the framework when the phone is sent to idle to disable the cell/signal updates. I will try and see if calling this after the phone is sent to idle makes a difference (if I can compile against the internal version and the symbol is available on device). chris Having observed the behaviour I think the wake lock is unreliable. I still get lots of -1s in sleep state though sometimes it is populated. Maybe this is to do with other background services. Note
[android-developers] Re: Incredible bug reading a network stream
you have to check how many bytes in.read() actually read Hum... I don't understand ^^ ! Sorry ^^ ! After in.read(buffer);, in stop reading ! And it have read buffer_size bytes ! --~--~-~--~~~---~--~~ 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: KEYCODE_HOME
Thanks Dianne. I am still confused as to why consuming all events in onKeyDown breaks the normal behavior when relaunching the app? If I leave onKeyDown alone, pressing HOME takes me to the home screen and relaunching takes me directly back to where I left off in the task. However if I always return true from onKeyDown then after pressing home and then relaunching, the task is restarted from the beginning. Why is that? Thanks again. On Aug 10, 8:20 pm, Dianne Hackborn hack...@android.com wrote: The home and end call keys are intercepted by the system before ever reaching the application, and there is nothing you can do in the app to modify their behavior (including overriding onKeyDown). All other keys (including back, menu, call, and search) are first sent to the application and only perform their default action if the application does not consume them. By returning true from onKeyDown(), you are consuming the events and not allowing their normal behavior to run. On Mon, Aug 10, 2009 at 7:15 PM, eags eagsala...@gmail.com wrote: This behavior is actually very strange and apparently not quite as simple as the event is not delivered to applications. Indeed if I try and capture the key event, I cannot. However if I just do this: public boolean onKeyDown(int keyCode, KeyEvent event) { return true; //return super.onKeyDown(keyCode, event); } and then press the home key, the Activity does not stay in the task stack and launching again does not get me back to this activity but the whole app is just launched again from the beginning. So it is like there is something in the default implementation of onKeyDown that makes the correct behavior work and I can't stop it from happening but somehow I can break it but always retuning true from onKeyDown. Can anyone explain this behavior or point me to some documentation that will clear this up? Thanks. On Aug 7, 8:04 pm, Marco Nelissen marc...@android.com wrote: The home key is not delivered to applications. On Fri, Aug 7, 2009 at 7:25 PM, eagseagsala...@gmail.com wrote: I have implemented onKeyDown and can successfully intercept KEYCODE_BACK and many others to prohibit the default behavior. Is this not possible with KEYCODE_HOME? I have a test activity that will only finish() if KEYCODE_A is seen. Even KEYCODE_BACK does nothing. However KEYCODE_HOME continues to have its effect. Anyone have any insight into this? Thanks. The test code is below. The strange thing to note is that although the toast in the if/else that should handle the KEYCODE_HOME never fires, if I relaunch the application the state is *not* restored so it is like either the onDestroy is being called (previously I tried finish() also) or it is like the application is crashing for some other reason. I'm confused. import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.widget.Toast; public class MainMenu extends Activity { public void onCreate(Bundle bun) { super.onCreate(bun); setContentView(R.layout.main); } public boolean onKeyDown(int keyCode, KeyEvent event) { //if we get any key, clear the Splash Screen if(keyCode==KeyEvent.KEYCODE_HOME) { Toast.makeText(getApplicationContext(), HIT!, Toast.LENGTH_SHORT).show(); onDestroy(); return true; } else { Toast.makeText(getApplicationContext(), missed, Toast.LENGTH_SHORT).show(); return true; } //return super.onKeyDown(keyCode, event); } } -- 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 -~--~~~~--~~--~--~---