[android-developers] Re: Outgoing call states
Any ideas? On 24 Грд, 15:14, viktor victor.scherb...@gmail.com wrote: Yes :), but I wrote what I catch. On 24 Грд, 14:33, Pent tas...@dinglisch.net wrote: Hi, Is it any additional listeners to listen call state such as BUSY, NO_ANSWER, I just have only CALL_STATE_IDLE, CALL_STATE_OFFHOOK? There's RINGING too :-) Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 do use WebView load html?
I want use webView load html.however, shows only the screen size of the html, and other areas not show, a user can't drag it to other areas -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 exit the application..?
Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Do GPS_EVENT_SATELLITE_STATUS and GPS_STATUS_SESSION_BEGIN have any relationship?
In AP level, I try to use gpsListener = new GpsStatus.Listener() to get event from android jni. and expect to get event - GPS_EVENT_SATELLITE_STATUS to update the gps status. In HAL level, I try to set GPS_STATUS_SESSION_BEGIN to alert AP to update gps status by callback function. It can't be workable. Do they have any relationship or I need to implement by another way? Here is the solution that I can let AP level read nmea, but not gps status. http://nelsonchunglife.blogspot.com/2010/12/android-gps-porting-hal-code-try-to-fix.html Very appreciate for any comments. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] How to exit the application..?
Call finish() on an activity you would like to, well, finish. 27.12.2010 11:40, Abhilash baddam пишет: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] HeadStart Ventures:Expert Talk Series1 on Mobile Video and Side Loading
Dear All, Headstart Ventures (www.headstartventures.in) is excited to launch Expert Talk Series with the intent to create a platform for exchange between Industry experts and startups working on innovative products/ services in the domain relevant and of interest to the associated large corporate helping startups leverage the knowledge from the experts and also understand the dynamism of the specific domain. The Expert Talks will be scheduled once every month.These would be intensive four hour sessions with two hours of presentations by experts and startups followed by a two hour domain specific open innovation discussion answering the questions from the startups, advising on technical and commercial viability and feedback to the startups helping in validation. The Headstart Ventures::Expert Talk Series-1 is in consultation with Alcatel-Lucent Bell Labs Theme: Mobile Video and Side Loading Speaker: Dr. Sharad Jaiswal, Member of Technical Staff, Alcatel-Lucent Bell Labs, PhD(Computer Science)-University of Massachusetts, M.S. (Computer Science) Boston University Date: 22nd January, 2011 Timings: 2pm – 6pm Venue: Alcatel-Lucent Office, Bangalore Eligibility: Startups working in the domain relevant to the theme of the talk To apply for the Expert Talk Series submit your Business Proposal here: https://www.younoodle.com/c/headstartventures/er/headstartventures/submit selecting “Expert Talk-Alcatel Lucent” as the track by 10th January, 2011. For further details contact Raman Shrivastava at ra...@headstart.org.in or +91 9008710682 Best Regards, Headstart Ventures’ Team -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 exit the application..?
You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: How to exit the application..?
Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Launch Activity with Intent Filter on Right Time
Hi. I want to launch my own media player application when I want to watch a video from Youtube. When I write android:scheme=http and android:host=m.youtube.com it is OK. But, it asks everywhere in m.youtube.com to open my app. So, it gets annoying. I tried to use pathPattern, pathPrefix and path to solve this but I didn't get ahead. All I want is clearly this: * When the link is like http://m.youtube.com/index?desktop_uri=%2F %gl=US# the intent filter shouldn't launch my app. * When the link is like http://m.youtube.com/index?desktop_uri= %2Fgl=US#/watch?xl=xl_blazerv=k3Cdqx1qFX8 my application should be launched. Is there anyone that can 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] store string array in database
Hi, I have a String array (which contains some day from Monday - Sunday). But which days are stored is decided at runtime means sometime it want to store all day or sometime 1 or none. Now I want to store this array in database. How to save array of string in database? Or should I create 7 columns in that table? 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] openGL problem
Hi at all, I have a terrible issues with texure sphere mapping. This is my code: public void onSurfaceCreated(GL10 gl10, EGLConfig config) { GL11 gl = (GL11) gl10; gl.glDisable(GL10.GL_DEPTH_TEST); //Disable Depth Testing gl.glEnable(GL11.GL_TEXTURE_2D); gl.glEnable(GL11.GL_CULL_FACE); gl.glCullFace(GL11.GL_FRONT); gl.glFrontFace(GL11.GL_CCW); sphere.loadGLTexture(gl10, context); } public void onDrawFrame(GL10 gl10) { GL11ExtensionPack gl= (GL11ExtensionPack) gl10; gl10.glMatrixMode(GL10.GL_PROJECTION); gl10.glLoadIdentity(); gl10.glFrustumf(-5.0f, 5.0f, -5.0f, 5.0f, 1.0f, 100.0f); //Mio gl10.glMatrixMode(GL10.GL_MODELVIEW); gl10.glLoadIdentity(); GLU.gluLookAt(gl10, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -10.0f, 0.0f, 1.0f, 0.0f); sphere.draw(gl10); } public void onSurfaceChanged(GL10 gl, int width_, int height_) { gl.glViewport(0, 0, width, height); } public void draw(GL10 gl10) { GL11ExtensionPack gl = (GL11ExtensionPack) gl10; GL11 gl11 = (GL11) gl10; gl.glBindTexture(GL10.GL_TEXTURE_2D, textures_ids.get(0)); gl10.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, totalVertexCount); } public void loadGLTexture(GL10 gl10, Context context) { GL11 gl = (GL11) gl10; gl.glGenTextures(2, textures_ids); gl.glBindTexture(GL10.GL_TEXTURE_2D, textures_ids.get(0)); gl.glTexParameteri(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR); gl.glTexParameteri(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST); 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 ); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, this.image, 0); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glVertexPointer(3, GL11.GL_FLOAT, 0, vertexBuffer); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0,textureBuffer); } The vertexbuffer contains a points for a sphere and the texturebuffer contains the normals for that, I meet an horrible result and I don't understand what's wrong... This is the result img: I am working with android OpenGL ES but I think error isn't correlated with my platform but is correlated with my use of OpenGL API, I am a newbye with this library. Thanks so much in advance. pedr0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 problem
This a link of my issues -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 problem
img198(dot)imageshack(dot)us/img198/6370/failfs.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
Re: [android-developers] Re: How to exit the application..?
any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: AES in Gingerbread
I wonder if you realize that sr.setSeed(seed) does *NOT*, repeat *NOT* set a SecureRandom to produce a predictable series of values? Not only would that no longer be secure, it's not what setSeed() does for a SecureRandom. Instead, it supplements the existing seed (which is beyond your control when created as below). You'd have to supply the seed in the constructor. And if you are expecting SecureRandom to produce the same series of values (as seen by KeyGenerator), or KeyGenerator to produce the same key, between two versions of the OS, you're relying on something which is not documented. Reproducability is just not part of their job. I strongly suspect (and fear) that you're screwed, and your users are likely screwed as well. Sorry to deliver bad news. If you like, post more about what you're doing and maybe we can help you figure out the way forward. On Dec 10, 11:30 am, Steve Hugg hun...@fasterlight.com wrote: More debugging on this issue... I am using this method to generate keys from a passphrase: KeyGenerator kgen = KeyGenerator.getInstance(AES, BC); SecureRandom sr = SecureRandom.getInstance(SHA1PRNG, Crypto); sr.setSeed(seed); kgen.init(128, sr); SecretKey skey = kgen.generateKey(); byte[] raw = skey.getEncoded(); This results in a different key for a given passphrase on 2.3 than it does on 1.5-2.2. Froyo returns this information for KeyGenerator and SecureRandom objects: AES BC version 1.34 SHA1PRNG Crypto version 1.0 Gingerbread returns: AES BC version 1.45 SHA1PRNG Crypto version 1.0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] How to exit the application..?
On Mon, Dec 27, 2010 at 3:40 AM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? You don't, any more than clicking a button in a Web browser should crash the browser, just because you do not want your pages to be seen anymore. http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon/2034238#2034238 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Launch Activity with Intent Filter on Right Time
That is not possible. The path in both cases are identical. The ? and stuff to the right is not part of the path. On Mon, Dec 27, 2010 at 4:55 AM, sjor sleche...@gmail.com wrote: Hi. I want to launch my own media player application when I want to watch a video from Youtube. When I write android:scheme=http and android:host=m.youtube.com it is OK. But, it asks everywhere in m.youtube.com to open my app. So, it gets annoying. I tried to use pathPattern, pathPrefix and path to solve this but I didn't get ahead. All I want is clearly this: * When the link is like http://m.youtube.com/index?desktop_uri=%2F %gl=US# the intent filter shouldn't launch my app. * When the link is like http://m.youtube.com/index?desktop_uri= %2Fgl=US#/watch?xl=xl_blazerv=k3Cdqx1qFX8 my application should be launched. Is there anyone that can help me? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cannot compile Desk Alarm Clock (branch eclair ver 2.1)
Indeed. This is called eating your own dogfood, and it's a highly valuable part of creating a high-quality product. If there's ANY reason this would inconvenience the developers, than that's a red flag that there's something that needs to be addressed -- whether it's the build/release system or inadequacies in the API, or things which aren't public which should be public (perhaps after some improvements are made and stability achieved). I'd strongly recommend a goal that anything and everything that possibly could be, be buildable with the SDK using public APIs and tools. Even the privileged stuff (which might fail at runtime with a security exception if not signed with the proper key for the platform -- but should still be buildable separately if the appropriate key is available). I suspect this would even end up making life easier for the developers of those apps. On Dec 26, 10:08 pm, Zsolt Vasvari zvasv...@gmail.com wrote: I completely realize that it's possible to do well with the SDK, but I still believe that the top layer apps should be built with the SDK if possible. Does the calculator compile with the SDK? On Dec 27, 11:39 am, Robert rcope...@gmail.com wrote: Check out Alarm Clock Xtreme by Irene Duke. http://alarmclockxtreme.blogspot.com/ It is possible to do and do well with the SDK. On Dec 26, 7:32 pm, Zsolt Vasvari zvasv...@gmail.com wrote: I do understand where you are coming from, though. It would be ideal that top-layer apps, especially simple ones like an alarm clock, should be buildable with the public SDK. After all, how can you create a like replacement if you don't have access to the same APIs? On Dec 27, 5:26 am, longingtoadopt.com anil.r...@gmail.com wrote: Would prefer not to have to - since I am on Windows On Sunday, December 26, 2010 1:02:55 AM UTC-6, Zsolt Vasvari wrote: Correct, you cannot compile these modules with the SDK alone. You need to download the platform source and compile those. I don't know the details.- Hide quoted text - - Show quoted text -- 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
Re: [android-developers] store string array in database
Option #1: Use an INTEGER column and bit positions for the different days Option #2: Serialize the strings into a comma-separated list or similar structure and store the result in a TEXT column On Mon, Dec 27, 2010 at 5:38 AM, pramod.deore deore.pramo...@gmail.com wrote: Hi, I have a String array (which contains some day from Monday - Sunday). But which days are stored is decided at runtime means sometime it want to store all day or sometime 1 or none. Now I want to store this array in database. How to save array of string in database? Or should I create 7 columns in that table? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: How to exit the application..?
you have to call finish() whenever u want to exit. Thanks Manoj Kumar Maurya any help please... 2010/12/27 Abhilash baddam abhilash.androiddevelo...@gmail.com Hi viktor, What your saying is if i use finish(); method in my code, is i have to use android:launchMode=singleTask in manifest file right? 2010/12/27 viktor victor.scherb...@gmail.com You can set for every Activities android:launchMode=singleTask ; And if you go Home, you always restart an Activity with onCreate state. On 27 Грд, 10:40, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi , I am new to android. How can we exit from application...For example if we have 3 activities each activity consists one button..when we click on a button which may be from any activity, i want to exit from application and it should go home screen. again if we start the application from emulator it should start from the beginning of the application. How can we do this.? Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Getting the Android Java source?
On Sun, Dec 26, 2010 at 11:03 PM, John Lussmyer johnlussm...@gmail.com wrote: Is it possible to get just the source for the Android .jar files? I don't want the whole bleeding OS, just the source that will help me figure out what's going wrong in my code when I get weird exceptions. Like, right now, this line of code: Button btn = new Button( context); is throwing: [2010-12-26 19:50:35 - main.xml] Parser is not a BridgeXmlBlockParser! java.lang.NullPointerException at android.view.View.init(View.java:1845) at android.widget.TextView.init(TextView.java:326) at android.widget.Button.init(Button.java:69) at android.widget.Button.init(Button.java:65) at android.widget.Button.init(Button.java:61) I don't have the faintest idea WHY this exception is happening in Eclipse (not in the Emulator, but in the Eclipse Console window.) If you are getting this in Eclipse, then your problem is with Eclipse and the ADT plugin. BridgeXmlBlockParser is related to the layout preview/drag-and-drop stuff, near as I can tell via Google Code Search. If you have not done so already, restart Eclipse and see if that helps. Beyond that, particularly since I am not an Eclipse user, I have no particular advice. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
Thank you. So, Is there any other possible way to launch my application when I open a video on Youtube? On 27 Aralık, 13:39, Mark Murphy mmur...@commonsware.com wrote: That is not possible. The path in both cases are identical. The ? and stuff to the right is not part of the path. On Mon, Dec 27, 2010 at 4:55 AM, sjor sleche...@gmail.com wrote: Hi. I want to launch my own media player application when I want to watch a video from Youtube. When I write android:scheme=http and android:host=m.youtube.com it is OK. But, it asks everywhere in m.youtube.com to open my app. So, it gets annoying. I tried to use pathPattern, pathPrefix and path to solve this but I didn't get ahead. All I want is clearly this: * When the link is like http://m.youtube.com/index?desktop_uri=%2F %gl=US# the intent filter shouldn't launch my app. * When the link is like http://m.youtube.com/index?desktop_uri= %2Fgl=US#/watch?xl=xl_blazerv=k3Cdqx1qFX8 my application should be launched. Is there anyone that can help me? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: store string array in database
Thank you Sir. On Dec 27, 4:41 pm, Mark Murphy mmur...@commonsware.com wrote: Option #1: Use an INTEGER column and bit positions for the different days Option #2: Serialize the strings into a comma-separated list or similar structure and store the result in a TEXT column On Mon, Dec 27, 2010 at 5:38 AM, pramod.deore deore.pramo...@gmail.com wrote: Hi, I have a String array (which contains some day from Monday - Sunday). But which days are stored is decided at runtime means sometime it want to store all day or sometime 1 or none. Now I want to store this array in database. How to save array of string in database? Or should I create 7 columns in that table? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
On Mon, Dec 27, 2010 at 6:46 AM, sjor sleche...@gmail.com wrote: Thank you. So, Is there any other possible way to launch my application when I open a video on Youtube? If your app is the one that is in control at the time the user says I want to watch this video, you can start up your own activity yourself. However, I am assuming that your objective is that if the user encounters this magic video anywhere (e.g., while browsing) that your application gets control, and I know of no way to accomplish that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 store date and time in database
Be very, very, VERY careful about storing date and time information in a textual format. There are boundary conditions, timezone issues, leap-year issues, skipped-leap-year-issues, leap seconds, and finally, localization issues, which can all reach out and bite you in ways you may not consider. Generally, the best option is to not worry about all this, and (as Kostya rightly points out) use the system-provided utilities for interpreting dates (if you receive them as text), or work entirely with longs and never deal with text at all except when displaying to the user (with proper consideration of timezone and localization). Otherwise, you're taking on a considerable coding and testing burden AND a good deal of risk. The only downside is it makes examining stored date/time data much more difficult, but you can write a little calculator to do this. Java and Javascript date formats (and pretty much everybody else) use seconds since 00:00 January 1, 1970 UTC as their representation, so you can make yourself (or probably find pre-made) a little web page that converts them for you. On Dec 26, 11:06 pm, Kristopher Micinski krismicin...@gmail.com wrote: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deore deore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 store date and time in database
I do agree with this approach :-) On 27 Dic, 08:39, Kostya Vasilyev kmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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: How to store date and time in database
Thanks Bob and Federico. On Dec 27, 4:59 pm, Federico Paolinelli fedep...@gmail.com wrote: I do agree with this approach :-) On 27 Dic, 08:39, Kostya Vasilyev kmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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: Launch Activity with Intent Filter on Right Time
Yes, I want to launch my application while using browser. Is it exactly unpossible to make something for it? Can I use android:mimeType for example? for On 27 Aralık, 13:50, Mark Murphy mmur...@commonsware.com wrote: On Mon, Dec 27, 2010 at 6:46 AM, sjor sleche...@gmail.com wrote: Thank you. So, Is there any other possible way to launch my application when I open a video on Youtube? If your app is the one that is in control at the time the user says I want to watch this video, you can start up your own activity yourself. However, I am assuming that your objective is that if the user encounters this magic video anywhere (e.g., while browsing) that your application gets control, and I know of no way to accomplish that. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
On Mon, Dec 27, 2010 at 7:12 AM, sjor sleche...@gmail.com wrote: Yes, I want to launch my application while using browser. Is it exactly unpossible to make something for it? Yes. Can I use android:mimeType for example? All YouTube videos will share a MIME type. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
So, what is it? I mean, what is the mime type of a youtube video play page? On 27 Aralık, 14:21, Mark Murphy mmur...@commonsware.com wrote: On Mon, Dec 27, 2010 at 7:12 AM, sjor sleche...@gmail.com wrote: Yes, I want to launch my application while using browser. Is it exactly unpossible to make something for it? Yes. Can I use android:mimeType for example? All YouTube videos will share a MIME type. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
On Mon, Dec 27, 2010 at 7:39 AM, sjor sleche...@gmail.com wrote: So, what is it? I mean, what is the mime type of a youtube video play page? Beats me. That would be a fine question for some place that relates to YouTube. But it does not matter -- your video will have the same MIME type as millions of other videos. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
If I know the mime type i can write android:scheme=http, android:host=m.youtube.com and android:mimeType= then it works. I should find the mime type as i see. On 27 Aralık, 14:44, Mark Murphy mmur...@commonsware.com wrote: On Mon, Dec 27, 2010 at 7:39 AM, sjor sleche...@gmail.com wrote: So, what is it? I mean, what is the mime type of a youtube video play page? Beats me. That would be a fine question for some place that relates to YouTube. But it does not matter -- your video will have the same MIME type as millions of other videos. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
On Mon, Dec 27, 2010 at 7:49 AM, sjor sleche...@gmail.com wrote: If I know the mime type i can write android:scheme=http, android:host=m.youtube.com and android:mimeType= then it works. I should find the mime type as i see. No, that will give you the same results as you have today -- you will get control for every YouTube video. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
I want to control every Youtube video. I just don't want when I press share,search, hq, the username of the owner of the video etc. my application is launched. Only when I want to play a video(can be any video in Youtube) my app should be launched. When i write android:scheme=http and android:host=m.youtube.com to the manifest file I can control every youtube video to be played with my app. But, for example when I want to search a video or when I want to it launchs my application, too. That is the thing that I don't want. On 27 Aralık, 14:54, Mark Murphy mmur...@commonsware.com wrote: On Mon, Dec 27, 2010 at 7:49 AM, sjor sleche...@gmail.com wrote: If I know the mime type i can write android:scheme=http, android:host=m.youtube.com and android:mimeType= then it works. I should find the mime type as i see. No, that will give you the same results as you have today -- you will get control for every YouTube video. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch Activity with Intent Filter on Right Time
But, for example when I want to search a video it launchs my application, too * On 27 Aralık, 15:08, sjor sleche...@gmail.com wrote: I want to control every Youtube video. I just don't want when I press share,search, hq, the username of the owner of the video etc. my application is launched. Only when I want to play a video(can be any video in Youtube) my app should be launched. When i write android:scheme=http and android:host=m.youtube.com to the manifest file I can control every youtube video to be played with my app. But, for example when I want to search a video or when I want to it launchs my application, too. That is the thing that I don't want. On 27 Aralık, 14:54, Mark Murphy mmur...@commonsware.com wrote: On Mon, Dec 27, 2010 at 7:49 AM, sjor sleche...@gmail.com wrote: If I know the mime type i can write android:scheme=http, android:host=m.youtube.com and android:mimeType= then it works. I should find the mime type as i see. No, that will give you the same results as you have today -- you will get control for every YouTube video. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 store date and time in database
Ok, Now I have stored date in miliseconds format. from this I can get year, month and date(I can also get time from this). But how to store time? Because there are 2 buttons for user to select using first button user select the date on which he wants to on particular switch and second button for the time to on the switch. Should I store this time in normal int format? On Dec 27, 5:11 pm, pramod.deore deore.pramo...@gmail.com wrote: Thanks Bob and Federico. On Dec 27, 4:59 pm, Federico Paolinelli fedep...@gmail.com wrote: I do agree with this approach :-) On 27 Dic, 08:39, Kostya Vasilyev kmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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: How to store date and time in database
Store it any way you want. If you want to do selection by date I'd favor long integer (seconds since 1970), unless you need sub-second resolution. But supposedly SQLite can sort out (and select by) a wide variety of date formats, as described in the article someone referenced. On Dec 27, 12:21 am, pramod.deore deore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 to store date and time in database
It should be pointed out that long integer is one of the date formats supported by SQLite. On Dec 27, 1:39 am, Kostya Vasilyev kmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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: How to store date and time in database
(Though the SQLite long int representation of date is in seconds, not milliseconds.) On Dec 27, 1:39 am, Kostya Vasilyev kmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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: How to store date and time in database
Well, you can store time as date-time modulo 24 hours -- fits easily in 32 bits. Otherwise, probably some sort of hours/minutes/seconds triplet (or just hours/minutes). On Dec 27, 7:17 am, pramod.deore deore.pramo...@gmail.com wrote: Ok, Now I have stored date in miliseconds format. from this I can get year, month and date(I can also get time from this). But how to store time? Because there are 2 buttons for user to select using first button user select the date on which he wants to on particular switch and second button for the time to on the switch. Should I store this time in normal int format? On Dec 27, 5:11 pm, pramod.deore deore.pramo...@gmail.com wrote: Thanks Bob and Federico. On Dec 27, 4:59 pm, Federico Paolinelli fedep...@gmail.com wrote: I do agree with this approach :-) On 27 Dic, 08:39, Kostya Vasilyev kmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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] SMS Receipt Notification
Hi Folks, It would be really good if there was a way to programmatically turn on SMS receipt notification before sending an SMS (again programatically). I couldn't find this - anybody know how? Many Thanks Ian Hunter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Cursor.getString() truncating Strings issue
Hi All, I have an app that stores it's local data in a database, The database has a TEXT field called description that on some rows is truncated on retrieval. I have checked the database by running it app in the emulator and grabbing the database and checking the contents. So I know the data is there. I retrieve it using: public Cursor getAdditiveByRowID(long rowId) throws SQLException { Cursor mCursor = db.query(true, Additives.DATABASE_TABLE, new String[] { Additives.KEY_ROWID, Additives.KEY_IDENTIFIER, Additives.KEY_NAME, Additives.KEY_TYPE, Additives.KEY_DESCRIPTION, Additives.KEY_ACKNOWLEDGEMENT, Additives.KEY_WARNING }, Additives.KEY_ROWID + = + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } When I use it the code looks like this: if (cursor.moveToPosition(position)) { Log.i(TAG,contents from cursor = +cursor.getString(Additives.DESCRIPTION_COLUMN)); .. record.setDescription(cursor.getString(Additives.DESCRIPTION_COLUMN)); .. } I checked the output and it appears to be truncating the output at various stages (one it is 1980 chars before truncating and another it is 257 chars) with some rows only. I checked for bad chars but as I thought it was fine (the same database is used in my iPhone app with no problems) So it must be something I am doing. But I can not see where as it is wrong as soon as it comes from the database. Any assistance or advice to debug this would be more than helpful. Regards Damien -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 this normal textview or webview?
Hi Master TreKing, I know it is a listview but is it a textview in the listview or webview in a listview? I wanted to do something like this but I can't seems to get it right modifying the textview so is wondering is it something special to create this look or it is just same text component in normal listview :) Regards, CJ On Dec 27, 1:56 pm, TreKing treking...@gmail.com wrote: On Sun, Dec 26, 2010 at 8:41 PM, Mystique joven.ch...@gmail.com wrote: Hi, how to achieve this listview? Use the same layout and style as the picture. Is it textview or webview? Probably a listview. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered 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
Re: [android-developers] RelativeLayout problems
I fixed the id problem that was pointed out by the previous reply. It made no difference. On Sun, Dec 26, 2010 at 11:44 PM, Kostya Vasilyev kmans...@gmail.comwrote: John, Two suggestions: 1 - When your app suspends like this, it means it's crashing, but hasn't quite crashed all the way yet, which is why there is no logcat output at that point. Click 'resume execution' in Eclipse, and again if necessary. You only get logcat output (and the close dialog on the device) once the exception has propagated to the top-level exception handler. I tried clicking on resume. Twice. The app exited, the debugger disconnected from the Emulator, and still no logcat output. 2 - Logcat window in Eclipse is very nice (filtering, color highlighting), but just too small. Not on my screen. I re-arranged the tabs in Eclipse, and have a 24 1920x1200 monitor. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Getting the Android Java source?
On Mon, Dec 27, 2010 at 3:46 AM, Mark Murphy mmur...@commonsware.comwrote: If you are getting this in Eclipse, then your problem is with Eclipse and the ADT plugin. BridgeXmlBlockParser is related to the layout preview/drag-and-drop stuff, near as I can tell via Google Code Search. If you have not done so already, restart Eclipse and see if that helps. Beyond that, particularly since I am not an Eclipse user, I have no particular advice. I've restarted Eclipse, multiple times. This appears to have something to do with a Custom widget I have in my XML file. I'd really like the Java source so I can see what Eclipse is choking on. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Getting the Android Java source?
On Mon, Dec 27, 2010 at 10:02 AM, John Lussmyer johnlussm...@gmail.com wrote: I've restarted Eclipse, multiple times. This appears to have something to do with a Custom widget I have in my XML file. I'd really like the Java source so I can see what Eclipse is choking on. Use Google Code Search and search on BridgeXmlBlockParser in the android package. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Is this normal textview or webview?
On Mon, Dec 27, 2010 at 9:50 AM, Mystique joven.ch...@gmail.com wrote: I know it is a listview but is it a textview in the listview or webview in a listview? Most likely, each row is three TextViews in a RelativeLayout, where the top TextView really should have an android:ellipsize entry but doesn't. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: store string array in database
True, you can store a set of weekdays in a single column, but the real question should be what kind of queries would you make regarding that column. Consider if that column may be used in join, where, order by, etc. On Dec 27, 2010 3:49 AM, pramod.deore deore.pramo...@gmail.com wrote: Thank you Sir. On Dec 27, 4:41 pm, Mark Murphy mmur...@commonsware.com wrote: Option #1: Use an INTEGER column and bit positions for the different days Option #2: Serialize the strings into a comma-separated list or similar structure and store the result in a TEXT column On Mon, Dec 27, 2010 at 5:38 AM, pramod.deore deore.pramo...@gmail.com wrote: Hi, I have a String array (which contains some day from Monday - Sunday). But which days are stored is decided at runtime means sometime it want to store all day or sometime 1 or none. Now I want to store this array in database. How to save array of string in database? Or should I create 7 columns in that table? -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Getting the Android Java source?
I've been digging around in Google searches anyway. I did finally find the problem. The Eclipse preview code absolutely REQUIRES that you provide the AttributeSet that was passed in to your custom widget for any widgets you create programmatically inside it. It can not be null, and it must be the correct class type. To me, this is a bug in the Eclipse previewer. On Mon, Dec 27, 2010 at 7:03 AM, Mark Murphy mmur...@commonsware.comwrote: On Mon, Dec 27, 2010 at 10:02 AM, John Lussmyer johnlussm...@gmail.com wrote: I've restarted Eclipse, multiple times. This appears to have something to do with a Custom widget I have in my XML file. I'd really like the Java source so I can see what Eclipse is choking on. Use Google Code Search and search on BridgeXmlBlockParser in the android package. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 store date and time in database
Wha On Dec 27, 6:14 am, DanH danhi...@ieee.org wrote: Well, you can store time as date-time modulo 24 hours -- fits easily in 32 bits. Otherwise, probably some sort of hours/minutes/seconds triplet (or just hours/minutes). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Problem with Sphere Texture Mapping
But normal.x what is it? Is the abs(x) ? On 23 Dic, 20:41, Robert Green rbgrn@gmail.com wrote: UV unwrapping/mapping is standard practice in 3d games. It's how the artist lines up the textures onto the skin/model. You're doing UV coordinate generation, which is similar but is mathematically specified instead of placed by a 3D modeling application. On Dec 23, 12:37 am, pedr0 pulsarpie...@gmail.com wrote: What do you think about it? http://en.wikipedia.org/wiki/UV_mapping On 23 Dic, 09:19, pedr0 pulsarpie...@gmail.com wrote: Thanks a lot, especially at Robert Green for his very good explanation! The absurd thing is that the code which I posted above is 100% right in a iPhone iOS, but when I port the same code on the Android platform I have these issues. I will try to do what you are talking about normals and I let you know about my progress! Thanks again. pedr0 On 23 Dic, 04:10, Mario Zechner badlogicga...@gmail.com wrote: On 22 Dez., 20:42, Robert Green rbgrn@gmail.com wrote: 3DVec normal = (sphereCenter - point).normalize(); 3DVec normal = (point - sphereCenter).normalize(); Or your world will be upside down. Unless my brain is totally borked :) (could well be, 4am here...) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 store date and time in database
(Ignore the previous garbage post; it posted while I was typing; who knows why. Mouse was nowhere near the Send button). I would recommend storing the date+time in milliseconds as a single field, just as Java's Date class does. This makes sorting work 100% properly -- a benefit I forgot to mention in my previous message. My previous message also said seconds since 1 January 1970, when it should have said milliseconds. That is, it's counting seconds, in a fixed-point format with millisecond resolution. If you need femptosecond resolution, add that as an additional field. :=) On Dec 27, 6:14 am, DanH danhi...@ieee.org wrote: Well, you can store time as date-time modulo 24 hours -- fits easily in 32 bits. Otherwise, probably some sort of hours/minutes/seconds triplet (or just hours/minutes). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Cursor.getString() truncating Strings issue
logcat may be truncating, have you also tried Log.i(TAG,contents from cursor = +cursor.getString(Additives.DESCRIPTION_COLUMN).length()); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: OpenGL Problem with Sphere Texture Mapping
Pedro, A normal is a unit vector (length == 1) that is perpendicular to the surface. Normals are used for shading, so don't worry about them too much for now. Texture coordinates, as was already pointed out here, are in 2D space, i.e. two coordinates. The reason is that textures are 2-dimensional, and texture coordinates specify which point within the texture should be mapped to a particular vertex in 3D space. Imagine that the texture is a stretchable, initially square, piece of fabric. Each UV coordinate represents a point within that square. For each vertex, the point within the texture specified for that vertex by UV coordinates is glued to the vertex. Then the texture is allowed to stretch between vertexes. What sort of texture coordinates you generate is entirely up to you. A simple way to texture map a sphere is to wrap the texture into a vertical cylinder around the sphere, then pull the top and bottom towards the sphere, so you have singularities at the top and bottom of the sphere. If you generate your sphere as a bunch of horizontal bands, each having equal angular size, and further subdivided around into equal patches, then you can your use loop variables (band / patch index) to compute UV coordinates. Just remember that UV are 0 to 1 (unless you want tiling). -- Kostya 27.12.2010 18:35, pedr0 пишет: But normal.x what is it? Is the abs(x) ? On 23 Dic, 20:41, Robert Greenrbgrn@gmail.com wrote: UV unwrapping/mapping is standard practice in 3d games. It's how the artist lines up the textures onto the skin/model. You're doing UV coordinate generation, which is similar but is mathematically specified instead of placed by a 3D modeling application. On Dec 23, 12:37 am, pedr0pulsarpie...@gmail.com wrote: What do you think about it? http://en.wikipedia.org/wiki/UV_mapping On 23 Dic, 09:19, pedr0pulsarpie...@gmail.com wrote: Thanks a lot, especially at Robert Green for his very good explanation! The absurd thing is that the code which I posted above is 100% right in a iPhone iOS, but when I port the same code on the Android platform I have these issues. I will try to do what you are talking about normals and I let you know about my progress! Thanks again. pedr0 On 23 Dic, 04:10, Mario Zechnerbadlogicga...@gmail.com wrote: On 22 Dez., 20:42, Robert Greenrbgrn@gmail.com wrote: 3DVec normal = (sphereCenter - point).normalize(); 3DVec normal = (point - sphereCenter).normalize(); Or your world will be upside down. Unless my brain is totally borked :) (could well be, 4am here...) -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Re: How to store date and time in database
milliseconds from midnight jan 1 1970 UTC to midnight dec 27 2010 UTC plus miliseconds from midnight dec 27 2010 UTC to 15:57 27 dec 2010 UTC -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 store date and time in database
Here's a handy reference article: http://en.wikipedia.org/wiki/Unix_time -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: store string array in database
I would use an enum for the Weekdays like this enum Weekdays { SUNDAY , MONDAY, TUESDAY, ...} And then store the ordinal in the DB like this: int ordinal_to_store_in_DB = weekday.SUNDAY.ordinal() And retrieve the values from the DB like this: Weekdays day = Weekdays.values()[ordinal_value_from_Db]; This makes it easy to read your code and still provides maximum performance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Generating a unique widget ID
I have a custom view that programmatically creates several widgets within itself. I need to give these widgets ID numbers, so the RelativeLayout can position them properly. How do I find unused ID numbers that I can use? Just using constants won't work. Even if I happen to choose some that nobody else is using, any screen that has multiple instances of my custom view will end up with duplicate ID numbers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 simulate power off key
Hi, I have a Samsung Galaxy S with Android 2.2. In order to power off the phone, I must press and hold the power off key. I would like to simulate this action from a Java code. Can I do it? Best regards, Daddym85. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Generating a unique widget ID
You could use a static value in your widget class. Increment the static value in the constructor and use that to initialize an ID that is local to the instance. Basically the classic singleton pattern. You can add serialization for the static if you plan to support multi- threading but that's not generally done in Android UIs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] How to simulate power off key
Only if you modify the firmware, or possibly root your phone. Normal SDK applications cannot power off the phone. On Mon, Dec 27, 2010 at 12:16 PM, Daddym85 davidemulf...@gmail.com wrote: I have a Samsung Galaxy S with Android 2.2. In order to power off the phone, I must press and hold the power off key. I would like to simulate this action from a Java code. Can I do it? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Cross Word Game
I would like to develop a crossword puzzle game but never worked with game development. He wanted to know where to start. I will use Java 2D? I have experience only with the development of applications, not games. -- Diêgo Nunes Assunção Give Peace a Chance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Generating a unique widget ID
Yes, but that still doesn't assure that you won't collide with somebody elses custom view ID numbers. On Mon, Dec 27, 2010 at 9:22 AM, Bret Foreman bret.fore...@gmail.comwrote: You could use a static value in your widget class. Increment the static value in the constructor and use that to initialize an ID that is local to the instance. Basically the classic singleton pattern. You can add serialization for the static if you plan to support multi- threading but that's not generally done in Android UIs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Forcing volume control to be for the Media volume in my app
My app plays very short sounds frequently. I'd like the user to be able to use their normal volume controls to turn the volume up or down. The problem is that while my app is running, the volume control defaults to the Ringer volume, and only adjusts the Media volume if the user happens to press the button while one of my beeps or clicks is playing. How can I tell Android that while my app is active, the volume controls should default to adjusting the Media volume? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] InetAdress bug or documentation ambiguity or some other explanation?
I am stumped. InetAdress.isReachable simply does not work. By that I mean, it always returns false for an external host. I have tried searching the internet to see if anybody else is having the same problem, I have found a few people have had the same problem, but cannot really find an explanation why. I have tried this on multiple devices with the same result. boolean blnResult = InetAddress.getByName(localhost).isReachable(2); The above line of code works every time. If I change the localhost to an external host that I can verify isReachable, the result is always false. blnResult = InetAddress.getByName(www.google.com).isReachable(2); blnResult = InetAddress.getByName(4.2.2.2).isReachable(2); The above lines always return false, even though I can use a terminal emulator on the same device and get a true result. Can somebody more experienced with Android or perhaps a Google engineer please give a plausible explanation 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
Re: [android-developers] Re: Generating a unique widget ID
For the case you're describing, it doesn't matter. RelativeLayout only looks at its own children when resolving id references. -- Kostya 27.12.2010 20:40, John Lussmyer ?: Yes, but that still doesn't assure that you won't collide with somebody elses custom view ID numbers. On Mon, Dec 27, 2010 at 9:22 AM, Bret Foreman bret.fore...@gmail.com mailto:bret.fore...@gmail.com wrote: You could use a static value in your widget class. Increment the static value in the constructor and use that to initialize an ID that is local to the instance. Basically the classic singleton pattern. You can add serialization for the static if you plan to support multi- threading but that's not generally done in Android UIs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Forcing volume control to be for the Media volume in my app
On Mon, Dec 27, 2010 at 12:44 PM, John Lussmyer johnlussm...@gmail.com wrote: My app plays very short sounds frequently. I'd like the user to be able to use their normal volume controls to turn the volume up or down. The problem is that while my app is running, the volume control defaults to the Ringer volume, and only adjusts the Media volume if the user happens to press the button while one of my beeps or clicks is playing. How can I tell Android that while my app is active, the volume controls should default to adjusting the Media volume? In the affected activity, call setVolumeControlStream(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Generating a unique widget ID
The view ID is intended to be used inside the scope of an onClick() or some other onEvent() method. In that case, the onEvent method was set in the initialization for the widget, which will be unique to your widget. In other words, it's always one of your custom widgets. I wouldn't use a view ID outside that scope. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android random time delayed user abortable infinite loop
Hello and thanks for the reply, It's really the user abortable loop that I'm having trouble with now. Since first posting my problem, I have been researching code snippets and have zeroed in on this one: import java.util.Timer; import java.util.TimerTask; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class DelayTimer extends Activity { TextView mTextField; long elapsed; final static long INTERVAL=1000; final static long TIMEOUT=5000; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mTextField=(TextView)findViewById(R.id.textview1); TimerTask task=new TimerTask(){ @Override public void run() { elapsed += INTERVAL; if(elapsed = TIMEOUT){ this.cancel(); displayText(finished); return; } //if(some other conditions) // this.cancel(); displayText(seconds elapsed: + elapsed / 1000); } }; Timer timer = new Timer(); timer.scheduleAtFixedRate(task, INTERVAL, INTERVAL); } private void displayText(final String text){ this.runOnUiThread(new Runnable(){ @Override public void run() { mTextField.setText(text); }}); } } I think I should be able to replace the static long INTERVAL with a call to java.util.random in a way that would work for me. However, I can't even get this example to finish/abort/end properly. After running this example, I have to go to Manage Apps and click Force Close to kill it. I'm not really sure if this is example is the best way to handle it either but it is where I seem to be zeroing in on. Any suggestions? Thank you sooo much for your help, Ron On Tue, Dec 21, 2010 at 11:53 PM, TreKing treking...@gmail.com wrote: On Sun, Dec 19, 2010 at 12:20 PM, Ronoli javat...@gmail.com wrote: Hello, can anyone show me the proper way to resolve my problem? I do think I understand what your actual problem is. What, specifically, are you having trouble with given your pseudo-code description? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] InetAdress bug or documentation ambiguity or some other explanation?
On Mon, Dec 27, 2010 at 12:46 PM, bc clarkbrianc...@gmail.com wrote: I am stumped. InetAdress.isReachable simply does not work. By that I mean, it always returns false for an external host. I have tried searching the internet to see if anybody else is having the same problem, I have found a few people have had the same problem, but cannot really find an explanation why. I have tried this on multiple devices with the same result. boolean blnResult = InetAddress.getByName(localhost).isReachable(2); The above line of code works every time. If I change the localhost to an external host that I can verify isReachable, the result is always false. blnResult = InetAddress.getByName(www.google.com).isReachable(2); blnResult = InetAddress.getByName(4.2.2.2).isReachable(2); The above lines always return false, even though I can use a terminal emulator on the same device and get a true result. Can somebody more experienced with Android or perhaps a Google engineer please give a plausible explanation for this. http://stackoverflow.com/questions/2935325/android-debugging-inetaddress-isreachable isReachable() attempts to connect to port 7, which may be eaten by firewalls. This is a legacy holdover from Java -- I would recommend trying to do something more meaningful, like an HTTP GET request on a known good URL if you are trying to see if a Web service is reachable. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 random time delayed user abortable infinite loop
Well first, you need a call to finish() somewhere in order to exit the Activty. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] InetAdress bug or documentation ambiguity or some other explanation?
While I'm not necessarily more experienced with Android or perhaps a Google engineer It's kind of a weird call to begin with. On a mobile device (and not only) the network connection can go bad or completely disappear at any time. Even when this call properly works, it can't predict the future or make promises that it can keep. I'd recommend you check ConnectivityManager to see if it's even worth it to start a network conversation, then handle IOException in case the connection goes away or was bad to begin with. -- Kostya 27.12.2010 20:46, bc пишет: I am stumped. InetAdress.isReachable simply does not work. By that I mean, it always returns false for an external host. I have tried searching the internet to see if anybody else is having the same problem, I have found a few people have had the same problem, but cannot really find an explanation why. I have tried this on multiple devices with the same result. boolean blnResult = InetAddress.getByName(localhost).isReachable(2); The above line of code works every time. If I change the localhost to an external host that I can verify isReachable, the result is always false. blnResult = InetAddress.getByName(www.google.com).isReachable(2); blnResult = InetAddress.getByName(4.2.2.2).isReachable(2); The above lines always return false, even though I can use a terminal emulator on the same device and get a true result. Can somebody more experienced with Android or perhaps a Google engineer please give a plausible explanation for this. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Re: Android random time delayed user abortable infinite loop
Thank You, I will be working on my problem today as I was pulled away from it for a few days (Holidays!) Thanks again, I really appreciate any and all help!! Ron On Mon, Dec 27, 2010 at 1:02 PM, Bret Foreman bret.fore...@gmail.comwrote: Well first, you need a call to finish() somewhere in order to exit the Activty. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Forcing volume control to be for the Media volume in my app
Thanks. Using: setVolumeControlStream(AudioManager.STREAM_MUSIC); did the trick. (Sure would be nice if the setVolumeControlStream() docs actually told you what the valid values are, or at least where to find them.) On Mon, Dec 27, 2010 at 9:49 AM, Mark Murphy mmur...@commonsware.comwrote: In the affected activity, call setVolumeControlStream(). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Generating a unique widget ID
Well, things just aren't quite working that way. I had 2 instances of my custom view (subclass of RelativeLayout) on screen. Each of these did have a unique ID number. When the children of my view all used the same set of ID numbers (900,901,902 for the 3 children of the custom view), then when the main app code called a custom.setValue() method - which just passed the given string on to one of the children childTextView.setText() - it was updating the WRONG instances child. (which seemed really weird, since I had the TextView object reference directly from when I programmatically created it.) I modified the code so that every instance used a different set of child ID numbers, and this problem went away. I can hope that the numbers I chose won't conflict with some other custom control someday, but if the main app calls findViewById(), and that id occurs in both my custom control, and some view that the app defined in their XML, which will it find? On Mon, Dec 27, 2010 at 9:49 AM, Bret Foreman bret.fore...@gmail.comwrote: The view ID is intended to be used inside the scope of an onClick() or some other onEvent() method. In that case, the onEvent method was set in the initialization for the widget, which will be unique to your widget. In other words, it's always one of your custom widgets. I wouldn't use a view ID outside that scope. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: How to store date and time in database
Yes, This is why I included a link to the original SQLite reference in the links I previously provided :-). I agree with the long / string representation, but it's all just representation, each has its advantages / disadvantages, though for sorting and selection, this might be nice. I'm not an advanced SQL user, but maybe a string format would provide some niceties with respect to selection as well, however you could probably do the same thing easily enough by working with some date / long conversions in java then selecting in SQL. kris On Mon, Dec 27, 2010 at 9:07 AM, DanH danhi...@ieee.org wrote: It should be pointed out that long integer is one of the date formats supported by SQLite. On Dec 27, 1:39 am, Kostya Vasilyev kmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: store string array in database
Would JSON perhaps be a good solution for this? Kris Micinski On Mon, Dec 27, 2010 at 12:09 PM, Bret Foreman bret.fore...@gmail.com wrote: I would use an enum for the Weekdays like this enum Weekdays { SUNDAY , MONDAY, TUESDAY, ...} And then store the ordinal in the DB like this: int ordinal_to_store_in_DB = weekday.SUNDAY.ordinal() And retrieve the values from the DB like this: Weekdays day = Weekdays.values()[ordinal_value_from_Db]; This makes it easy to read your code and still provides maximum performance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: store string array in database
You have seven days, is it horribly looked down upon to store a byte and just mask the bits? Probably so, but that's how I'd do it in C :-). Hopefully that doesn't store up too much excitement, kris On Mon, Dec 27, 2010 at 1:32 PM, Kristopher Micinski krismicin...@gmail.com wrote: Would JSON perhaps be a good solution for this? Kris Micinski On Mon, Dec 27, 2010 at 12:09 PM, Bret Foreman bret.fore...@gmail.com wrote: I would use an enum for the Weekdays like this enum Weekdays { SUNDAY , MONDAY, TUESDAY, ...} And then store the ordinal in the DB like this: int ordinal_to_store_in_DB = weekday.SUNDAY.ordinal() And retrieve the values from the DB like this: Weekdays day = Weekdays.values()[ordinal_value_from_Db]; This makes it easy to read your code and still provides maximum performance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to store date and time in database
It just all depends on the database. SQLite docs specifically says this: http://www.sqlite.org/datatype3.html SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values: Note that SQLite's date/text conversions use -MM-DD HH:MM:SS.SSS format and not the usual human readable locale-dependent format (except for some countries). This is for data portability and selection / sorting. Real SQL databases often have rich date / time data types. The database is then aware that a particular column represents a date and/or time value, and can have richer functionality (like date arithmetic, etc). But since this group is about Android development, the database in question is (typically) SQLite. -- Kostya 27.12.2010 21:29, Kristopher Micinski пишет: Yes, This is why I included a link to the original SQLite reference in the links I previously provided :-). I agree with the long / string representation, but it's all just representation, each has its advantages / disadvantages, though for sorting and selection, this might be nice. I'm not an advanced SQL user, but maybe a string format would provide some niceties with respect to selection as well, however you could probably do the same thing easily enough by working with some date / long conversions in java then selecting in SQL. kris On Mon, Dec 27, 2010 at 9:07 AM, DanHdanhi...@ieee.org wrote: It should be pointed out that long integer is one of the date formats supported by SQLite. On Dec 27, 1:39 am, Kostya Vasilyevkmans...@gmail.com wrote: Kris Pramod, With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. SQLite natively supports long (64-bit) interger values (use INTEGER data type). So, for storing date/time stamp, call long milliseconds = Date.getTime() and store the long integer value in the database. When retrieving, get the long integer from the database, then construct new Date(long milliseconds). This has two advantages: - No text parsing or formatting necessary, smaller chance of bugs - Ability to sort or select before / after a certain date/time value when doing SELECT Hope this helps. -- Kostya 27.12.2010 10:06, Kristopher Micinski пишет: http://sberka.blogspot.com/2009/07/date-time-sqlite-and-android.html That blog post should point you in the right direction. What you may really want to know is how SQLite handles date and time. From what I've encountered there is no native date/time handling in SQLite, but you can simply store dates / times in a textual representation. The following articles may help give some insight: http://stackoverflow.com/questions/4248064/delphi-sqlite-date-time-fo... http://www.sqlite.org/lang_datefunc.html Typically what you will do is create some database implemented via a content provider or just database handler (see the many, many tutorials on how to do this) and create a table for storing your relevant information. For example, I have a contents table, where one of the columns is the date an article was published. Now the only thing you have to figure out is the marshaling. Thanks, Kris Micinski On Mon, Dec 27, 2010 at 1:21 AM, pramod.deoredeore.pramo...@gmail.com wrote: Hi everyone, In my application I have 2 buttons one for DatePickerand one for Timepicker. Date piker gives me date in this format - 12-27-2010 and time in - 11:48. Now I want to create table to store these values. How to store date and time in android database? 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Re: Generating a unique widget ID
It will return the first it finds during a depth-first traversal of the hierarchy. The framework uses framework ids -- 0x01nn. It is up to you to generate unique id integers (if you aren't using @id/blah) however you would like, if needed. There is no requirement for ids to be unique in a view hierarchy -- for example items in a list view are from the same view hierarchy with the same ids, and this is fine even if they use a relative layout. On Dec 27, 2010 11:22 AM, John Lussmyer johnlussm...@gmail.com wrote: Well, things just aren't quite working that way. I had 2 instances of my custom view (subclass of RelativeLayout) on screen. Each of these did have a unique ID number. When the children of my view all used the same set of ID numbers (900,901,902 for the 3 children of the custom view), then when the main app code called a custom.setValue() method - which just passed the given string on to one of the children childTextView.setText() - it was updating the WRONG instances child. (which seemed really weird, since I had the TextView object reference directly from when I programmatically created it.) I modified the code so that every instance used a different set of child ID numbers, and this problem went away. I can hope that the numbers I chose won't conflict with some other custom control someday, but if the main app calls findViewById(), and that id occurs in both my custom control, and some view that the app defined in their XML, which will it find? On Mon, Dec 27, 2010 at 9:49 AM, Bret Foreman bret.fore...@gmail.com wrote: The view ID is intended to be used inside the scope of an onClick() or some other onEvent() method. In that case, the onEvent method was set in the initialization for the widget, which will be unique to your widget. In other words, it's always one of your custom widgets. I wouldn't use a view ID outside that scope. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: InetAdress bug or documentation ambiguity or some other explanation?
Thank you for the replies. Perhaps I should give a little background on this phenomena. A few years ago I created a free server monitor. The monitor has always had ping checks, port checks, and http(s) checks. I was doing ping checks via the isReachable method. I have never had issues with the isReachable method until recently. By recently I mean late last summer, I began getting more and more complaints from users that ping is not working. I usually gave the canned response to ping not working because the ping portion of the application had been stable and working for about a year and a half. Now, as it turns out, I cannot get it to work. I am thinking I need to remove the Ping feature from my application. However, the backlash from users when a feature is removed is usually quick and severe. Even though the application is free I really want this to be a last resort. Is there an alternative to isReachable? On Dec 27, 11:54 am, Mark Murphy mmur...@commonsware.com wrote: On Mon, Dec 27, 2010 at 12:46 PM, bc clarkbrianc...@gmail.com wrote: I am stumped. InetAdress.isReachable simply does not work. By that I mean, it always returns false for an external host. I have tried searching the internet to see if anybody else is having the same problem, I have found a few people have had the same problem, but cannot really find an explanation why. I have tried this on multiple devices with the same result. boolean blnResult = InetAddress.getByName(localhost).isReachable(2); The above line of code works every time. If I change the localhost to an external host that I can verify isReachable, the result is always false. blnResult = InetAddress.getByName(www.google.com).isReachable(2); blnResult = InetAddress.getByName(4.2.2.2).isReachable(2); The above lines always return false, even though I can use a terminal emulator on the same device and get a true result. Can somebody more experienced with Android or perhaps a Google engineer please give a plausible explanation for this. http://stackoverflow.com/questions/2935325/android-debugging-inetaddr... isReachable() attempts to connect to port 7, which may be eaten by firewalls. This is a legacy holdover from Java -- I would recommend trying to do something more meaningful, like an HTTP GET request on a known good URL if you are trying to see if a Web service is reachable. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: RemoteViews notification is not being displayed in notification window??
Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. On Dec 26, 2010 9:19 PM, mkmand manojk.mau...@gmail.com wrote: I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: RemoteViews notification is not being displayed in notification window??
I understand that but custom expanded view is part of standard platform. What I fail to understand is that how it can be device dependant if OS is same? I am not getting any exception or error. Simply, click on buttons in side notifications is not working on few devices. It might be resolution dependant, just a guess. Thanks Manoj Kumar Maurya Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. On Dec 26, 2010 9:19 PM, mkmand manojk.mau...@gmail.com wrote: I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: InetAdress bug or documentation ambiguity or some other explanation?
ICMP and Java have had a long and sordid history, IIRC. You might consider doing your own ping via the NDK. Personally, I would have the server monitor running on a server, and have the Android app only be a control panel/notification mechanism, but that's just me. On Mon, Dec 27, 2010 at 2:02 PM, bc clarkbrianc...@gmail.com wrote: Thank you for the replies. Perhaps I should give a little background on this phenomena. A few years ago I created a free server monitor. The monitor has always had ping checks, port checks, and http(s) checks. I was doing ping checks via the isReachable method. I have never had issues with the isReachable method until recently. By recently I mean late last summer, I began getting more and more complaints from users that ping is not working. I usually gave the canned response to ping not working because the ping portion of the application had been stable and working for about a year and a half. Now, as it turns out, I cannot get it to work. I am thinking I need to remove the Ping feature from my application. However, the backlash from users when a feature is removed is usually quick and severe. Even though the application is free I really want this to be a last resort. Is there an alternative to isReachable? On Dec 27, 11:54 am, Mark Murphy mmur...@commonsware.com wrote: On Mon, Dec 27, 2010 at 12:46 PM, bc clarkbrianc...@gmail.com wrote: I am stumped. InetAdress.isReachable simply does not work. By that I mean, it always returns false for an external host. I have tried searching the internet to see if anybody else is having the same problem, I have found a few people have had the same problem, but cannot really find an explanation why. I have tried this on multiple devices with the same result. boolean blnResult = InetAddress.getByName(localhost).isReachable(2); The above line of code works every time. If I change the localhost to an external host that I can verify isReachable, the result is always false. blnResult = InetAddress.getByName(www.google.com).isReachable(2); blnResult = InetAddress.getByName(4.2.2.2).isReachable(2); The above lines always return false, even though I can use a terminal emulator on the same device and get a true result. Can somebody more experienced with Android or perhaps a Google engineer please give a plausible explanation for this. http://stackoverflow.com/questions/2935325/android-debugging-inetaddr... isReachable() attempts to connect to port 7, which may be eaten by firewalls. This is a legacy holdover from Java -- I would recommend trying to do something more meaningful, like an HTTP GET request on a known good URL if you are trying to see if a Web service is reachable. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Which JSON Parser is better
Check out GSON... in version 1.6 there is a new very small streaming parser. On Dec 27, 1:11 am, ko5tik kpriblo...@yahoo.com wrote: On Dec 26, 7:18 pm, Jonathan Foley jonefo...@gmail.com wrote: Are you aware of the jackson JSON library, its very fast and has nice data binding APIs. Yes, I'm aware of it - but it comes with full (although small) can of worms and dependencies attached. Right now my games are 130KB and including just parser would blow it - and then there is data binding layer. (well, other parsers are much worse) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: RemoteViews notification is not being displayed in notification window??
The expanded notification is standard. Being able to have clickable widgets inside is *not*. Just don't do that. It is not supported. Try it on the emulator. Does it work? If not, that is the expected behavior. On Dec 27, 2010 12:08 PM, Manoj Maurya manojk.mau...@gmail.com wrote: I understand that but custom expanded view is part of standard platform. What I fail to understand is that how it can be device dependant if OS is same? I am not getting any exception or error. Simply, click on buttons in side notifications is not working on few devices. It might be resolution dependant, just a guess. Thanks Manoj Kumar Maurya Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. On Dec 26, 2010 9:19 PM, mkmand manojk.mau...@gmail.com wrote: I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: RemoteViews notification is not being displayed in notification window??
Thanks for replying. Unfortunately, emulator is too slow to start n respond. So, I do use my phone for testing etc. Thanks Manoj Kumar Maurya The expanded notification is standard. Being able to have clickable widgets inside is *not*. Just don't do that. It is not supported. Try it on the emulator. Does it work? If not, that is the expected behavior. On Dec 27, 2010 12:08 PM, Manoj Maurya manojk.mau...@gmail.com wrote: I understand that but custom expanded view is part of standard platform. What I fail to understand is that how it can be device dependant if OS is same? I am not getting any exception or error. Simply, click on buttons in side notifications is not working on few devices. It might be resolution dependant, just a guess. Thanks Manoj Kumar Maurya Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. On Dec 26, 2010 9:19 PM, mkmand manojk.mau...@gmail.com wrote: I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com android-developers%25252bunsubscr...@googlegroups.comandroid-developers%2525252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
Re: [android-developers] Re: RemoteViews notification is not being displayed in notification window??
More than likely you're seeing something where a vendor (i.e. manufacturer or carrier) wanted that behaviour, and passed through click handling events from the expanded notification tray to the underlying notification, and thus its widgets. As Dianne mentioned, this isn't part of the standard Android platform behaviour.. which is probably why your buttons/widgets inside of the notification aren't getting the click event propagated to them. cheers, steve Manoj Maurya mailto:manojk.mau...@gmail.com December 27, 2010 11:08 AM I understand that but custom expanded view is part of standard platform. What I fail to understand is that how it can be device dependant if OS is same? I am not getting any exception or error. Simply, click on buttons in side notifications is not working on few devices. It might be resolution dependant, just a guess. Thanks Manoj Kumar Maurya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Dianne Hackborn mailto:hack...@android.com December 27, 2010 11:03 AM Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en mkmand mailto:manojk.mau...@gmail.com December 26, 2010 8:19 PM I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pink mailto:sivareddy.j...@gmail.com December 20, 2010 1:56 AM After looking at logcat i came to conclsion that RadioGroup can't be used in notifcation. This time i am using buttons and those appearing in notication window. I have registered pending intents for each button in my notification. But when i click any button, contentintent being raissed but not button pending is raised. Is there any thing needs to be done to listen to user actions notification button actions except from registering pending intents with RemoteViews? Thanks in advance... -- stephen lau | st...@grommit.com | http://whacked.net | @stevel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=eninline: compose-unknown-contact.jpg
Re: [android-developers] Re: RemoteViews notification is not being displayed in notification window??
Slow maybe. Correct definitely. :) I don't use the emulator for day to day development, but I still run sanity checks against it for correctness to ensure my app runs on as many platforms as possible. The only time I've been bitten by this is when vendor customisations totally deviate from standard Android platform APIs, such as Motorola with its very broken Motoblur Contacts API behaviour. cheers, steve Manoj Maurya mailto:manojk.mau...@gmail.com December 27, 2010 11:31 AM Thanks for replying. Unfortunately, emulator is too slow to start n respond. So, I do use my phone for testing etc. Thanks Manoj Kumar Maurya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Dianne Hackborn mailto:hack...@android.com December 27, 2010 11:28 AM The expanded notification is standard. Being able to have clickable widgets inside is *not*. Just don't do that. It is not supported. Try it on the emulator. Does it work? If not, that is the expected behavior. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Manoj Maurya mailto:manojk.mau...@gmail.com December 27, 2010 11:08 AM I understand that but custom expanded view is part of standard platform. What I fail to understand is that how it can be device dependant if OS is same? I am not getting any exception or error. Simply, click on buttons in side notifications is not working on few devices. It might be resolution dependant, just a guess. Thanks Manoj Kumar Maurya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Dianne Hackborn mailto:hack...@android.com December 27, 2010 11:03 AM Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en mkmand mailto:manojk.mau...@gmail.com December 26, 2010 8:19 PM I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- stephen lau | st...@grommit.com | http://whacked.net | @stevel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to
Re: [android-developers] Re: RemoteViews notification is not being displayed in notification window??
I appreciate your observation. Just to mention, it works on my HTC HD2 WITH froyo 2.2 build but not on mytouch and g2, tested so far. Thanks Manoj Kumar Maurya More than likely you're seeing something where a vendor (i.e. manufacturer or carrier) wanted that behaviour, and passed through click handling events from the expanded notification tray to the underlying notification, and thus its widgets. As Dianne mentioned, this isn't part of the standard Android platform behaviour.. which is probably why your buttons/widgets inside of the notification aren't getting the click event propagated to them. cheers, steve Manoj Maurya mailto:manojk.mau...@gmail.com December 27, 2010 11:08 AM I understand that but custom expanded view is part of standard platform. What I fail to understand is that how it can be device dependant if OS is same? I am not getting any exception or error. Simply, click on buttons in side notifications is not working on few devices. It might be resolution dependant, just a guess. Thanks Manoj Kumar Maurya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Dianne Hackborn mailto:hack...@android.com December 27, 2010 11:03 AM Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en mkmand mailto:manojk.mau...@gmail.com December 26, 2010 8:19 PM I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pink mailto:sivareddy.j...@gmail.com December 20, 2010 1:56 AM After looking at logcat i came to conclsion that RadioGroup can't be used in notifcation. This time i am using buttons and those appearing in notication window. I have registered pending intents for each button in my notification. But when i click any button, contentintent being raissed but not button pending is raised. Is there any thing needs to be done to listen to user actions notification button actions except from registering pending intents with RemoteViews? Thanks in advance... -- stephen lau | st...@grommit.com | http://whacked.net | @stevel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post
Re: [android-developers] Re: RemoteViews notification is not being displayed in notification window??
HTC is well known for heavily customizing Android for their phones. 27.12.2010 22:41, Manoj Maurya ?: I appreciate your observation. Just to mention, it works on my HTC HD2 WITH froyo 2.2 build but not on mytouch and g2, tested so far. Thanks Manoj Kumar Maurya More than likely you're seeing something where a vendor (i.e. manufacturer or carrier) wanted that behaviour, and passed through click handling events from the expanded notification tray to the underlying notification, and thus its widgets. As Dianne mentioned, this isn't part of the standard Android platform behaviour.. which is probably why your buttons/widgets inside of the notification aren't getting the click event propagated to them. cheers, steve Manoj Maurya mailto:manojk.mau...@gmail.com mailto:manojk.mau...@gmail.com December 27, 2010 11:08 AM I understand that but custom expanded view is part of standard platform. What I fail to understand is that how it can be device dependant if OS is same? I am not getting any exception or error. Simply, click on buttons in side notifications is not working on few devices. It might be resolution dependant, just a guess. Thanks Manoj Kumar Maurya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Dianne Hackborn mailto:hack...@android.com mailto:hack...@android.com December 27, 2010 11:03 AM Buttons and other widgets inside of notifications aren't supported in the standard platform. If it happens to work on a particular device, that is an extra feature there but not something you can count on working elsewhere. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en mkmand mailto:manojk.mau...@gmail.com mailto:manojk.mau...@gmail.com December 26, 2010 8:19 PM I am stuck with same problem but in a more weird way, I am learning android by writing an app which will show a custom notification with buttons. Now, when I install this program on my HTC HD2 with Android 2.2, click on button on notification does the intended action but when I install same program on mytouch 3g with Android 2.2.1, it doesn't work i.e. click on notification works but not on individual buttons. Could you solve the issue? One thing to notice is that, on mytouch 3g,I see a small area on right side of my custom layout in notification, which is extra i.e. this small area is not getting covered by by the custom layout of the notification. and that is the area which gets highlighted when i click the button or anywhere on the notification. If you could solve the issue, please share. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pink mailto:sivareddy.j...@gmail.com mailto:sivareddy.j...@gmail.com December 20, 2010 1:56 AM After looking at logcat i came to conclsion that RadioGroup can't be used in notifcation. This time i am using buttons and those appearing in notication window. I have registered pending intents for each button in my notification. But when i click any button, contentintent being raissed but not button pending is raised. Is there any thing needs to be done to listen to user actions notification button actions except from registering pending intents with RemoteViews? Thanks in advance... -- stephen lau | st...@grommit.com mailto:st...@grommit.com | http://whacked.net | @stevel -- You received this message because you are subscribed to the Google Groups
[android-developers] how to create irregular polygon and handle events within its boundary
How can we create polygons with shapes other than the normal regular rectangle/circle etc? I need to create a image with boundaries and let users click within the image. Then I need to highlight the image. I also need to highlight the image only when the user clicks within the boundaries of the shape. How can I do this in android? 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: Did sensor orientation change in SDK 2.3?
posted to issue tracker at http://code.google.com/p/android/issues/detail?id=13450 On Dec 26, 9:17 am, greg sep...@eduneer.com wrote: I inserted a Log.d() in the ApiDemos/OS/Sensors application to confirm that the sensor data is inverted (not just the display of it) from SDK 2.2 to SDK 2.3. The orientation of the sensor data is correct in SDK 2.3 (i.e., +1 g of acceleration in the z direction due to the force from the table), but does anyone know why a SDK 2.2 application running on a SDK 2.3 device would cause the change in sensor orientation? By the way, kudos to ST MicroElectronics, Samsung, and Google on the choice and implementation of the gyroscope sensor: its output is impressively pristine. On Dec 24, 5:02 pm, greg sep...@eduneer.com wrote: The following test was with Nexus S lying flat on table with display up. When running the ApiDemos/Sensor application in SDK 2.2, the red and green lines (i.e., x-axis accelerometer and y-axis accelerometer, respectively) are at the 0 g axis and the blue line (i.e., z-axis accelerometer) is at the -1 g axis. However, when running the ApiDemos Sensor application in SDK 2.2, the blue line is at the +1 g axis. Looking at Sensor.java, it appears to me that the application's scaling is the same. Looking through the documented API differences, I didn't see any mention of sensor orientation change. Yet, the screen y-axis appears in the ApiDemos/Sensor applications in SDK 2.2 and SDK 2.3 are inverted. What changed? - Greg -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Uploading images to BLOBSTORE @ AppEngine
Hi, I am trying to figure out, how to simply send and store any images to GAE Blobstore from Android. Is it possible? Thank you Honza -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] how to create irregular polygon and handle events within its boundary
OK, so how hard was it to google android polygon? The tougher question may be do you already have the polygon as a vertex list or do you just have an image that has a polygon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cross Word Game
On Dec 27, 6:35 pm, Diego N. diegonunes.sist...@gmail.com wrote: I would like to develop a crossword puzzle game but never worked with game development. He wanted to know where to start. I will use Java 2D? I would recommend to stick to standard android widgets if you do not need realtime graphics (which is the case with crossword puzzle game) - but full UI power including layout and animations. If you need realtime frame rendering your choice is SurfaceView and drawing into bitmaps with android toolkit - or maybe even with GL if hardware acceleration if available regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: layout editor in 2.3 SDK sucks! Sorry but it does.
I hope soon, this version is very unusable. On 13 Dic, 09:03, Xavier Ducrohet x...@android.com wrote: there's no doc at the moment as it's very much a work in progress. That first version is quite rough, I'll admit (but has a few more features than the previous one). We're hoping to release updates very frequently. Xav On Sun, Dec 12, 2010 at 9:10 PM, stanchat stanc...@tccons.com wrote: The new Layout Editor is also giving me problems. I'm trying to add a Linear Layout as the child of another linear layout and then add a textview and button. I'm having a hard time doing that with the new editor. I miss the big + and - along with the arrow keys to move views up and down. Is there any documentation on the new editor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. 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 to create irregular polygon and handle events within its boundary
OK, so how hard was it to google android polygon? hmm its harder than just assuming that I did not do the same. I have been looking around for that since a couple of days. May be I am searching with the wrong terms. Still thank you for the reply. The results does not pull up what I am looking for. But your suggestion did show me something helpful I can use later. [ie to detect if a point lies inside a polygon] No I do not have a Vertices list. I have an image that has the shape. It is a human body with parts[head, arms, legs etc]. That is why I was looking for some hint of where I might have to start looking. I need to somehow convert this into a vertices list or was actually wondering if android has any builtin classes that I can take advantage of. Thanks. On Dec 27, 2:08 pm, Frank Weiss fewe...@gmail.com wrote: OK, so how hard was it to google android polygon? The tougher question may be do you already have the polygon as a vertex list or do you just have an image that has a polygon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ClassNotFoundException crash reports from Market
Anyone word on this from google? I am distributing a pretty popular app and this error has popped up a few hundred times now in the marketplace crash report. I can't really do anything for these users except ask them to run something like Log Collector but it's a slim chance they'll do that (no takers yet). Looks like something related to google maps missing or some such thing?: java.lang.RuntimeException: Unable to instantiate application com.me.test.ActivityMain: java.lang.ClassNotFoundException: com.me.test.ActivityMain in loader dalvik.system.PathClassLoader[/ system/framework/com.google.android.maps.jar:/data/app/ com.me.test-1.apk] Caused by: java.lang.ClassNotFoundException: com.me.test.ActivityMain in loader dalvik.system.PathClassLoader[/system/framework/ com.google.android.maps.jar:/data/app/com.me.test-1.apk] Thanks On Nov 27, 10:10 am, Emanuel Moecklin 1gravity...@gmail.com wrote: Hi Moss The com.package.app is just an obfuscated package name (much like your com.package.app). In reality I'm using a unique name or that's what I hope I do ;-). Thanks for your post anyway. I really appreciate your support! Cheers Emanuel On Nov 24, 2:01 pm, Moss b.thax@gmail.com wrote: Could it be that the class loader is failing to find the right package? I just saw that you are using 'com.company.app' as your package name. Googling a bit I found that there are many apps that use the same schema. Normally I use my domain to identify my packages in a unique way like 'com.myweb.myapp'. I just tried to reproduce your error and creating 2 apps that use the same base package name I just get the error when launching them. I think that the class loader will pickup the first listed package and then try to load the class (which is not there :P): - com.package.app.ActivityA - com.package.app.ActivityB If I load com.package.app.ActivityB I'm getting the same error. Hope this can help you a bit. Cheers, Moss -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: layout editor in 2.3 SDK sucks! Sorry but it does.
Preview 2 is much improved - being able to drag views up and down the list (and into child layouts) is great, no need for the up/down button now. Again, can still use some work, but it's getting back to the point where I am comfortable using drag and drop, but able to do things manually now. Here's some frustrating things I would like to get see fixed, which may relate to the tools or integration with Ecliipse: * Refactoring If I rename something, all references to it should be updated * Other Properties in the right-click menu I could take off the stinking property window completely, if all custom properties (like references or resources) could be picked from here - this is already done for things like layout_width (Other...) - resource references/properties could be done the same way, (Select Resource..) * Property state If you move from one view to the other, you get pushed back to the top of the property window. Especially if I am editing a property that every one of the views I click on has, this should not happen... my property window should stay focused on the same property for the new view. It does this *some* times, but the times it doesn't is frustrating * Resource Chooser (for String Properties) Very frustrating when you have any more than about 100+ strings, say using them for tags, and you need to select one from this - it loads the list of resources and resets back to the top of the list - every time. You can either try to scroll down the list and quickly click your item, or wait for the whole list to load, reset to the top, then scroll down to your item - this is a lot of wasted time. I could just manually type the string (@string/whatever), but I'd prefer to pick from a (quicker) list. * Simultaneous Viewing of MultiRes Layouts I'd really like to see a way to view multiple layouts simultaneously (i.e. compare my HVGA and WVGA side by side) * Merging Layout Changes Even more, I'd like to see a way to make it much easier to work with multi-res layouts. Currently, if I add a view to one layout, I have to add it to all layouts that it will apply to. For example: I have customized version of: res/layout/main.xml res/layout-land/main.xml res/layout-large/main.xml res/layout-ldpi/main.xml If I want to add a view, assuming it would be added to all layouts, I have to either add it once for each version of my view, and set all the properties each time - or (try to) copy and paste it to each layout, although copy and paste needs a lot of improvements still. * Deprecated/Newer Feature Warnings As developers, we want to make things compatible for as long as possible, so it would be helpful if the tools pointed out if we are using things that may not work prior to x.x - such as new properties that are added/removed/etc. We do get warnings for deprecated properties (in the property window), but that is about it. There's the top of my wishlist.. I wish I was more experienced and had time to help with creating and fixing the tools.. but I'd rather be using them and building better applications, then trying to help improve them. I recommend others that want to see the Tools improved use the links provided: * Bug Report http://code.google.com/p/android/issues/entry?template=Tools%20bug%20report *Feature Request http://code.google.com/p/android/issues/entry?template=Tools%20feature%20request Thanks again for all the work you put into these things... -Tim On Dec 27, 4:16 pm, fala70 fal...@gmail.com wrote: I hope soon, this version is very unusable. On 13 Dic, 09:03, Xavier Ducrohet x...@android.com wrote: there's no doc at the moment as it's very much a work in progress. That first version is quite rough, I'll admit (but has a few more features than the previous one). We're hoping to release updates very frequently. Xav On Sun, Dec 12, 2010 at 9:10 PM, stanchat stanc...@tccons.com wrote: The new Layout Editor is also giving me problems. I'm trying to add a Linear Layout as the child of another linear layout and then add a textview and button. I'm having a hard time doing that with the new editor. I miss the big + and - along with the arrow keys to move views up and down. Is there any documentation on the new editor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. 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