[android-developers] loading xls (excel) documents programatically
Hi, Is there a way to show a xls document programatically, i.e., load a third party application that can handle xls files and pass the file by command line? thanks guich Ps: i don't want to use the JExcelAPI -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] opengl and requestRender update order
Hi, I'm changing a program from standard graphics to opengl. The way that my program behave was: 1. Update internal bitmap information. 2. Draw on the offscreen. 3. Draw the offscreen image on screen. On opengl, i just noticied that anything that you draw before calling requestRender is IGNORED. My idea was to first send opengl commands and then request opengl's surface to draw these. Is there a way to let it work like this? Another way to look at the problem: suppose two threads are updating part of the screen using opengl. How exactly can one thread update the part of the screen that it is drawing, leaving the other part untouched? thanks guich -- 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 and requestRender update order
Hi, I'm using GLES20. I'm not sure about how the opengl es 2 works. For me, the requestRender should update the screen with the contents sent by the last opengl commands. However, it seems to do the opposite: start looking for commands and then (at some misterious moment), update the screen. thanks guich -- 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 and requestRender update order
I just realized that i'm doing the GLES20 commands in a thread that is not the ui thread. Are there any requirements about this? Actually, all my gles commands are done natively. thx guich -- 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 and requestRender update order
Reading in the web i found that only one context can be used in a single thread. So, its not possible to use opengl outside the ui thread. -- 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: GL_POINTS not drawing points
Hi, Many thanks for your help. The actual problem was a misunderstood of the STRIDE value, which must be NUMBER OF COORDS PER VERTICE * SIZEOF FLOAT. Changing to 12 fixed the problem. cheers guich -- 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: GL_POINTS not drawing points
Hello! Thanks for answering. Actually, i already know how to draw lines and rectangles, but i would like to draw points. Can you provide me with the calls to the Matrix methods that would achieve the 2D projection using screen coordinates for the given surface width and height? I made some tests with just a few points and it looks really strange. For example, if i call this: coords[0] = 10; coords[1] = 10; coords[3] = 11; coords[4] = 10; vertexBuffer.put(coords); vertexBuffer.position(0); GLES20.glVertexAttribPointer(mPositionHandle, 3, GLES20.GL_FLOAT, false, 3 * 2, vertexBuffer); // Prepare the triangle coordinate data GLES20.glDrawArrays(GLES20.GL_POINTS, 0,2); Then i get a point at 0,0 and another at 10,10. If i add a new coordinate at 12,10, i get two points side by side, but if i add a new point at 13,10, i get only 1 point again! 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] GL_POINTS not drawing points
, COORDS_PER_VERTEX * nn, letBuffer); GLES20.glDrawArrays(GLES20.GL_POINTS, 0,nn); } public static int loadShader(int type, String shaderCode) { int shader = GLES20.glCreateShader(type); GLES20.glShaderSource(shader, shaderCode); GLES20.glCompileShader(shader); return shader; } public void setColor(int rgb) { color[0] = (float)((rgb 16 ) 0xFF) / 255f; color[1] = (float)((rgb 8 ) 0xFF) / 255f; color[2] = (float)((rgb ) 0xFF) / 255f; color[3] = (float)((rgb 24) 0xFF) / 255f; GLES20.glUniform4fv(mColorHandle, 1, color, 0); // Set color for drawing the line } } thanks, guich https://lh5.googleusercontent.com/-lelPSZoY4dw/UEIH5mVQfII/AD4/o5q5GMFuL00/s1600/points.png -- 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] using pixel coordinates in opengl es 2
Hi, I downloaded and played with the opengl sample at http://developer.android.com/training/graphics/opengl/draw.html However, it uses the standard coordinate system for opengl, where 0,0 is at the center of the screen and -1,-1 at top-left and 1,1 at bottom- right. I want to use the screen's coordinate, where 0,0 is at top-left and width,height is at bottom-right. I already tried a dozen things, read about 30 articles, but since i'm a newbie at opengl, i'm still stumped. Can someone tell what it has to be done to change the coordinate so that the given rectangle static float squareCoords[] = { 10f, 10f, 0.0f, // top left 10f, 20f, 0.0f, // bottom left 20f, 20f, 0.0f, // bottom right 20f, 10f, 0.0f }; // top right ... is shown at screen? thanks guich -- 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: image show with zoom/pan
nobody? -- 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] image show with zoom/pan
Hi, Is there a ready component to show an image and zoom/pan it, like the one in album/gallery? I just want to show a big image and zoom in/out and pan, full screen, then if back is clicked, it goes back to my app. tia guich -- 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] finding if the device has phone support/flight mode
Hi, Currently i identify a device using the imei. However, some devices does not have phone support, and tho, they don't have imei. In devices that have phone/telephony and have imei, if they turn off the device, turn on and then put it in flight mode, the imei is not available. So, is there a way that i can find if the device has no imei, or is in flight mode? thx guich -- 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 get the name of external card
Hi, Is there an api to get the path to the external sdcard? I used the ones described here: http://developer.android.com/guide/topics/data/data-storage.html , but they dont work. The path for the galaxy 2 7 is /sdExtCard. thanks guich -- 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: keys not being issued on android 4.0
Yes, it works from android 1.6 to 3.x. I have not tested this on other ISC devices. -- 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: keys not being issued on android 4.0
Hi, There's no physical keyboard. How do i use the legacy text input mode? Searched the net and found nothing thanks guich -- 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: keys not being issued on android 4.0
Hi, Got it working with this (lines marked with * was crucial): public InputConnection onCreateInputConnection(EditorInfo outAttrs) { outAttrs.inputType = android.text.InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS; // * outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE; // * return new BaseInputConnection(this, false) { public boolean deleteSurroundingText(int leftLength, int rightLength) { if (rightLength 0 leftLength == 0) // do not handle right deletions return true; while (leftLength-- = 0) { if (!sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))) return false; if (!sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL))) return false; } return true; } }; } guich www.superwaba.com.br -- 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] keys not being issued on android 4.0
Hi, I got a Galaxy Tab 7.2 with 4.0.3. I cannot get standard (a-z, 0-9, symbols) keys using oKeyPreIme nor onKey: no events are being sent. I call setOnKeyListener(this) at the activity. Do i need to do anything special on OS 4? thanks guich -- 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] added wrong permission but android didn't complain
Hi, I added this: uses-permission android:name=android.permission.WRITE_MEDIA_STORAGEa / (note the leading 'a') ... and android compiler didn't complain about the wrong permission. This leads me that he is silently ignoring permissions that he doesn't handle. How can i make android compiler/builder warn me about them? I need to know what is correct and what is incorrect. thanks guich -- 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: added wrong permission but android didn't complain
Hi, So, the permission is written as-is and found only at runtime? I'm asking this because my applications are having problems accessing the sdcard of some tablets like Xoom and Galaxy. From this article: http://www.afternote.net/2012/03/sdcard-write-problem-fix-for-samsung.html , i added these two to my manifest: uses-permission android:name=android.permission.WRITE_MEDIA_STORAGE / uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE / and, even with these, i cannot write to the external storage. So, i made a test adding a leading a to a permission to find if android was understanding that permission. My minSdkVersion is 4 Any clues on what could be wrong are greatly appreciated. guich -- 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: added wrong permission but android didn't complain
I found this: http://www.xda-developers.com/android/android-3-2-code-inadvertently-preventing-write-access-to-external-storage/ However, i'm still stucked. -- 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] what's the safe place to create backups?
Hi, I used to write backup files of my application's data to /sdcard, so they will survive if my application is removed (sometimes the user must remove it and then install a new version, and then restore the backup from the sdcard). However, in devices with 3.2 and up, it is not possible to write to the sdcard (http://www.xda-developers.com/android/android-3-2-code- inadvertently-preventing-write-access-to-external-storage/). How can i get, using the API, a path to somewhere that can be used to create the backup, and that will remain even after the application is uninstalled? thanks guich -- 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: something better than 16bpp
Hi I made a test on a Defy with Android 3.2. The pixel format is 5, 32bpp. In a benchmark program, with 16bpp, i have 6.5s, in 32bpp, i have 7.7s. Also, its clear for me, by looking at the screen colors, that the device is mapping 32 bits to 16 bits, since i can easily see gray shades, which don't appear in my 32bpp windows screen. So, the information that Android returns to me is incorrect. Any clues on what i could do to use 32bpp only on devices that are actually at least 24bpp are welcome. guich -- 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: something better than 16bpp
Same problem occurs with a Galaxy Tab 7 plus. guich -- 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: something better than 16bpp
Hi, Actually, i'm not sure at all. What i do know is that the Android OS is returning incorrect information. Ok, it can be a manufacturer problem, but the fact is that this information is not consistent, and therefore, cannot be used. The P1000 seems to have a lcd screen. Anyway, i believe it is just a matter of time to have real 24-bpp screens on the market. My only concern is about a way to identify them. thanks guich -- 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: something better than 16bpp
Well, i'll consider that. 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: something better than 16bpp
Hi, If the frame buffer is 32bpp, what else would it report? So, what would be the way to retrieve that a screen is really true color? regards guich -- 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: something better than 16bpp
Hi, Thanks for the explanations. And how do i get the available screen depth for the device? Have you tried that in a galaxy tab and did it return the correct values? best, guich ps: congrats for the victory! -- 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] something better than 16bpp
Hi, We already have lots of good tablets outside. Is there anything better than 16bpp to use? Can i use 24bpp with android, for example, with galaxy tabs? thanks guich -- 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: something better than 16bpp
This article (http://www.displaymate.com/ Samsung_Galaxy_Tab_ShootOut.htm) says that Galaxy Tab 10.1 has a 24bpp screen. How can i reach this resolution using the android api? -- 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: Transport endpoint is not connected
Hi, Unfortunately, no. As i said, it occurs intermitently. Or, in other words, it works almost always, but this error happens somethimes when the data reaches the destination, and then the error is returned. 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: something better than 16bpp
not sure if it is really used in android. Some months ago a senior engineer from Android (forgot her name right now) said that no device used such configuration. 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] Transport endpoint is not connected
Hi, I'm getting this error in some devices when using sockets. It occurs with 3G and wifi connections. The error is intermitent. Is anyone aware of the problem and maybe for a fix? thanks guich -- 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] Cannot start service - yes, this problem again
Hi, I already searched stackoverflow, this forum and google itself. Followed all instructions, but i still cannot get my service to be started at the BOOT_COMPLETED. The sample i'm using came from http://marakana.com/forums/android/examples/108.html This is the service: package totalcross.appqiri; ... public class TCService extends Service { public IBinder onBind(Intent intent) { return null; } public void onStart(Intent intent, int startId) { super.onStart(intent, startId); } public void onCreate() { super.onCreate(); } public int onStartCommand(Intent intent, int flags, int startId) { return START_STICKY; } public void onDestroy() { super.onDestroy(); } } This is part of the manifest.xml: application android:icon=@drawable/icon android:label=TotalCross Virtual Machine android:theme=@android:style/Theme.Black.NoTitleBar activity android:name=.Loader android:label=Loading application... android:configChanges=keyboardHidden|orientation|screenLayout| fontScale|keyboard android:windowSoftInputMode=adjustResize / activity android:name=.WebViewer / activity android:name=.CameraViewer / activity android:name=.MapViewer / uses-library android:name=com.google.android.maps android:required=false / service android:name=.TCService android:exported=true / /application This is the startup intent that receives the BOOT_COMPLETED: public class StartupIntentReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { try { AndroidUtils.debug(*** 1); Class cc = Class.forName(totalcross.appqiri.TCService); AndroidUtils.debug(*** 2); Object o = cc.newInstance(); AndroidUtils.debug(*** 3: +o); AndroidUtils.debug(*** 4: +context.getPackageName()); Intent i = new Intent(context, cc); AndroidUtils.debug(*** 5: +i); Object ret = context.startService(i); AndroidUtils.debug(*** 6: +ret); } catch (Throwable e) { AndroidUtils.handleException(e, false); } } } And, finally, this is the output: ActivityManager: Start proc totalcross.appqiri for broadcast totalcross.appqiri/.StartupIntentReceiver: TotalCross: *** 3: totalcross.appqiri.TCService@404edb18 TotalCross: *** 4: totalcross.appqiri TotalCross: *** 5: Intent { cmp=totalcross.appqiri/.TCService } ActivityManager: Unable to start service Intent { cmp=totalcross.appqiri/.TCService }: not found As you can see: 1. The service is inside application in the xml 2. The context' package is the same of the service (line ***3 and ***4) 3. I can load the service using introspection However, the service cannot be found. any help is greatly appreciated. thanks guich -- 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] is an intent launched by a service also a service?
Hi, I have a service that is called at boot time. This service then calls an intent this way: Intent myStarterIntent = new Intent(getApplicationContext(), Loader.class); myStarterIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); getApplicationContext().startActivity(myStarterIntent); Is the Loader class also running as a service? I'm not sure about the concepts. thanks guich -- 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: is an intent launched by a service also a service?
Ahm The Loader is indeed an activity. What i want to know is if the new activity is handled by the OS as a part of the calling service, or is it handled as a completely new application as if was clicked by the user. The reason of the question is to know if the intent will still be running while the service is running. 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] bring an activity to the front
Hi, I feel sometimes that i'm reinventing the wheel. I have service that shows a window when it starts, and then minimizes itself with the following code: Intent i = new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_HOME); loader.startActivity(i); The service wakes itself at some time later, when it receives something from socket. How can i bring it back to the top and show to the user? thanks guich -- 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: bring an activity to the front
Hi, The intent is the same. :-( I can't just relaunch it because its already running. thanks guich -- 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 detect that the input manager animation has finished?
Hi, When i call InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(getWindowToken(), 0); , the system closes the input panel using an animation. Is there any ways to detect that the closing animation has finished? thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to detect that the input manager animation has finished?
Answering my own question: class SipClosedReceiver extends ResultReceiver { public SipClosedReceiver() { super(null); } public void onReceiveResult(int resultCode, Bundle resultData) { // closed! } } SipClosedReceiver siprecv = new SipClosedReceiver(); imm.hideSoftInputFromWindow(instance.getWindowToken(), 0, instance.siprecv); -- 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] starting a service after installation
Hi, How can i start a service at the first time that the service apk was installed, without user intervention? thanks guich -- 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] what is faster? surfaceview or imageview?
Hi, I need to do frequent updates of a dynamically changed bitmap. What is faster? SurfaceView/SurfaceHolder.lockCanvas or ImageView/ setImageBitmap? thanks guich -- 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: creating a window-close animation effect
Hi, Thanks for the reply. My whole problem is that my application is not a standard one. I don't use xml files; i create all the user interface (which is quite small) by hand. I already tried many things, but no animation is done at all. All i see is the new view appearing at once at the screen. So, i have a current view with a bitmap, then i update the bitmap natively, then i want to show the new bitmap appearing at the top of the other one. thanks guich -- 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: creating a window-close animation effect
Hi Mark, Unfortunately, that's not an option. I don't create programs for Android, i create a virtual machine that runs side by side with Dalvik. All i need from Android is to start the program, handle pen and keyboard events, and show the contents drawn by my VM on the screen. Too bad that this can't be done fully in native mode, like in iOS, Windows Mobile and (dead) Palm OS. Anyway, i got some evolution by calling the runOnUiThread method. I can start the animation, i can see it has stopped, but nothing happens on screen. I'm pretty sure its because of my very small knowledge about the Android UI stuff (as i said, i use very few of the UI). This is the situation: 1. I have a SurfaceView that calls a native code that draws on a bitmap. The native code then asks the screen to be repainted. 2. Sometimes, the native code may ask to paint it with some effects, like a transition between screens. So, it fills the offscreen bitmap and asks dalvik to show it on screen with some effect. I searched the net to find if there's a way to let a bitmap be applied over another bitmap with animation, but found nothing. So, i realized that a view can be shown on the top of another view with animation. The idea is to write to the offscreen bitmap, create an ImageView, draw the bitmap on it, and apply the animation transition from the SurfaceView to the ImageView. So, I tried this code: 1 if (iview == null) 2iview = new ImageView(instance.getContext()); 3 iview.setImageBitmap(sScreenBitmap); 4 ScaleAnimation anim = trans == TRANSITION_CLOSE ? new ScaleAnimation(1f,1f,0f,0f) : new ScaleAnimation(0f,0f,1f,1f); 5 anim.setDuration(2000); 6 anim.setAnimationListener(this); 7 iview.setVisibility(ImageView.VISIBLE); 8 instance.startAnimation(anim); I already tried iview.startAnimation, but nothing occurs visually. Any help is appreciated. thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating a window-close animation effect
Thanks, Justin, it worked: ViewGroup vg = (ViewGroup)iview.getParent(); vg.removeView(iview); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating a window-close animation effect
I got one of the animations working: the old view is visible, then a new view grows from center to the border. However, in the opposite situation, i'm unable to get the desired results: i want that the old view be shrinking while the new view appears. Not sure if i was understood: is like if the new view is behind the old view, which shrinks from the border to center. What happens is that the old view appears on the top of the new view, instead of the desired situation, where the new view is behind the old view. Any thoughts? 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] creating a window-close animation effect
Hi all, Can someone give me an insight (or maybe a code sample :-)) to show a windows closing on the top of another one? I mean, an animation where the new window will be shown from out to the center. thanks guich -- 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: creating a window-close animation effect
Just a side note: i saw some code that does this for Views, but i need to do it with a Bitmap over a Surface. 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: creating a window-close animation effect
I'm still searching. I found that with the ScaleAnimator i can achieve what i need, but still trying with no success. This is the code i'm using: ScaleAnimation anim=new ScaleAnimation(1,1,0,0); anim.setFillAfter(true); anim.setFillEnabled(true); anim.setInterpolator(new android.view.animation.AccelerateInterpolator()); anim.setDuration(1000L); This is the ImageView i'm creating to store the new image. This image is updated by a native function. ImageView image = new ImageView(instance.getContext()); image.setImageBitmap(sScreenBitmap); image.setVisibility(ImageView.VISIBLE); image.startAnimation(anim); This is called from another view. However, nothing happens on screen. TIA. -- 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] resintalling application due to data corruption
Hi, Some users are having a very serious problem with some android devices (motorola, samsung): after running the application for several hours, some data files are being corrupted by the OS. The most strangest thing is that these files are opened using fopen(.., rb), thus, in read-only mode. They are never written from our code. I can easily detect that the corruption occured when the program starts. I was thinking, in this case, to call the installer again. I know that the installer are stored at /data/app/*.apk. Is it possible to call the installer from the application in a non-rooted android device or is this blocked? thanks guich -- 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: resintalling application due to data corruption
Its in the /data/data/app folder -- 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 a service have an ui?
Hi, Can an unbound service have also an user interface? I was thinking in the implementation of a message receiver. The service would start minimized, and keep checking for a message, and when it appears, it would maximize the application and show the message, then minimize again. thanks in advance, guich -- 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] officially supporting dual-sims
Hi, There are lots of dual-sims phones being dropped at the market and Android has no official support for them. Will this be added in the near future to the android api? Or will we go back one decade for the Windows CE nightmare of each manufacturer implementing their own hack on the OS? thanks guich -- 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: deletable-assets
Is there any kind of notification that is sent when a program is installed? I could get a notification that my program was installed or updated and then save this date/time to use later. 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] deletable-assets
Hi, I store some zipped data in the assets. When my app runs at the first time, i unpack the zip. The original zip in the assets folder is useless, however, we cannot delete it. Is there another way to pack files into an apk that we can later delete after using it? thanks guich -- 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: deletable-assets
On a side note, is it possible to get the creation data and time of the asset 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] Re: problems when creating files in android
mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) -- 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] problems when creating files in android
Hi, In native code when we create a file, it creates it with 666 permissions (rw * 3). In Java, it creates with 600. Is there a way in Java to specify the permissions when creating the file? Or maybe change it afterwards? I have the same problem for folders. thanks guich -- 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 when creating files in android
Hi, Do you know if its possible to call a native mkdir from java without having to write a native code? thanks guich -- 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] supporting 16M colors
Hi, We can see many new Android devices with 16M colors. The most used color depth when drawing on offscreen bitmaps is 16bpp, which results in 64K colors. Is there a way to take benefit of all 16M capable colors of these devices? In iOS i create a 32bpp bitmap and the results are far better than if i created a 16bpp bitmap. I tried to do the same on Android, creating a Bitmap.Config.ARGB_, but the results are the same of creating a RGB_565. Thanks for your thoughts. guich -- 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] getPixelFormat returning an incorrect value
HI, I'm running this: WindowManager wm = (WindowManager)instance.getContext().getSystemService(Context.WINDOW_SERVICE); AndroidUtils.debug(format: +wm.getDefaultDisplay().getPixelFormat()); ... on a Galaxy Tab 7, and it outputs: format: 5 However, the value 5 has no correspondence in the PixelFormat table. What does this value represents? thanks guich -- 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: display.getWidth bug fixed in android 3.2
Hi, Thanks If this can be added in Android 3.3 (or 3.4), that would be wonderful. Yes, i just need the biggest dimension (in pixels) of the whole screen, no matter if there's a task bar or not. Happy Christmas, Guich. -- 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: display.getWidth bug fixed in android 3.2
Hi, One more thing. Can someone kindly tell us, in this thread, once the method is added, or at least, in which version? This way i can change my code to stop doing the rotation. cheers guich -- 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] accessing sdcard in android 3.2
Hi, We have Toshiba Thrive and a Galaxy Tab 7Plus that were working fine until they upgrated to 3.2. Now, its impossible to write anything in the microsd folder (/sdcard/extStorages/SdCard). I can read the things in the card, but can't write to it: access denied. Is there a new limitation? thanks guich -- 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: accessing sdcard in android 3.2
Hi, Yes, i do. The program was working fine until the unit upgraded itself to version 3.2. Then, writting to the card stopped working. 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: display.getWidth bug fixed in android 3.2
Hi Dianne, Lemme explain my problem. All my application is drawn in an offscreen bitmap. When the application starts, i get the maximum width/height of the screen and create a square bitmap. This way, when screen rotates, i don't have to create another bitmap. This prevents some crashes in my application. I'm aware of the bug fix, i saw your comments in another thread. What i'm asking is if Google can create a way to retrieve the size with something like this: public Size getSizeOfScreenIncludingTaskbarArea() or public Size getSizeOfScreenForOrientation(int orientation) // VERTICAL or HORIZONTAL This would help a lot. thanks for your time. Guich -- 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: accessing sdcard in android 3.2
Hi, Yes, i found this: http://www.thriveforums.org/forum/toshiba-thrive-general-discussions/4967-problems-after-latest-os-upgrade.html Not sure if this is a problem in the device or in Android 3.2 itself... thanks guich -- 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: accessing sdcard in android 3.2
Seems to be really an Android problem, because the same error occurs on both Toshiba Thrive AND Samsung Galaxy Tab7+, *** AFTER UPGRADING THE FIRMWARE TO ANDROID 3.2 ***. Both devices using Android 3.1 works perfectly. -- 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] display.getWidth bug fixed in android 3.2
Hi, There's a change in Android 3.2 that made the following code stop to work as expected: WindowManager wm = (WindowManager)instance.getContext().getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); int screenHeight = display.getHeight(); Prior to 3.2, the width/height informed included the task bar. Then, in 3.2, it EXCLUDES THE TASKBAR. Its mandatory for my application to know in advance the value of the screen WITHOUT THE TASKBAR. May i ask PLEASE to Android developers to add an API in a future version of Android to get the size as before? Currently, i have to check if its android 3.2 and force a screen rotation, get the size in both directions, then cache this value. Thanks guich -- 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: going back and forth from FullScreen
This fixes the problem: http://stackoverflow.com/questions/991764/hiding-title-in-a-fullscreen-mode guich -- 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] going back and forth from FullScreen
Hi, I have an application that sets fullscreen with getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); ... right before the view is created. Works fine. However, i would like to bypass an Android BUG that prevents a screen change being sent when the IMM opens and its in full screen. For this, my idea was to 1. disable full screen 2. show the IMM 3. hide the IMM 4. re-enable full screen Steps 1-3 works fine, but re-enabling full screen does not work (the taskbar is still there). Is this another bug or is it an expected behaviou? How can i force the fullscreen to be applied? thanks guich -- 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: showing the default A icon on google maps
Too bad that onDraw of MapView is final. Why is adding a position so dificult? We ask to move to a coordinate, it would be useful to just pass a name and show that name on the map, without having to deal with overlays and so on. I'm still stumped. :-( guich -- 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: windowSoftInputMode=adjustResize not working on landscape or full screen
The landscape issue was fixed on Android 3.0, but the full screen's NOT. guich -- 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] showing the default A icon on google maps
Hi, I would like to know how can i place the default (A) baloon icon that Google Maps has at the point i asked it to open. I don't need custom icons, neither a custom text, just an icon or something showing the center of the screen. My code is this one. I saw some things about ItemizedOverlay but its proving to be just too complex. public class MapViewer extends MapActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setup the viewe MapView mapview = new MapView(this,...); mapview.setBuiltInZoomControls(true); mapview.setClickable(true); mapview.setStreetView(true); setContentView(mapview); if (Loader.isFullScreen) getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); // get passed parameters Bundle extras = getIntent().getExtras(); double lat = extras.getDouble(lat); double lon = extras.getDouble(lon); mapview.setSatellite(extras.getBoolean(sat)); int ilat = (int)(lat * 1e6); int ilon = (int)(lon * 1e6); // move the map to the given point MapController mc = mapview.getController(); if (ilat != 0 || ilon != 0) mc.setCenter(new GeoPoint(ilat,ilon)); mc.setZoom(21); } protected boolean isRouteDisplayed() { return false; } } thanks guich -- 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: windowSoftInputMode=adjustResize not working on landscape or full screen
This bug was added in 2009 in the Android bug report system! It was first noticied in Android 1.5 and also occurs in 3.1. Seems that Google guys don't consider this a bug. http://code.google.com/p/android/issues/detail?id=5497q=windowSoftInputModecolspec=ID%20Type%20Status%20Owner%20Summary%20Stars The argument that the notification should not be sent in FULL SCREEN mode is not fair. If i'm a programmer that created an application that is in full screen, its obvious that i would not add such flag to the manifest. It would be nice to see this fixed in a version. guich -- 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] adjustPan notifications
Hi, Is there any kind of notification that's sent when using adjustPan in the windowSoftInputMode attribute? I want to know how much the screen was panned. TIA guich -- 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: Android + SQLite - Brazilian student
Ola, Porque voce nao experimenta o TotalCross? www.totalcross.com.br abraços, Guilherme On 8 set, 21:21, Andrews andyyc...@gmail.com wrote: hi i am a student from Brazil and I am studying android. I would ask if you could share a material on Android and sqlite (CRUD). Thank you all -- 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] Finding if the Soft Input Method is visible
Hi, Is there a way to know if the SIM is visible or not? I'm using the android:windowSoftInputMode=adjustResize in the manifest, but i can't find anything that tells me if the window is being resized if the SIM is being shown. Of course, i do see the height going from 455 to 231, but how can i know if this was caused by the SIM appearing or a screen rotation? thanks guich -- 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] windowSoftInputMode=adjustResize not working on landscape or full screen
Hi, surfaceChanged method is not called if the application is in full screen or in landscape. In portrait, i see the method being called. Is this a bug in Android or what? thanks guich -- 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] uses-feature android:name=android.hardware.camera blocking device
Hi, I have a FOSTON device that does not have camera. When i install my application on it, it says FAILURE: MISSING FEATURE. Is there a way to use the camera without adding uses-feature? Why can't we use a uses-permission instead? This way, the program could be installed on device and disable itself the camera part. thanks guich -- 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 MapView to display wallstreet
I found a good starting point (based on as suggested by TreKing) here: http://groups.google.com/group/android-developers/browse_thread/thread/a41394bdccf43ef8/8a37fbc16fd3d674#8a37fbc16fd3d674 guich -- 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 MapView to display wallstreet
Hi, Sorry, i just gave an example of what i need. Based on the sample that someone provides, i can change it to meet the needs. Actually, i want to search for a location in any street, i just gave the example of Wall street to make easier for one to provide a sample. :-) cheers guich -- 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] using MapView to display wallstreet
Hi, I'm searching already for a couple of hours and was unable to find a simple sample that shows how to open MapView with an address, like, the bull at wallstreet. I know i have to use location.Address class, but it has several parameters and i just don't know set them. Can someone provide me a sample that open a MapView and shows the bull at wallstreet location? Or even just how o get the bull (wallstreet, new york, usa) coordinates. many thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to detect an invalid pin was given by the user when connecting to bluetooth
seems that the bluetooth api is still in early development stage... or, at least, not well documented. guich -- 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 detect an invalid pin was given by the user when connecting to bluetooth
Hi, I'm implementing bluetooth support for my application. When i try to connect to the device, Android shows me the dialog that asks for the pin. Now i have two questions: 1. How to detect that the dialog was closed? The user could press cancel, and i need to detect this 2. How to detect that the password was wrong? I realized during the tests that if the user enters a wrong password, i receive an IOException with unable to find services (or something like this). If the pin is correct, this exception is not thrown. Isn't there a better way? Also, even if a wrong password is given, the device is added to the BONDED list, and can be retrieved with the BluetoothAdapter.getBondedDevices. I'm using an Android 2.2.1 device and a Zebra printer with bluetooth 2.0 specification. Any help is appreciated, guich -- 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] Connecting to a Zebra MZ 320 over bluetooth - without PIN
Hi, I'm trying to connect an Android with such printer. The printer has this information retrieved by BluetoothClass: Class: 1664/1536: Render What (BluetoothClass.Service.)Render means? Is there a specific UUID for it? I tried to connect to the device using the well known SPP UUID, however, Android keeps asking me for a PIN. The printer, with BT 2.0, has authentication mode turned off. I read in some places that Android requires a PIN to pair with a device. I tried and 1234 as suggested by the pairing dialog but the connection fails. Isn't really a way to pair without setting a PIN? Otherwise, i'll have to connect all 300 printers to a pc just to set a PIN so Android can connect to it. thanks in advance, guich www.totalcross.com -- 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: Connecting to a Zebra MZ 320 over bluetooth - without PIN
I was able to print by changing the printer to have a PIN. However, doing this in 300 devices will be a headache. :-( guich -- 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: Strange effects on Android's truetype decoder
Anyone knows if there's a OS version that respects this flag? I really don't want to rewrite my entire code in C#. :-( thanks guich -- 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: Strange effects on Android's truetype decoder
Hi David, Is there a way to turn this off? I mean, disable the hint in vertical direction (i don't understand well what hinted is but i know its effects. :-D) thanks guich Ps jgs: rect.height returns the same result. -- 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: Strange effects on Android's truetype decoder
Hi, Doing paint.setFlags(Paint.ANTI_ALIAS_FLAG | Paint.LINEAR_TEXT_FLAG); Results in the same behaviour. Would this work in any known OS version? thanks guich -- 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] Strange effects on Android's truetype decoder
Hi, If you call Paint.setTextSize and set it to a wide range, like 7 to 40, you will note that the transition is not smooth. Sometimes it repeats the same height. The code below illustrates what i mean (testing on an emulator for android 2.2): Paint paint = new Paint(); paint.setAntiAlias(antialiased); paint.setTypeface(Typeface.SERIF); paint.setColor(Color.BLACK); Rect r = new Rect(); for (int i = 7; i 40; i++) { paint.setTextSize(i); paint.getTextBounds(Ãg_,0,3,r); maxH = (int)(Math.abs(paint.descent()) + Math.abs(paint.ascent())); int realH = Math.abs(r.top - r.bottom); println(size: +i+, height: +maxH+, realH: +realH); } And the output is: size: 7, height: 8, realH: 9 size: 8, height: 9, realH: 10 size: 9, height: 10, realH: 10 size: 10, height: 11, realH: 13 size: 11, height: 12, realH: 13 size: 12, height: 13, realH: 15 size: 13, height: 15, realH: 15 size: 14, height: 16, realH: 17 size: 15, height: 17, realH: 17 size: 16, height: 18, realH: 19 size: 17, height: 19, realH: 19 size: 18, height: 20, realH: 20 size: 19, height: 22, realH: 23 size: 20, height: 23, realH: 23 size: 21, height: 24, realH: 26 size: 22, height: 25, realH: 26 size: 23, height: 26, realH: 28 size: 24, height: 27, realH: 28 size: 25, height: 29, realH: 29 size: 26, height: 30, realH: 29 size: 27, height: 31, realH: 32 size: 28, height: 32, realH: 32 size: 29, height: 33, realH: 33 size: 30, height: 34, realH: 35 size: 31, height: 36, realH: 35 size: 32, height: 37, realH: 38 size: 33, height: 38, realH: 38 size: 34, height: 39, realH: 40 size: 35, height: 40, realH: 40 size: 36, height: 41, realH: 42 size: 37, height: 43, realH: 42 size: 38, height: 44, realH: 44 size: 39, height: 45, realH: 44 Am I missing something? Why the gaps between the font sizes and the heights? For example, size=30-31 has size 34-36. How can i achieve height 35? Even if i use a smaller increment for i, like 0.1 or 0.01, i don't actually get a smooth scale for the font. thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to find available services in a bluetooth connected device
This thread answers the question: http://groups.google.com/group/android-developers/browse_thread/thread/bc36724593613382/312a1805eb4f2721?lnk=gstq=bluetooth+service#312a1805eb4f2721 Basically, Android does not provide such thing. guich -- 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 find available services in a bluetooth connected device
Hi, I'm trying to establish a connection between an Android device and a cell phone (this is my first test, in the real world, i'll be connecting to any device, like a printer). I was already able to discover the device, and now i'm trying to connect to it. However, i didn't find in the android API a way to retrieve the services available and their UUIDs, so i can communicate to each one separately. Is there a way to do this on Android? Just as a simple test i tried to use the SPP UUID but it failed to connect (yes, all devices have bt on and are discoverable). Any help is appreciated regards guich -- 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] TIP: An approach for creating backward-compatible classes
Hi, I'm implementing Bluetooth support on my application, which is compatible with Android 1.6 (and must remain since in Brazil we still have those devices running out). By reading this article: http://developer.android.com/resources/articles/backward-compatibility.html I found an easy way that allow you to create classes that can be used in new and old devices. The idea is the creation of a DUMB class, that would work in devices that are not compatible, and an IMPLementation class that extends the DUMB class and would work on devices that are compatible. So, this is the dumb class: public class Level5 { public static Level5 instance = android.os.Build.VERSION.SDK_INT = 5 ? new Level5Impl() : new Level5(); public boolean btIsSupported() { return false; } } And here the implementation class: public class Level5Impl extends Level5 { public boolean btIsSupported() { bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); return bluetoothAdapter != null; } } Then, you can call: Level5.instance.btIsSupported(); All public fields that are used inside Level5Impl must be declared inside Level5, and all public methods must be declared in Level5 too, so they are overriden in Level5Impl. Hope this helps, Guilherme C. Hazan (guich) www.totalcross.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] android:required failing when building for api level 4
Hi, I'm trying to install my application on a Archos 43 internet tablet. It failed with a INSTALL_FAILED_MISSING_FEATURE error. Searching in the forums, i saw a topic saying that we would have to change the uses-feature setting the required to false. When i put this line: uses-feature android:name=android.hardware.camera android:required=false / and compile, i get this error: error: No resource identifier found for attribute 'required' in package 'android' Any help is appreciated thanks guich Ps: [setup] Android SDK Tools Revision 10 [setup] Project Target: Android 1.6 [setup] API level: 4 -- 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] who draws the Button's border and background?
Hi, Who exactly draws the Button's border and background? I saw that Button extends TextView, but this class has 8500 lines. I would like to understand the algorithms used to draw the border and the dithered gradient background. thanks guich -- 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] getting InputMethod bounds
Hi, Simple question: is it possible to find the InputMethod bounds? thanks guich -- 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] black camera jpeg on Defy
Hi, I have a code that works fine in all Android devices i tested (over 10), but fails on a Defy. The resulting jpeg file is just a set of black pixels (all image is black). Here's a piece of code: pre class Preview extends SurfaceView implements SurfaceHolder.Callback { Preview(Context context) { super(context); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. holder = getHolder(); holder.addCallback(this); holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } // Called once the holder is ready public void surfaceCreated(SurfaceHolder holder) { startPreview(); } // Called when the holder is destroyed public void surfaceDestroyed(SurfaceHolder holder) { stopPreview(); } // Called when holder has changed public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { if (camera != null) { Camera.Parameters parameters=camera.getParameters(); parameters.setPictureFormat(PixelFormat.JPEG); camera.setParameters(parameters); camera.startPreview(); } } } private void startPreview() { if (camera == null) try { // The Surface has been created, acquire the camera and tell it where to draw. camera = Camera.open(); camera.setPreviewDisplay(holder); } catch (Exception e) { AndroidUtils.handleException(e,false); } } private void stopPreview() { if (camera != null) { try {camera.stopPreview();} catch (Exception e) {} try {camera.release();} catch (Exception e) {} camera = null; } } public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); preview = new Preview(this); ((FrameLayout) findViewById(R.id.preview)).addView(preview); final Button buttonClick = (Button) findViewById(R.id.buttonClick); buttonClick.setOnClickListener(new OnClickListener() { public void onClick(View v) { try { camera.takePicture(null, null, jpegCallback); } catch (Exception e) { AndroidUtils.handleException(e,false); stopPreview(); setResult(RESULT_CANCELED); finish(); } } }); // Handles data for jpeg picture PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { try { FileOutputStream outStream = new FileOutputStream(fileName); outStream.write(data); outStream.close(); setResult(RESULT_OK); finish(); } catch (Exception e) { AndroidUtils.handleException(e,false); } } }; /pre I checked the adb logcat output but no errors were displayed. Also, i checked if the onPictureTaken was called more than once, but it was not (only one call). Any help is appreciated. TIA guich www.totalcross.com -- 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: black camera jpeg on Defy
Just a feedback on this. I made a factory-reset of the device and then the first photo i took appeared correctly. After this first photo, all other photos appears black 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: how to obtain the default font size
Its really a shame that this can't be done. I never found a solution, in any other threads. Boy, i miss Windows Mobile, with their SystemMetrics api. guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to obtain the default font size
Pepijn, Many thanks. That simple line solved the issue. Got the following results: Htc Magic: 14 Motorola Spice: 11 Motorola Milestone: 21 So, from this i can achieve the results i need. All the best guich -- 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