[android-developers] Trouble with banding, dithering
First, let me say I am very familiar with Romain Guy's article on banding and dithering from Dec 2010. I'm working with a 2.3 device with a 1080p frame buffer and 16bit / 565 color depth. The visual style involves many dark grey gradients (baked lighting effects, actually). I'm having significant trouble with major banding artifacts, most notably on window style background, but really on all Android View objects with subtle gradients. This is true on all application, including the launcher, but seems the most extreme on my own application. The scale of the 1080p display makes this significantly worse than a small phone display. Further, the color space aliasing that is leading to the banding is also leading to colors that are green or purple tinted relative to the surround neutral grays (artifact of the extra green bit). This is unacceptable, beyond just the banding problems. Despite numerous attempts, I see very little sign that dithering is enabled on the loaded bitmaps. Here is what I've tried: * Setting the window pixel format to RGBA_ (the first thing I ran to). * Using a XML bitmap to force the dithering flags (and other configurations). * Various PNG formats: indexed, greyscales, with and without alpha (I read something about Android manipulating .pngs at compile time based on the presense of the alpha). I've given up on JPEGs because they have less control over the insignificant bits of the pixel colors / hue shifts. * Manipulating the BitmapFactory.Options, where exposed to me. Is there anything I'm missing that might enable dithering programmatically? If I'm force to bake noise into the bitmaps, does anyone have any hints as to how I can make Photoshop or Gimp use a 555 colorspace? That is, I want the red, blue, and green channels to step through the neutral gradient at the same level, avoid green and purple hue shifts. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] VideoView Volume
Is there a way to control the volume of a VideoView's sound playback. More specifically, I want to control the volume of one of two video views, independently. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Drawing two animated gifs on a canvas
Generally, anything with more than one Surface view is apt to break. I've seen this issue with camera previews and media players in the same layout I don't think it was architected to share the render buffer. On Jun 21, 2:03 am, AndroidDev1 lior.naish...@gmail.com wrote: Hi, I am using a SurfaceView and a Thread to draw animated gif on a canvas and its working perfectly. Once I try to draw my second animated gif, I'm getting 2 animated gifs with the last animinated gif aniation. like my second Movie.DecodeStream(is) override the first Movie. The result of the code below is 2 animated gif with movie2 animation Please advise what can be the problem. Thanks in advance code: Thread constructor: InputStream is is = mRes.openRawResource(R.drawable.animated_gif1); Movie movie1 = Movie.decodeStream(is); try { is.close(); } catch (java.io.IOException e) { /* do nothing. If the exception happened on open, moov will be null. If it happened on close, moov is still valid. */ } is = mRes.openRawResource(R.drawable.animated_gif2); Movie movie2 = Movie.decodeStream(is); try { is.close(); } catch (java.io.IOException e) { /* do nothing. If the exception happened on open, moov will be null. If it happened on close, moov is still valid. */ } doDraw(Canvas c) { long now = android.os.SystemClock.uptimeMillis(); if (mMovieStart == 0) { // first time mMovieStart = now; } int dur = movie1.duration(); if (dur == 0) dur = 1000; int relTime = (int)((now - mMovieStart) % dur); movie1.setTime(relTime); movie1.draw(canvas, 100, 100); int dur = movie2.duration(); if (dur == 0) dur = 1000; relTime = (int)((now - mMovieStart) % dur); movie2.setTime(relTime); movie2.draw(canvas, 100, 100); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Market Filter supports-screens not working like I expected
I uploaded an app today with the following market filter: supports-screens android:smallScreens=false android:normalScreens=true android:largeScreens=true android:xlargeScreens=false android:anyDensity=true / But I got the following from the developer console: Screen layouts: NORMAL LARGE XLARGE and I can see it listed from a 10 tablet. Why is XLARGE listed? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: RunOnUiThread loads images randomly !!
If you're loading or generating the images on multiple non-UI threads, they are probably being added to the view in the order they complete (of very near that). If that is not what you want, there are two things you can do to fix that. The simplest is to serialize the loading or genration in one thread. That is, load one image, call runOnUiThread with a runnable to insert it into the UI, then repeat to load more images. The more complicated route is to build a synchronized buffer queue (of sorts) that can store references to the images while wait on others to complete. This can either be explicit buffer over built on an array like structure, or implicitly with something like a chain of semaphores. In general, the loader for image #2 will wait for the loader thread of image #1 to complete its UI update. This is not straight forward code, and you need to be very carefully about exceptions and other edge cases. Nothing in the that I know off in the standard libraries will provide this out of the box. On May 30, 1:27 am, gaurav gupta gaurav.gupta...@gmail.com wrote: Hi Guys, M using runonUiThread to set images in a Gridview. its working fine but its load images randomly, i want that images load in sequence order , not randomly. please Suggest how can i do that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: View.GONE but still accepts UI events
Okay, so what is the rationale behind the animation null check? Why would a view that is either GONE or INVISIBLE receive events just because its animating (or more correctly, has a reference to a Animation object, regardless of whether it is actively animating)? Nothing I see in the Animation interface influences the view's visibility state directly. In the current code, we left animation objects attached to views to we could reuse them. Instead of setting the reference to null, we had set the Animation startTime to Long.MAX_VALUE, and later called start(). This also avoided a invalidate/reset cycle for views that were always the same size. On May 23, 3:24 pm, Dianne Hackborn hack...@android.com wrote: If you are receiving down events, then the view is almost certainly not set to GONE or it is still animating. The code for this part of dispatching in ViewGroup is pretty simply, and just immediately skips any non-visible views: for (int i = childrenCount - 1; i = 0; i--) { final View child = children[i]; if ((child.mViewFlags VISIBILITY_MASK) != VISIBLE child.getAnimation() == null) { // Skip invisible child unless it is animating. continue; } So be sure the view is actually gone, and that you haven't left an animation in it. On Mon, May 23, 2011 at 1:31 PM, Anm andrew.n.marsh...@gmail.com wrote: This morning, I'm trying to animate the various state of a simple game. I have a transparent cover ViewGroup with a start and other buttons. When the user hits start, the entire cover animates away. At the end of the animation, I set the cover View to GONE which looks correct, but the start button is still grabbing touch events instead of the game's view. I had to manually iterate over all the start button and other views within the cover to setClickable( false ) and setEnabled( false ) (not sure if both were really needed) before I started receiving my touch events again on the layers below the GONE ViewGroup. On May 23, 12:33 pm, Justin Anderson magouyaw...@gmail.com wrote: I have never run into this... What situations have you come across where this happens? Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, May 23, 2011 at 1:13 PM, Anm andrew.n.marsh...@gmail.com wrote: This is something that I've run into a couple of times, and I'm just curious about the thought process behind such design, if intentional: When a view has visibility GONE, it is still allowed to accept UI events. This is especially strange in positional UI events like touch, where any positional state it likely an artifact of past/ invalidated state. My colleagues and I cannot come up with any scenario where this behavior would be desirable. Quite the opposite, it would seem to be an easy way to limit the view tree traversal for event handling. Any insight would be greatly appreciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] View.GONE but still accepts UI events
This is something that I've run into a couple of times, and I'm just curious about the thought process behind such design, if intentional: When a view has visibility GONE, it is still allowed to accept UI events. This is especially strange in positional UI events like touch, where any positional state it likely an artifact of past/ invalidated state. My colleagues and I cannot come up with any scenario where this behavior would be desirable. Quite the opposite, it would seem to be an easy way to limit the view tree traversal for event handling. Any insight would be greatly appreciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: View.GONE but still accepts UI events
This morning, I'm trying to animate the various state of a simple game. I have a transparent cover ViewGroup with a start and other buttons. When the user hits start, the entire cover animates away. At the end of the animation, I set the cover View to GONE which looks correct, but the start button is still grabbing touch events instead of the game's view. I had to manually iterate over all the start button and other views within the cover to setClickable( false ) and setEnabled( false ) (not sure if both were really needed) before I started receiving my touch events again on the layers below the GONE ViewGroup. On May 23, 12:33 pm, Justin Anderson magouyaw...@gmail.com wrote: I have never run into this... What situations have you come across where this happens? Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, May 23, 2011 at 1:13 PM, Anm andrew.n.marsh...@gmail.com wrote: This is something that I've run into a couple of times, and I'm just curious about the thought process behind such design, if intentional: When a view has visibility GONE, it is still allowed to accept UI events. This is especially strange in positional UI events like touch, where any positional state it likely an artifact of past/ invalidated state. My colleagues and I cannot come up with any scenario where this behavior would be desirable. Quite the opposite, it would seem to be an easy way to limit the view tree traversal for event handling. Any insight would be greatly appreciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Camera driver on Nexus One v2.3.3
I'm trying to debug or work around camera driver issues on Gingerbread. In our app, the camera preview will start up, graba a few frames, and then crash the camera driver with the following error message: liboemcamera: config_proc_ctrl_command: SEVERE ERROR: attempt to override pending command 13 with 58 The app continues to run fine, but never receives anymore preview frames. Thus, the preview SurfaceView appears frozen and the app never recognizes the expected barcode. Recreating the SurfaceView within the same session will reset the camera enough to grab a couple more preview frames. This seems related to other users seeing the above error message on Nexus One with Gingerbread. http://code.google.com/p/android/issues/detail?id=15112 http://code.google.com/p/android/issues/detail?id=15801 They claim is it specific to Nexus One, but I can't be certain about my problem, as our Nexus One is our only Gingerbread phone. Additionally, others apps on our phone (Camera, Barcode Scanner, etc.) no longer exhibit this issue, lending me to believe there is a work around. Following the suggestions in the above tickets (specifically, minimizing Camera.Parameters reads) has not solved my problem. At the very least, I need the piece-of-mind that our issue is limited to Gingerbread on Nexus One before a big Gingerbread updates comes to some phone with a larger user base. Suggestions would be greatly appreciated. As would feedback about our app (CheckPoints) on other Gingerbread phones. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] VideoView Problems
I have a video view embedded in a somewhat complex UI. As part of the look, the container of the videoview tends to animate in and out from the sides (but the video isn't visible during the animation). To save some memory when the video container isn't visible, I'm trying to unref that subtree of the view hierarchy. Attempt #1: Unref the entire subtree and inflate later when I need it. VideoView works fine the first time, but after I unref and re-inflate it fails to ever call the onPrepare() listener to trigger well timed playback. Attempt #2: Preserve the VideoView between unrefs, manually adding adding it after each inflate and remove it from its parent before unrefing the subtree of view surrounding it. Works the first time, but will only render a black screen after I add the view back on the second pass. Suggestions on how to fix either problem, or alternatives? (Let me preempt comments on using Activities. The basic Activity structure didn't fit the design, and I've heard horror stories about ActivityGroups, so we didn't do that at first. By and large it what we have works. Even if ActivityGroups are the right solution, I need a quicker fix in the short term.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] bindService() instantiating a second Service instance
When memory profiling my app, I've noticed that multiple instances of the same local service class are getting instantiated. This is not my expectation from my interpretation of the APIs and service example code in the SDKs. My app is designed such that the service represents a data layer, handling all databases, networking, and some potential background operations when the Activity is not in the foreground. The Activity is responsible for starting the service by calling bindService(..) during onResume(..). context.bindService( new Intent( context, MyService.class), service_connection, Context.BIND_AUTO_CREATE ); To allow the memory allocations of the UI/Activity while the Service continues (for a limited amount of time), the Activity call unBindService(..): context.unbindService( service_connection ); To be clear, the Service does not call selfStop() right away. Instead it notes the time of the last unbind and effectively sets a timer. This part of the code is working just fine. Now, when I go in and out of the application, I find I'm binding to a new instance every time I resume the activity. I assumed I would bind to the same Service object each time as long the Service did not stop itself or the process was shutdown for memory reasons. However, my logs and the memory profiler do not show this to be the case. How can I guarantee my process only has one instance of my Service class instanciated, and that the Activity will rebind to existing Service upon Resume? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SSL from Android
What is the preferred way to do SSL on Android? Coming from a long time Java background, I have tended to jump to a https protocol URLConnection: // URL connection channel. HttpURLConnection url_connnection = (HttpURLConnection)url.openConnection(); // Let the RTS know that we want to do output. url_connnection.setDoOutput( true ); // No caching, we want the real thing. url_connnection.setUseCaches( false ); // Send POST output. if( post_params!=null !post_params.isEmpty() ) { uploadPostParameters( post_params, url_connnection ); } // Get Input input_stream = url_connection.getInputStream(); But this code is running into all sorts of problems on varying platforms and OS versions: javax.net.ssl.SSLException: Write error: ssl=0x8f548: I/O error during system call, Broken pipe Empty string responses (no error thrown) with no sign of an external connection on the server logs java.io.IOException: SSL handshake failure: I/O error during system call, Connection reset by peer java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:585 0xaf58a49b:0x) The first two usually go away by repeating it (which is consistent with Android issue 8625). The handshake exceptions do not seem to go away once present. To be clear, this is not a self-signed certificate on my SSL server. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SSL from Android
Above code works from desktop Java. The last error (Failure in SSL library, usually a protocol error: 140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol) was an data service provider redirection without any error. It not an Android issue, but I'd love to know how to detect the error correctly On Nov 23, 11:55 am, Anm andrew.n.marsh...@gmail.com wrote: What is the preferred way to do SSL on Android? Coming from a long time Java background, I have tended to jump to a https protocol URLConnection: // URL connection channel. HttpURLConnection url_connnection = (HttpURLConnection)url.openConnection(); // Let the RTS know that we want to do output. url_connnection.setDoOutput( true ); // No caching, we want the real thing. url_connnection.setUseCaches( false ); // Send POST output. if( post_params!=null !post_params.isEmpty() ) { uploadPostParameters( post_params, url_connnection ); } // Get Input input_stream = url_connection.getInputStream(); But this code is running into all sorts of problems on varying platforms and OS versions: javax.net.ssl.SSLException: Write error: ssl=0x8f548: I/O error during system call, Broken pipe Empty string responses (no error thrown) with no sign of an external connection on the server logs java.io.IOException: SSL handshake failure: I/O error during system call, Connection reset by peer java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:585 0xaf58a49b:0x) The first two usually go away by repeating it (which is consistent with Android issue 8625). The handshake exceptions do not seem to go away once present. To be clear, this is not a self-signed certificate on my SSL server. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Eclipse error on build.xml: Target debug/release does not exist
This is more of an Eclipse error than an Android or Ant error. My Eclipse project won't build because when it sees the build.xml created from the Android command, it starts looking for the debug and release commands. Well, since they are dynamically generated from the setup task, they don't exist. So now Eclipse (Build id: 20100218-1602) locking the project from build/run based on these errors. Okay.. so here is the weird part: It worked this morning. In fact it has been working for weeks with the build.xml file sitting there. All I did was edit the build.xml file in Eclipse (changed some constants). Ant thinks everything is peachy. But I can't build in Eclipse!!! How do I tell Eclipse to ignore these errors? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Eclipse error on build.xml: Target debug/release does not exist
Apparently this is an age old problem: http://groups.google.com/group/android-developers/browse_thread/thread/317ce95facb10435 And annoyingly, it has not been solved with any satisfaction. This has got to be solved On Oct 16, 3:28 pm, Anm andrew.n.marsh...@gmail.com wrote: This is more of an Eclipse error than an Android or Ant error. My Eclipse project won't build because when it sees the build.xml created from the Android command, it starts looking for the debug and release commands. Well, since they are dynamically generated from the setup task, they don't exist. So now Eclipse (Build id: 20100218-1602) locking the project from build/run based on these errors. Okay.. so here is the weird part: It worked this morning. In fact it has been working for weeks with the build.xml file sitting there. All I did was edit the build.xml file in Eclipse (changed some constants). Ant thinks everything is peachy. But I can't build in Eclipse!!! How do I tell Eclipse to ignore these errors? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Eclipse error on build.xml: Target debug/release does not exist
One solution, albeit a bit overreaching, is to disable all buildfile errors. Under Preferences - Ant - Editor, in the tab Problems, check Ignore all buildfile problems. From: http://stackoverflow.com/questions/3941177/skip-eclipse-validation-of-build-xml On Oct 16, 3:43 pm, Anm andrew.n.marsh...@gmail.com wrote: Apparently this is an age old problem: http://groups.google.com/group/android-developers/browse_thread/threa... And annoyingly, it has not been solved with any satisfaction. This has got to be solved On Oct 16, 3:28 pm, Anm andrew.n.marsh...@gmail.com wrote: This is more of an Eclipse error than an Android or Ant error. My Eclipse project won't build because when it sees the build.xml created from the Android command, it starts looking for the debug and release commands. Well, since they are dynamically generated from the setup task, they don't exist. So now Eclipse (Build id: 20100218-1602) locking the project from build/run based on these errors. Okay.. so here is the weird part: It worked this morning. In fact it has been working for weeks with the build.xml file sitting there. All I did was edit the build.xml file in Eclipse (changed some constants). Ant thinks everything is peachy. But I can't build in Eclipse!!! How do I tell Eclipse to ignore these errors? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Resources from gen/ classpath: works in Eclipse, but not Ant
I have a .properties file be generated in the gen/ classpath. Both Eclipse and Ant build tools copy the file to bin/ when compiling. The .apk created by Eclipse works fine. The .apk created by Ant returns null at class.getResourceAsStream(..). Unzipping the .apk's, I see the classpath with file in the Eclipse .apk file but not the Ant built .apk. Decompiling the classes.dex with dedexer, I see Eclipse built file decompiles fine, but the Ant built file fails to decompile with the following exception: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at hu.uw.pallergabor.dedexer.DexAnnotationParser.getAnnotationVisibilityFlag(DexAnnotationParser.java: 251) at hu.uw.pallergabor.dedexer.JasminStyleCodeGenerator.addMethodAnnotation(JasminStyleCodeGenerator.java: 1012) at hu.uw.pallergabor.dedexer.JasminStyleCodeGenerator.generate(JasminStyleCodeGenerator.java: 84) at hu.uw.pallergabor.dedexer.Dedexer.run(Dedexer.java:158) at hu.uw.pallergabor.dedexer.Dedexer.main(Dedexer.java:14) Any idea why the two build tools are treating the file so differently? Background on my non-Android ways: I need a resource loaded before I have a Context in a static initializer. Thus Context.getResources() doesn't help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Ant build with Proguard (per blog) not obfuscating
The timing of this week's blog post was perfect. It was exactly what I intended to do today. And the extra Ant step worked fine, and I can see Proguard obfuscate my files into bin/obf/obfuscated.jar (yes, I tweaked the file names and paths a little bit), the resulting App- release.apk does not include the obfuscated files. My first hint was my stack traces, but I confirmed it with dedexer. Has anyone else verified their .apk? How does the compile step know what .class files to use? (I'm hoping its not assuming some hard coded path.) Anm -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Ant build with Proguard (per blog) not obfuscating
Thanks for the clue. It turns out my problem was where I inserted the XML entity. I place it after setup /, but setup locked the property with the default value before the referenced property task was executed. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: INSTALL_FAILED_MISSING_FEATURE Question
I have also seen uses-features fail only after a uses-library was added. In my case, I was installing an app requiring hardware telephony to be installed on an emulator, which worked without complaint until I added my google maps functionality. Now I've added android:required=false to my telephony uses-feature tag and it runs fine but didn't need that before. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] URL to packaged resource?
I'm trying to include a static help file with my app. I thought I could use a WebView and load a URL. Following the page http://developerlife.com/tutorials/?p=369, it suggests dropping the HTML in /res/raw/ and use a /android_asset/* URL. However, my WebView doesn't like it (Web page not available .. requested file was not found). What is the right way to do this (if there is one)? Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Maximize size for Dialog themed activity?
This worked... @Override protected void onMeasure( int widthMeasureSpec, int heightMeasureSpec ) { super.onMeasure( widthMeasureSpec, heightMeasureSpec ); // // Despite any measurements of children, always assume the maximum available area. // Log.d( TAG, onMeasure( +widthMeasureSpec+, +heightMeasureSpec + ) ); Context context = getContext(); WindowManager wm = (WindowManager)context.getSystemService ( Context.WINDOW_SERVICE ); Display display = wm.getDefaultDisplay(); setMeasuredDimension( display.getWidth(), display.getHeight() ); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] G1 Bug: Google Imported Primary Phones
I just noticed that contacts imported from GMail do not include a default/primary flag on any of the associated phone numbers. This seems counter to the android framework, since when I input a phone number manually on the phone, a phone number is automatically flagged as the primary phone number. Can anyone suggest any work-arounds, from the perspective of Contacts.Phone client that is relying on the primary flag for some functionality? I want to include at least one phone number for every contact in a query, preferring the primary if available. At this point, I'm guessing I'm going to have to manually filter a Cursor that does not include the isprimary==1 selection. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to format data within Cursor before displaying to screen?
A SimpleAdapter is too simple for your case. Try creating a new class that overrides the CursorAdapter, which gives you two methods: newView(..) and bindView(..). You can still use your XML based layout inside newView(..) using the LayoutInflater and findById(..): @Override public View newView( Context context, Cursor cursor, ViewGroup parent ) { LayoutInflater inflater = (LayoutInflater)context.getSystemService( Context.LAYOUT_INFLATER_SERVICE ); View view = inflater.inflate( R.layout.phone_item, null ); bindView( view, context, cursor ); return view; } @Override public void bindView( View view, Context context, Cursor cursor ) { // Bind one cursor value to one sub-view String display_name = INVALID CURSOR; int column = cursor.getColumnIndex( Contacts.Phones.DISPLAY_NAME ); if( column != -1 ) display_name; // Format the returned cursor value here... TextView name_view = (TextView)view.findViewById( R.id.name ); if( name_view != null ) name_view.setText( display_name ); } On Oct 27, 8:01 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I am working on an application that involves displaying dates from my database. I have the dates formatted within my database using the ISO8601 format: -MM-dd'T'HH:mm:ss.SSS. I run my query which returns a cursor. I then map the DATE field within the cursor to my TextView. My issue is that the date is still formatted as -MM- dd'T'HH:mm:ss.SSS. My plan was to convert it back to a Date object and format it as I like, but I don't see where I can intercept the value from the cursor before it is displayed on the TextView... any ideas? Thanks, Vince --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Starting new Activity vs. setContentPane(newView)
On Oct 24, 1:06 pm, Robert K. [EMAIL PROTECTED] wrote: I agree, but as I have understood, freeing up memory would mean that the particular acivity is entirely shut down. The system would do that only if it is absolutely necessary. I doubt if the rest of the application continues working fine in that case. If the appropriate state is saved during onPause(), why wouldn't the rest of the application work when an activity is shut down. And speaking of state, I don't think you want to be using setContentView() to change views, even within a single application. Changing content views for your application will mean the built-in state management will fail. Consider if the users receives a phone call, switches task via notification, or hits the home button. If your activity is closed due to memory constraints, its last saved state may not match the view when your application restarts. Your application will appear broken to a user, loosing state if they multitask. If you still insist on using a single activity, either add all UIs to a single switchable view, or be prepared to write your own state management code. What I really don't like about it for example is that everytime I want to add a new activity, I have to change the Manifest.xml in addition. Then, a 'Resource is out of sync' message appears, sometimes till I restart the computer...that's really annoying... This should not be happening. What development environment are you using? If you're using Eclipse, the resource update should almost been instantaneous. If you're using Ant, I can't imagine why the out of sync message would appear, as the build start a new ant process that should check everything from scratch. I suggest starting a new thread, detailing the Resource is out of sync problem to try to get to the bottom of it. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Join via ContentProvider
jtaylor, Did you read the example? It does not do a joint. Instead it uses a Uri subpath notation for its child query, within the same table rather than joining multiple tables. The references to group in the code are not contact group membership, but rather ExpandableList parent node/groups. On Oct 25, 11:51 am, jtaylor [EMAIL PROTECTED] wrote: ExpandableList2.java has the getChildrenCursor() (in the MyExpandableListAdapter inner class) which has the code for obviously a contentprovider Join. http://code.google.com/android/samples/ApiDemos/src/com/example/andro... - Juan On Oct 25, 2:47 pm, jtaylor [EMAIL PROTECTED] wrote: ExpandableList2.http://code.google.com/android/samples/ApiDemos/src/com/example/andro... - Juan On Oct 24, 3:05 am, Anm [EMAIL PROTECTED] wrote: I'm struggling to understand how to do a join, if its possible, with the decomposed SQL arguments of the ContentProvider APIs. Is there an example out there? Or if not, could some code up a quick example, say joining People with GroupMembership? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Join via ContentProvider
I'm struggling to understand how to do a join, if its possible, with the decomposed SQL arguments of the ContentProvider APIs. Is there an example out there? Or if not, could some code up a quick example, say joining People with GroupMembership? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Join via ContentProvider
On Oct 24, 2:47 am, Evan JIANG [EMAIL PROTECTED] wrote: There's a android.database.CursorJoiner class to join 2 cursors Excellent. Too bad about the sort prerequisite. Looks like we need a SortCursor, since sorting on _id is nearly useless. For my app, I don't expect the results to be long, so the naive approach of listing indices, or reforming the results as a MatrixCursor isn't too bad. But I'm wondering if there might be another algorithm or existing implementation I should be aware of before I dive into my own. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Starting new Activity vs. setContentPane(newView)
It means the system can free up memory from the pieces of your application that aren't in use. Secondly, it means your application is monolithic, preventing other applications from interacting well with your application. If an application is broken into multiple activities, another app (or user, with the help of things like Any Cut) can bookmark a page inside your app, invoking the relevant data. Anm On Oct 24, 10:55 am, Robert K. [EMAIL PROTECTED] wrote: oops, not setContentPane put setContentView :-) On 24 Okt., 19:54, Robert K. [EMAIL PROTECTED] wrote: Question: Why is it better to start a new activity if you want to change screen to a new view (for example to edit some notes on a separate text field)? You could get the same result by taking setContentView(newView) which offers several advantages as far as I can see. Are there any consequences, if I pack every single view of my application into one single activity? Or are both ways equivalent? If yes, I would prefer setContentView(...) for many reasons. Thanks in advance for your answers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting source under Windows (from web interface).
There is a port of git in Cygwin. It works just fine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Create Data Base
Walk through the Notepad example: http://code.google.com/android/intro/tutorial.html Then study the NotesDbAdapter.java file for the specifics of how it creates and interfaces with the database. Anm On Oct 21, 12:53 pm, andrex [EMAIL PROTECTED] wrote: Hi all, i was loking for an example of how to create a date base in sqlitedabase, but I was'n lucky. May someone help me whit that, maybe an example or a document. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ContentProviders and Security of SQL Snippets
Actually.. this was the real point of my message: Anm wrote: I'm wondering if anything exists in the APIs or automatically behind the scenes to sanitize the strings coming into a ContentProvider. In other words, I recognize there are ways around it. I'm wonder if solutions already exist so I don't have to write another. On Oct 18, 6:53 pm, Mark Murphy [EMAIL PROTECTED] wrote: The API makes passing values into the SQLiteDatabase API easy. I would argue that this API is falsely easy, luring into developers into very unsafe practices. Yes it works, but it opens you code up to a number of potential exploits, most of which are much harder to code around than you seem to imply. The problem is that Android will likely becomes several very closely related distribution, both because of various distributions and released versions. Each version can have different parse bugs and semantic interpretations, and any sanitizer would have to re-implement all those nuances. You'll see these types of problems in web development and HTML sanitizers also. In reality, only the specific Android distribution know the precise parse algorithm, and so as much of the sanitizing should be done there. On Oct 18, 7:19 pm, Jeff Hamilton [EMAIL PROTECTED] wrote: If you're using SQLite you can use a ? for constant values and pass the WHERE string directly to SQLite. You then pass in the arguments array, and they are filled in for the ?s post SQL parsing/compilation and treated as raw data. No need to worry about escaping, or even quoting at all. For example, if you wanted to look up student by a name that is coming from an untrusted sourcee you could do this: Cursor c = getContentResolver().query(Students.CONTENT_URI, PROJECTION, Students.NAME + = ?, new String[] { untrustedName }, null); As long as the provider supports this feature you don't have to worry about untrustedName or even escape it. Interesting point, but in the case of the ContentProvider methods, the selection string that places the arguments also comes from the external request. I guess one easy sanitation filter would involve whitelisting allowed selection strings, forcing everything else to be an argument like you demonstrate. You can also do something like design your provider to not accept WHERE clauses at all, and instead use REST style URIs. For example: Uri uri = Uri.withAppendedPath(Students.CONTENT_SEARCH_URI, untrustedName); Cursor c = getContentResolver().query(uri, PROJECTION, null, null, null); and then ensure in the provider that the leaf path node is properly escaped when used to query whatever data source is backing the provider. I've thought about this, and find it somewhat strange. This freedom/ flexibility of defining the selection method is powerful, but the requires the client to have special knowledge about the ContentProvider implementation. Does it prefer URI pathname, URI argument, or SQL clauses? Can it take any mix of them? Seems counter to the point of a open and standard API, but its not that critical since other implementation data seems necessary also (e.g., content URI, column names). I know its too late in the game for this, but given the potential problems, I would have preferred to see the arguments passed in as an abstract syntax trees of those clauses. Simple methods to generate the syntax trees from strings (throwing any parse errors in the client- side code) would allow the client-side code to be nearly as simple. This should preserve the goals making SQL easy, while still allowing other implementations to interpret the syntax in a manner appropriate for their own data-store backing. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SQLite problems: how to use LIKE expression
From the SQLite3 docs: The LIKE operator does a pattern matching comparison. The operand to the right contains the pattern, the left hand operand contains the string to match against the pattern. A percent symbol % in the pattern matches any sequence of zero or more characters in the string. An underscore _ in the pattern matches any single character in the string. Any other character matches itself or it's lower/upper case equivalent (i.e. case-insensitive matching). That said, is the id a text column? I ask because identifiers are so often numerical, which would probably fail a LIKE comparison. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ContentProviders and Security of SQL Snippets
If I understand the ContentProvider API correctly, much of the API comes from passing SQL snippets for projects, selection, sort, etc. This strikes me as particularly dangerous, as these snippets can easily come from malicious, third party apps. http://xkcd.com/327/ comes to mind, but this seems worse, as we're dealing with actual SQL, rather than just string parameters that can be encoded. I'm sure Google has thought about these problems, and I'm wondering if anything exists in the APIs or automatically behind the scenes to sanitize the strings coming into a ContentProvider. I see some discussion about this issue here: http://code.google.com/p/android/issues/detail?id=159 But no follow-up. (It seems strange to me that this security related bug, arising from a fundamental design flaw of a core API is acknowledged as a defect but only marked as Medium priority.) Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] adb Error: ADB server didn't ACK
I have a strange problem with my setup. I went to begin programming this morning, but Eclipse wouldn't start my apps, giving me this error: The connection to adb is down, and a severe error has occurred. It appears I'm not alone, as this unanswered thread asks the same problem: http://groups.google.com/group/android-beginners/browse_thread/thread/7056115ccd57ef68/11b25d4515ca1a5a Outside Eclipse, the emulator runs fine, but adb shell gives me: * daemon not running. starting it now * cannot bind 'tcp:5037' ADB server didn't ACK * failed to start daemon * error: cannot connect to daemon Digging deeper, netstat has a pile ~20 lines like the following: tcp4 32 0 localhost.5037 localhost.62356 CLOSE_WAIT tcp4 0 0 localhost.5037 localhost.59694 CLOSE_WAIT I'm not a networking guru, so I don't know if these are remnants of the adb start attempts, or the underlying problem. Everything worked fine yesterday. I'm running Mac OS X 10.5.5. No other apps show any sign of problems. Ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Eclipse Layout Editor Errors
I have been having repeated errors with the layout editor in the Eclipse plug-in. The first error I have seen involves loading the file: Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml. With the following more detailed message: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.android.ide.eclipse.editors (585). at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java: 125) ... snipped Caused by: org.osgi.framework.BundleException: Exception in com.android.ide.eclipse.editors.EditorsPlugin.start() of bundle com.android.ide.eclipse.editors. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java: 1028) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java: 984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java: 346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java: 265) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java: 400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java: 111) ... 57 more Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) ... snipped to Eclipse classes at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor.loadAndParseRClass(Unknown Source) at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor.projectOpenedWithWorkspace(Unknown Source) at com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.addProjectListener(Unknown Source) at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor.setupMonitor(Unknown Source) at com.android.ide.eclipse.editors.resources.manager.ResourceManager.setup(Unknown Source) at com.android.ide.eclipse.editors.EditorsPlugin.start(Unknown Source) at org.eclipse.osgi.framework.internal.core.BundleContextImpl $2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java: 1003) ... 62 more I'm running on a Mac Intel Core Duo (not a 64-bit Core 2 Duo, and hence no Java 6). I would say that's the problem, except the editors load 50% of the time. If the Eclipse plugin classes were compiled/ distributed in Java 6 class files, they should never have run. The other problem that has been plaguing me more recently is: Eclipse is loading framework information and the Layout library from the SDK folder. relative_layout_1.xmlwill refresh automatically once the process is finished. But it never loads or refreshes. At least this is a step up, as I can open the XML source tab with out jumping through open with... hoops. But it is still really annoying. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Eclipse Layout Editor Errors
I am very definitely using Java 1.5, as I'm using generics and such. Additionally, the Java 1.6 java/javac fail miserably with a Bad CPU type. Apparently, I'm not the only one: http://www.anddev.org/viewtopic.php?p=11577#11642 Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Emulator bug: Intent action/categories is null
When an intention is invoked remotely, such as from the Eclipse plugin, the Intent that invokes the Launcher/Main Activity does have either an action name or a category set. I would expect that the default execution from the emulator would mimic invocation from the Launcher, thus including both ACTION_MAIN and CATEGORY_LAUNCHER (or possibly some CATEGORY_REMOTE). Which leads me to a question: What is the exact process the Eclipse plug-in uses to remotely invoke an application? Is it general enough to invoke any type of Intent? Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MapView API Key??
Is this not it: http://code.google.com/apis/maps/signup.html Same key used by any Google Maps mash-up. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
Hmmm.. I tested it again and the startActivity()/finish() seems to be working now. It may have been an issue with an exception that was thrown in the child activity during initialization. I would launch the app, briefly see the entry-point activity, get a first draw of the child, and then a error dialog. When I clicked past the error dialog, I would see the entry-point activity again, then the child activity, then another error dialog that would close the app. I didn't commit my code at that point and don't remember specifics. But slightly related... Is there anyway to prevent the brief view of the redirecting activity's UI? It seems silly to push through start/resume/pause/stop when the app has already requested a new startActivity() or finish() from onCreate(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AliasActivity: Two Questions
The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AliasActivity: Two Questions
The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Emulator Orientation Change on Mac
fn-7 works perfectly. Didn't know you could by-pass the num-lock for the numeric keypad. On Oct 10, 5:04 pm, Andrew Stadler [EMAIL PROTECTED] wrote: First, boilerplate answer, you can use $ emulator -help-keys to get an up-to-date list of hotkeys in the emulator. Should I be wary of stale docs in general? I've found one or two other things (like talking about Layout, instead of ViewGroup, when customizing components), but I've only been working with the stuff for a couple of weeks. Anm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Emulator Orientation Change on Mac
From the emulator keyboard command docs: Switch to previous layout orientation (for example, portrait, landscape) KEYPAD_7, F11 Switch to next layout orientation (for example, portrait, landscape) KEYPAD_9, F12 These don't seem to work on a Mac. Normally the F11 and F12 keys are already mapped to expose and dashboard, but even if you turn those off, it just beeps at you. While I can test the resulting orientations from the command line arguments, it's looking like I have no way to test change of orientation via the emulator. Can anyone verify that is true? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cannot create new Android Projects
I eventually re-installed Eclipse and the Android plug-ins, but not the SDK, and that fixed the problem. On Oct 6, 2:47 am, Baonq86 [EMAIL PROTECTED] wrote: I have a same problem with you. I have installed again (Android SDK and eclipse) and it works well On Oct 6, 9:52 am, Anm [EMAIL PROTECTED] wrote: Another couple of clarifications to the below message: I have no problems building Java projects. I'm running Ganymede on Mac 10.5. On Oct 5, 11:01 am, Anm [EMAIL PROTECTED] wrote: My Eclipse framework no longer create new Android Projects. I get the following error: Cannot create linked resource '/.org.eclipse.jdt.core.external/ folders/.link0'. The parent resource is not accessible. After clicking past the error, I see a stub project with three errors: one.test.Main does not extend android.app.Activity AndroidManifest.xml 1Test line 8 Android Problem The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project 1Test Unknown Java Problem The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files R.java 1Test/src/one/test line 1 Java Problem Looking at the project properties, I see there is no Android Library in the build paths. I also don't know how to fix this manually. (When adding a library, none of the options lists Android Library as an option. Nor does copying the library from other working project seem to work.) And just to be clear, I check the plugin preferences and made sure the path to the Android SDK is correct. Help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Cannot create new Android Projects
My Eclipse framework no longer create new Android Projects. I get the following error: Cannot create linked resource '/.org.eclipse.jdt.core.external/ folders/.link0'. The parent resource is not accessible. After clicking past the error, I see a stub project with three errors: one.test.Main does not extend android.app.Activity AndroidManifest.xml 1Test line 8 Android Problem The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project 1Test Unknown Java Problem The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files R.java 1Test/src/one/test line 1 Java Problem Looking at the project properties, I see there is no Android Library in the build paths. I also don't know how to fix this manually. (When adding a library, none of the options lists Android Library as an option. Nor does copying the library from other working project seem to work.) And just to be clear, I check the plugin preferences and made sure the path to the Android SDK is correct. Help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cannot create new Android Projects
Another couple of clarifications to the below message: I have no problems building Java projects. I'm running Ganymede on Mac 10.5. On Oct 5, 11:01 am, Anm [EMAIL PROTECTED] wrote: My Eclipse framework no longer create new Android Projects. I get the following error: Cannot create linked resource '/.org.eclipse.jdt.core.external/ folders/.link0'. The parent resource is not accessible. After clicking past the error, I see a stub project with three errors: one.test.Main does not extend android.app.Activity AndroidManifest.xml 1Test line 8 Android Problem The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project 1Test Unknown Java Problem The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files R.java 1Test/src/one/test line 1 Java Problem Looking at the project properties, I see there is no Android Library in the build paths. I also don't know how to fix this manually. (When adding a library, none of the options lists Android Library as an option. Nor does copying the library from other working project seem to work.) And just to be clear, I check the plugin preferences and made sure the path to the Android SDK is correct. Help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---