Re: [android-developers] Re: How to know a view size before it's rendered
http://developer.android.com/reference/android/view/View.html#onMeasure(int, int) On Sun, Apr 11, 2010 at 7:56 AM, Kumar Bibek coomar@gmail.com wrote: I don't think you can get those before they are rendered. The final bounds will be decided only after the view is rendered, which might be different on different screen sizes, of course unless , the views are hard-coded with pixel sizes. Thanks and Regards, Kumar Bibek On Apr 11, 3:09 am, Mickey michele.pri...@gmail.com wrote: Hi There, I'm a beginner of Android and I'm trying to understand how I can get the size of a View (or a ViewGroup) before this is rendered on the screen. What I'm trying to achieve is to apply some animations on some child views and it would be great if there's a way to know in advance the size of the parent view (ViewGroup) or any other child view before this is displayed on the screen so that I can set some animations' settings based on the measurements of other View objects. At the moment, some animations' settings are hard coded which I don't like at all and I only discovered that I can get the parent view measurements (height and width) after the ViewGroup is displayed. I couldn't find any obvious method or callback and I'm wondering if there's any or amy technique useful to achieve my goal. Thanks in advance for any help. Mickey -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 To unsubscribe, reply using remove me as the subject. -- When I raise my flashing sword, and my hand takes hold on judgment, I will take vengeance upon mine enemies, and I will repay those who haze me. Oh, Lord, raise me to Thy right hand and count me among Thy saints. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Steps to transfer a simple object from server to android using XML
Hi, I just tried reading a tutorial and created my app using SAX but its not working for some reason and I have no idea why :) Could some one try helping me Thanks in advance, raqz On Apr 11, 12:23 am, raqz abdulraqee...@gmail.com wrote: Hi, Could some one please tell me the basic steps that are required to transfer a list of objects from a webserver to android and vice versa using XML. I searched tutorials but found tutorials only for complex RSS feeds or something like that. Thanks, Raqeeb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: layout on top of the InCallScreen
No way you can do this. Thanks and Regards, Kumar Bibek On Apr 11, 10:01 am, sleith raysle...@gmail.com wrote: Hi, i use the PhoneStateListener to listen for the call. When i receive ringing state, i tried to launch an intent to run my app. but i noticed that my app is go behind the InCallScreen. I've tried using delay time to make the InCallScreen pop up first, then launched my app, but still cannot replace on top of the InCallScreen layer. I have to hang up the call in order to see my app. Could someone help me? 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Text color in fast scroll SectionIndexer box
Use this property for your ListView android:cacheColorHint=# Thanks and Regards, Kumar Bibek On Apr 10, 6:55 pm, EPecorari emanuele.pecor...@gmail.com wrote: Hi, I have a ListView with the fast scroll enabled. The background of the listview is white and the text is black. The box indicating the letter of the section is being scrolled at the moment is in black. Is it possible to customize that colore and turn to white? If yes, how can I do that? Thanks Emanuele -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: How to know a view size before it's rendered
Hi, I find really hard to imagine that there's no way to know the actual Views' size before they are displayed. I was expecting a sort of callback method on the Activity class or any listener on the View (or ViewGroup) to be implemeted so that I can get the size of UI components. Anyway, I found a sort of workaround which in the onCreate method of an Activity, I'll get a reference to the Display object thorugh the WindowManager display = this.getWindowManager().getDefaultDisplay(); Once I got the display, I can get the width and height of it and with that I can tweak some settings of some animations I want to apply on some UI components. Ideally, a callback method on the Activity which allows to know the actual size of UI components just before they are displayed would be preferred. Thanks, Mickey On 11 Apr, 07:51, Martin Obreshkov manig...@gmail.com wrote: http://developer.android.com/reference/android/view/View.html#onMeasu..., int) On Sun, Apr 11, 2010 at 7:56 AM, Kumar Bibek coomar@gmail.com wrote: I don't think you can get those before they are rendered. The final bounds will be decided only after the view is rendered, which might be different on different screen sizes, of course unless , the views are hard-coded with pixel sizes. Thanks and Regards, Kumar Bibek On Apr 11, 3:09 am, Mickey michele.pri...@gmail.com wrote: Hi There, I'm a beginner of Android and I'm trying to understand how I can get the size of a View (or a ViewGroup) before this is rendered on the screen. What I'm trying to achieve is to apply some animations on some child views and it would be great if there's a way to know in advance the size of the parent view (ViewGroup) or any other child view before this is displayed on the screen so that I can set some animations' settings based on the measurements of other View objects. At the moment, some animations' settings are hard coded which I don't like at all and I only discovered that I can get the parent view measurements (height and width) after the ViewGroup is displayed. I couldn't find any obvious method or callback and I'm wondering if there's any or amy technique useful to achieve my goal. Thanks in advance for any help. Mickey -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 To unsubscribe, reply using remove me as the subject. -- When I raise my flashing sword, and my hand takes hold on judgment, I will take vengeance upon mine enemies, and I will repay those who haze me. Oh, Lord, raise me to Thy right hand and count me among Thy saints. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Social Gaming Platforms
I'm looking for cross-platform social gaming platforms, essentially for high-scores and achievements but also for multi-player. Basically I came across two solutions: - ScoreLoop (http://www.scoreloop.com): lots of features but is closed for new developers (temporarily?) - Casmul (http://www.casmul.net): less features and looks a bit... amateur. Can any of you advise me on the previous platforms, or alternatives? 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 To unsubscribe, reply using remove me as the subject.
Re: [android-developers] Re: How to know a view size before it's rendered
Mickey wrote: I was expecting a sort of callback method on the Activity class or any listener on the View (or ViewGroup) to be implemeted so that I can get the size of UI components. There are callbacks on View for this, onLayout() and onMeasure(). If you need to implement custom layout rules that need to know the sizes of widgets, the official answer is to write your own layout class (subclass of ViewGroup) that incorporates those rules, and there you can get the sizes you need. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: How do I get the MD5 fingerprint of my application certificate through code?
I'm curious as to whether these are always the same, or generated for us and unique to each SDK install, but I'm not going to look just now. It definitely varies - I use several boxes for development (my older laptop retired to mother in law house ;) ) and I have to uninstall apps compiled with debug keys before I can start them from other box. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] 'Squeezing' a button on the right side
Hi, you probably heard similar problems before but i can't figure out how to do this programatically. I have a vertical layout with FILL_PARENT on both dimensions. In it i have multiple horizontal layouts with FILL_PARENT width and WRAP_CONTENT height. In each of these horizontal layouts i want to put a checkbox on the left and an ImageButton on the right. The problem is i can't stop the checkbox from growing to the point of pushing the ImageButton out of view.. (same thing happens when the checkbox has FILL_PARENT or WRAP_CONTENT widths). For individual stuff i managed to do it in the XML layout very easily: ...something... android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight=1 / ...something... android:layout_width=wrap_content android:layout_height=wrap_content / Same thing doesn't work programatically though, and i've tried other gravity, weight, layout combinations.. Can someone who tried this tell me how they did it, or how it should be done? Thanks, Teo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] WiFi data transfer stalls as soon as screen becomes blank
Hello everyone, I am currently trying to figure out how to fix an annoying bug in Sipdroid [1], which seems to be triggered by a power management optimization in Android 2.1: While a SIP (VoIP) call is in progress via WiFi, the data transfer becomes unreliable (and basically stalls) as soon as the display goes blank after the display timeout or proximity sensor has been triggered. As soon as the display comes back (by hitting the power button or releasing the proximity sensor) the data transfer reverts back to normal. Currently, the only possible workaround seems to be to acquire a PowerManager.SCREEN_DIM_WAKE_LOCK for the duration of the call, which reliably prevents the issue from surfacing. Still, I think it would be beneficial to come up with a solution that allows the screen to become blank (if only for reducing battery consumption). I already tried getting a WifiManager.WIFI_MODE_FULL to no avail. Any hint how to sort this out is much appreciated! Thanks, Thilo [1] http://sipdroid.org/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Steps to transfer a simple object from server to android using XML
Hi raqz, I saw your previous post in that you were sending lists of friends via serialization and were advised to use xml instead. Instead of XML you could also use JSON as it is more lightweight than using XML and doesn't take long to implement. I was using XML as my back end for my database to communicate with my application but I changed it all to JSON and haven't looked back since. Here is an article on parsing JSON with Java http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/ Read through that and it should give you some ideas. There is an article on getting JSON back from the server but I can't find that at moment. Will try and dig it out though. Regards Anthoni On Apr 11, 8:50 am, raqz abdulraqee...@gmail.com wrote: Hi, I just tried reading a tutorial and created my app using SAX but its not working for some reason and I have no idea why :) Could some one try helping me Thanks in advance, raqz On Apr 11, 12:23 am, raqz abdulraqee...@gmail.com wrote: Hi, Could some one please tell me the basic steps that are required to transfer a list of objects from a webserver to android and vice versa using XML. I searched tutorials but found tutorials only for complex RSS feeds or something like that. Thanks, Raqeeb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Thread always seem to throw exceptions although no erros in program
Hello, I use a thread for drawing to the canvas. By coincidence I recognized that in the program always jumps into the finally part. After view.onDraw(c); is reached it steps back to synchronized (surfaceHolder) and then it steps into the finally part. This happens every time. This means to me that every time exceptions are thrown. Can anybody explain why this is so? public class GameThread extends Thread { private SurfaceHolder surfaceHolder; private boolean isRunning = false; private GameView view; private long tickFrequency; private long lastTick = System.currentTimeMillis(); private int framesPerSecond = 25; public GameThread(SurfaceHolder surfaceHolder, Context context, Handler handler, GameView view) { this.surfaceHolder = surfaceHolder; this.view = view; tickFrequency = 1000 / framesPerSecond; } //Speed should be 25 frames per second //1 Frame per 40 ms @Override public void run() { Canvas c; while (isRunning) { c = null; //updatePhysics(); if (System.currentTimeMillis() lastTick + tickFrequency) { long timeDiff = System.currentTimeMillis() - (lastTick + tickFrequency); try { c = surfaceHolder.lockCanvas(null); synchronized (surfaceHolder) { view.onDraw(c); } } finally { //do this in a finally so that if an exception is thrown during the above we don't leave the if (c != null) { //surface in an inconsistent state surfaceHolder.unlockCanvasAndPost(c); } } lastTick = System.currentTimeMillis() - timeDiff; } } } public void setRunning(boolean run) { isRunning = run; } } 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Internal links in Webview
Hi, Just to interject. Mark explains this beautifully in his book 'Beginning Android', but even more in his PDF books and it is what I use for my details page for items in my database. Basically I have a front activity that shows a search box, that then populates a listview with the headers. The user then clicks a header and the details are retrieved from the database and parsed into a WebView on a separate activity. Inside this WebView I have 'internal' links that allow me to retrieve yet more information that the user might want to know. I do it this way so it doesn't put unnecessary strain on both my database and the users phone. His books are amazing for learning all the nuances of the Android system, so much so I've only had to ask here once about a problem I was having, but that was my mistake lol. Kudos to Mark. Regards Anthoni On Apr 10, 10:46 am, Farha Ansari farha45ans...@gmail.com wrote: I used onPageStarted() as on any link click, it comes here, this is where we can do any related task. This is what I have used. On Apr 8, 9:58 pm, nikhil nik...@gmail.com wrote: Hey Farha, Did you find out ? On Mar 24, 1:36 am, Farha Ansari farha45ans...@gmail.com wrote: How can we find out when we click an internallinkinWebvIew? Thanks, Farha- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Thread always seem to throw exceptions although no erros in program
Hi, A bit of misunderstanding on your part about the try-catch-finally :) Finally is where you put code you want to execute no matter what happened before, exception or not. Catch is the code executed only when an exception occurs Try is what you want to execute but might trigger an exception. See java : http://www.janeg.ca/scjp/flow/try.html Yahel On 11 avr, 15:15, Bevor andr...@pithax.net wrote: Hello, I use a thread for drawing to the canvas. By coincidence I recognized that in the program always jumps into the finally part. After view.onDraw(c); is reached it steps back to synchronized (surfaceHolder) and then it steps into the finally part. This happens every time. This means to me that every time exceptions are thrown. Can anybody explain why this is so? public class GameThread extends Thread { private SurfaceHolder surfaceHolder; private boolean isRunning = false; private GameView view; private long tickFrequency; private long lastTick = System.currentTimeMillis(); private int framesPerSecond = 25; public GameThread(SurfaceHolder surfaceHolder, Context context, Handler handler, GameView view) { this.surfaceHolder = surfaceHolder; this.view = view; tickFrequency = 1000 / framesPerSecond; } //Speed should be 25 frames per second //1 Frame per 40 ms @Override public void run() { Canvas c; while (isRunning) { c = null; //updatePhysics(); if (System.currentTimeMillis() lastTick + tickFrequency) { long timeDiff = System.currentTimeMillis() - (lastTick + tickFrequency); try { c = surfaceHolder.lockCanvas(null); synchronized (surfaceHolder) { view.onDraw(c); } } finally { //do this in a finally so that if an exception is thrown during the above we don't leave the if (c != null) { //surface in an inconsistent state surfaceHolder.unlockCanvasAndPost(c); } } lastTick = System.currentTimeMillis() - timeDiff; } } } public void setRunning(boolean run) { isRunning = run; } } 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Out of memory and no useful stack trace
My android app is getting an Out of memory error without a useful stack trace. It occurs after I have repeatedly re-invoked its main logic through a menu interaction, which leads me to believe that there's a memory leak somewhere. I say that the stack trace isn't useful because it doesn't include references to any of my own code. There are no references to my own code in the logcat output, either. I'm wondering if any of you can help me figure out where my memory leak might be occurring, given my stack trace and my logcat output. Here's the stack trace: Thread [3 main] (Suspended (exception OutOfMemoryError)) ViewRoot.handleMessage(Message) line: 1716 ViewRoot(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4203 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 791 ZygoteInit.main(String[]) line: 549 NativeStart.main(String[]) line: not available [native method] ... and here's the logcat output: [ ... lots of repetitions of the following WARN messages as I repeatedly invoke my app's main logic via a menu selection ... ] 04-11 09:27:35.341: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@4398a268 04-11 09:27:35.842: WARN/KeyCharacterMap(5262): No keyboard for id 0 04-11 09:27:35.852: WARN/KeyCharacterMap(5262): Using default keymap: / system/usr/keychars/qwerty.kcm.bin 04-11 09:27:36.852: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@439c3f38 04-11 09:27:38.782: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@43909130 04-11 09:27:39.392: WARN/KeyCharacterMap(5262): No keyboard for id 0 04-11 09:27:39.392: WARN/KeyCharacterMap(5262): Using default keymap: / system/usr/keychars/qwerty.kcm.bin 04-11 09:27:40.332: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@43996c88 04-11 09:27:41.931: ERROR/dalvikvm-heap(5262): 345600-byte external allocation too large for this process. 04-11 09:27:41.931: ERROR/(5262): VM won't let us allocate 345600 bytes Could my error be related to the Window already focused ... warnings? If so, how can I find out what is causing these? I know that I could sprinkle my code with lots of calls to Log.v() in order to zero in on where my problem might be occurring, but I'm wondering if there is a better way to get more meaningful information about the cause of my memory leak. Thanks in advance for any suggestions. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Service vs Singleton
An Android application (APK) may consist of more than one Activity, more than one Service. Each Activity or Service can run in its own process, can share a process or are run in the process of the calling Activity (and the calling Activity may not even be part of your application: e.g. the Contact app asking the Gallery app for a picture). You can define your app's (APK's) manifest file to have certain activities/services run in their own processes or to just share the process of any calling activity. The process here is a process running on the Linux kernel. On Apr 10, 10:25 pm, Jason LeBlanc jasonalebl...@gmail.com wrote: Since process != application.. just what are the distinctions? On Fri, Apr 9, 2010 at 5:06 PM, Bob Kerns r...@acm.org wrote: Just to point out a couple more things here. 1) a Service's lifetime is NOT, in general, the same as an Application's lifetime. A service can be deleted when it's not in active use by any activity or intent. This can save memory. 2) Under some circumstances, more than one application may be running in the same process. You won't be encountering those situations by accident, but it's an important part of the model nonetheless. In Android, process != application. 3) By using a service, you get control over when and how your service gets restarted if your application and process get deleted in a low- memory situation. Services will be automatically restarted. Applications, and any singletons they manage, will not, unless they're required by a service being restarted! In a sense, your service continues to exist even when there's no process available to run it in.Once a process is available, your service is recreated and resumed. (This applies to services started with startService rather than binding. But if you want this, you can do both operations on the same service). On Apr 9, 10:49 am, Mark Murphy mmur...@commonsware.com wrote: ailinykh wrote: What do mean by when all components of an Android application are destroyed? Let's talk about Activity, for example. Does destroy Activity means unload Java class? No, I mean destroyed, as in onDestroy(). If so, what happens when system tries to destroy activity but it is referenced by another object ( for instance, a singleton may keep reference to it) ? The component is destroyed from an Android standpoint, but the Activity will not be garbage collected. This results in a memory leak and is why mutable static data members should be avoided where possible. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. 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- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Google Checkout Merchant Account for Swiss Developer/Seller
Maybe only a Googler can answer the following questions: - Is some working on activating Google Checkout Merchant Accounts for Swiss developers? - If so, when will it be ready? I have posted a similar question on the Android Market forum, without an answer yet: http://www.google.com/support/forum/p/Android+Market/thread?tid=4be499ce429adde3hl=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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Thread always seem to throw exceptions although no erros in program
Hello, Thanks for your answer, you are right. it seems that I forget Java anyhow. Best 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Bug in Android framework connecting to url?
I tried many different ways to connect to this url link but android keeps crashing saying the stack is corrupted, take a look. If anyone got the time on their hands to give it a try or give me some tips would appreciate it! :) Link does work try it on winamp or some music app... URL: http://aac.jetcitylounge.groovera.com/ Log Output: 04-11 10:30:17.908: DEBUG/dalvikvm(15329): [ 04-11 10:30:20.119 15329:0x3beb F/unknown ] 04-11 10:30:17.908: DEBUG/dalvikvm(15329): stack corruption detected: aborted Used code to connect: URLConnection cn = null; URL url = new URL(_url); cn = url.openConnection(); // after openConnection() it crashes -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
Re: [android-developers] Bug in Android framework connecting to url?
Can u try this: String _url; URL url; url = new URL(_url); HttpURLConnection connection = (HttpURLConnection)url.openConnection(); The above code works for me. Thanks, Prajakta On Sun, Apr 11, 2010 at 7:36 AM, Moto medicalsou...@gmail.com wrote: I tried many different ways to connect to this url link but android keeps crashing saying the stack is corrupted, take a look. If anyone got the time on their hands to give it a try or give me some tips would appreciate it! :) Link does work try it on winamp or some music app... URL: http://aac.jetcitylounge.groovera.com/ Log Output: 04-11 10:30:17.908: DEBUG/dalvikvm(15329): [ 04-11 10:30:20.119 15329:0x3beb F/unknown ] 04-11 10:30:17.908: DEBUG/dalvikvm(15329): stack corruption detected: aborted Used code to connect: URLConnection cn = null; URL url = new URL(_url); cn = url.openConnection(); // after openConnection() it crashes -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 To unsubscribe, reply using remove me as the subject. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Progress Bar in every row of ListView
Hi, I am trying to have a progress bar in every row of my list view. My list is an iconic list view and have implemented it in the lazy loading way..so i want to display a progress bar (spinning progress bar) till the images are not loaded. My current approach is that i hv placed the progress bar in the layout and in my code in the getView method i dismiss it when the image is loaded. However this seems to work properly only for the first row of the list view. The progress bars are visible on the rest of the rows even if the image is loaded and only when i scroll the list do the progress bars disappear so i am assuming this is something to do with refreshing the list view. So I have tried using notifyDataSetChanged in my getView but it is not helping. Please can anyone let me know if they have worked on anything similar to this. Thanks, Prajakta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Social Gaming Platforms
Tapjoy (http://www.tapjoy.com) now supports Android. They look pretty solid. Rob On Apr 11, 6:10 am, Maurício pmauricio.co...@gmail.com wrote: I'm looking for cross-platform social gaming platforms, essentially for high-scores and achievements but also for multi-player. Basically I came across two solutions: - ScoreLoop (http://www.scoreloop.com):lots of features but is closed for new developers (temporarily?) - Casmul (http://www.casmul.net):less features and looks a bit... amateur. Can any of you advise me on the previous platforms, or alternatives? Thanks -- Rob Mazur http://droiddojo.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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Progress Bar in every row of ListView
I'm also interested in this. I've been able to load a different image in place of the initial image, and then replace it when the background processing is completed. However, I would really like to show an indeterminate progress bar instead of an image. J On Apr 11, 9:48 am, praj prajakt...@gmail.com wrote: Hi, I am trying to have a progress bar in every row of my list view. My list is an iconic list view and have implemented it in the lazy loading way..so i want to display a progress bar (spinning progress bar) till the images are not loaded. My current approach is that i hv placed the progress bar in the layout and in my code in the getView method i dismiss it when the image is loaded. However this seems to work properly only for the first row of the list view. The progress bars are visible on the rest of the rows even if the image is loaded and only when i scroll the list do the progress bars disappear so i am assuming this is something to do with refreshing the list view. So I have tried using notifyDataSetChanged in my getView but it is not helping. Please can anyone let me know if they have worked on anything similar to this. Thanks, Prajakta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Is SignalStrength readable outside onSignalStrengthschanged?
With SDK 2.1 it is possible to get some additional signalstrength information in the Phonestatelisteners onSignalStrengthsChanged event. That works, but I need to monitor the signalstrength more accurate. onSignalStrengthsCanged is only fired if one of the four signal bars of the signalstrength indicator have changed. So I tried this outside: SignalStrength sig new SignalStrength(); rxl = sig.getGsmSignalStrength(); But it tells me that SignalStrength() is not visible. Why is that? The funny thing is, that the NeighbouringCellInfo gives me the Signalstrength of the neighbourcells every second, if I want. But the serving cell is updated very badly. Also I can use getGsmBitErrorRate() only in onSignalStrengthsChanged. That makes no sense, because the quality of the signal is largely independent of the strength. So is there a change of getting the actual signalstrenth outside onSignalStrengthsChanged? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Bug in Android framework connecting to url?
Yeah that code doesn't work... Are you testing on an emulator? I used a Droid with 2.1 and when testing with a G1 with 1.6 it gracefully gives me an http error code 403 Forbidden Access is forbidden to the requested page So my guess Android 2.1 has a bug handling http error codes.. Anyone can confirm this? -Moto On Apr 11, 10:41 am, Prajakta Shitole prajakt...@gmail.com wrote: Can u try this: String _url; URL url; url = new URL(_url); HttpURLConnection connection = (HttpURLConnection)url.openConnection(); The above code works for me. Thanks, Prajakta On Sun, Apr 11, 2010 at 7:36 AM, Moto medicalsou...@gmail.com wrote: I tried many different ways to connect to this url link but android keeps crashing saying the stack is corrupted, take a look. If anyone got the time on their hands to give it a try or give me some tips would appreciate it! :) Link does work try it on winamp or some music app... URL: http://aac.jetcitylounge.groovera.com/ Log Output: 04-11 10:30:17.908: DEBUG/dalvikvm(15329): [ 04-11 10:30:20.119 15329:0x3beb F/unknown ] 04-11 10:30:17.908: DEBUG/dalvikvm(15329): stack corruption detected: aborted Used code to connect: URLConnection cn = null; URL url = new URL(_url); cn = url.openConnection(); // after openConnection() it crashes -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 To unsubscribe, reply using remove me as the subject. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Unable to get a reference to included layout...
I'm trying to get a handle to an included LinearLayout to my activities layout. Using the given id simply returns null. Log.i(TEST,V: +this.findViewById(R.id.userAdvance)); I want to have control over the included layout so that I can set it's view to GONE or VISIBLE. shared layout settings_advance_users.xml: merge xmlns:android=http://schemas.android.com/apk/res/android; LinearLayout android:id=@+id/settingsUserExpBlock android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical !-- Some content -- /LinearLayout /merge activity layout: include android:id=@+id/userAdvance layout=@layout/ settings_advance_users / Thanks! Moto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dvalve! we called the heart of outsourcing world. Dvalve.com
Dvalve! we called the heart of outsourcing world. Dvalve.com is an online talent workplace that helps companies hire and manage professionals online to get work done and grow their businesses. Dvalve matches employers with a ready and qualified workforce and rated, tested professionals with technical, marketing and business skills. Dvalve also provides the online workplace and tools to manage and pay remote professionals and teams online. Contractors and service providers around the world use Dvalve to meet employers and get paid for delivering great results.VISIT WWW.DVALVE.COM FOR YOUR OUTSOURCE BUSINESS NEEDS, SEE HOW FAST YOUR JOBS DONE WITH QUALITY AND SECURITY.Dvalve a real virtual outsourcing ThinkTank. Waiting for your valued participation.DVALVE TEAM Welcomes freelancers, web designers. programmers, developers, designers, business guys and all corporate and IT peoples TO WORK WITH US Please Register as per your skills and wait for our Interview call. You can register as a Service Provider or as a Buyer Account. Buyer will get tie up Offers and providers will catch Jobs!. One dice for all. Regards Dvalve Team www.dvalve.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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Out of memory and no useful stack trace
OutofMemory errors are very rare and will pop up if you are really creating too many variables in a short span of time, or you are creating a really really large object, for instance, a Bitmap object of a big image file, or while creating a DOM object of a really large XML. 04-11 09:27:41.931: ERROR/(5262): VM won't let us allocate 345600 bytes This is where the error starts May be some more logcat output will help. Thanks and Regards, Kumar Bibek. On Apr 11, 6:44 pm, HippoMan hippo.mail...@gmail.com wrote: My android app is getting an Out of memory error without a useful stack trace. It occurs after I have repeatedly re-invoked its main logic through a menu interaction, which leads me to believe that there's a memory leak somewhere. I say that the stack trace isn't useful because it doesn't include references to any of my own code. There are no references to my own code in the logcat output, either. I'm wondering if any of you can help me figure out where my memory leak might be occurring, given my stack trace and my logcat output. Here's the stack trace: Thread [3 main] (Suspended (exception OutOfMemoryError)) ViewRoot.handleMessage(Message) line: 1716 ViewRoot(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4203 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 791 ZygoteInit.main(String[]) line: 549 NativeStart.main(String[]) line: not available [native method] ... and here's the logcat output: [ ... lots of repetitions of the following WARN messages as I repeatedly invoke my app's main logic via a menu selection ... ] 04-11 09:27:35.341: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@4398a268 04-11 09:27:35.842: WARN/KeyCharacterMap(5262): No keyboard for id 0 04-11 09:27:35.852: WARN/KeyCharacterMap(5262): Using default keymap: / system/usr/keychars/qwerty.kcm.bin 04-11 09:27:36.852: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@439c3f38 04-11 09:27:38.782: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@43909130 04-11 09:27:39.392: WARN/KeyCharacterMap(5262): No keyboard for id 0 04-11 09:27:39.392: WARN/KeyCharacterMap(5262): Using default keymap: / system/usr/keychars/qwerty.kcm.bin 04-11 09:27:40.332: WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@43996c88 04-11 09:27:41.931: ERROR/dalvikvm-heap(5262): 345600-byte external allocation too large for this process. 04-11 09:27:41.931: ERROR/(5262): VM won't let us allocate 345600 bytes Could my error be related to the Window already focused ... warnings? If so, how can I find out what is causing these? I know that I could sprinkle my code with lots of calls to Log.v() in order to zero in on where my problem might be occurring, but I'm wondering if there is a better way to get more meaningful information about the cause of my memory leak. Thanks in advance for any suggestions. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: any lawyer types out there that can get this site down?
On Apr 8, 6:59 pm, Guess Who, You Probably have my Number nnarb...@gmail.com wrote: I did. But I am know internet genius. Just me and a friend trying to make a quick buck a while ago. Never thought it would actually work! made a couple hundred. Called it quits. Working on other projects. My info is not on record with them. If you look at where he got this info and when it says it was last updatedjan-26th It shows itslef as out dated. You created site whose sole purpose was to steal from us. You get zero pity from us, whether or not you still run it. Now you claim you don't run it any more. One question: who did you sell it to? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: 'Squeezing' a button on the right side
Have you read the similar layout example at http://developer.android.com/intl/de/resources/articles/layout-tricks-efficiency.html ? - Greg On Apr 11, 8:39 am, Teo [GD API Guru] teomina...@gmail.com wrote: Hi, you probably heard similar problems before but i can't figure out how to do this programatically. I have a vertical layout with FILL_PARENT on both dimensions. In it i have multiple horizontal layouts with FILL_PARENT width and WRAP_CONTENT height. In each of these horizontal layouts i want to put a checkbox on the left and an ImageButton on the right. The problem is i can't stop the checkbox from growing to the point of pushing the ImageButton out of view.. (same thing happens when the checkbox has FILL_PARENT or WRAP_CONTENT widths). For individual stuff i managed to do it in the XML layout very easily: ...something... android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight=1 / ...something... android:layout_width=wrap_content android:layout_height=wrap_content / Same thing doesn't work programatically though, and i've tried other gravity, weight, layout combinations.. Can someone who tried this tell me how they did it, or how it should be done? Thanks, Teo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Generating a static HashMap from resources?
In my app, I'd like to define some static resources in an xml file which can be accessed via a HashMap. I know I can do this at run time in a manner similar to the one which is described here: http://groups.google.com/group/android-developers/browse_thread/thread/6232ee60944890e8/895415654ccbc21f?lnk=gstq=hashmap+resources#msg_895415654ccbc21f However, since my HashMap will be a non-changing resource, I'd like to precompile my xml into a static HashMap in a manner that is similar to how the aapt utility precomplies the data in various xml files into R.java. Furthermore, I'd like the keys and values to be expandable via the @+id/item convention, as follows ... Suppose the following items exist in strings.xml: string name=string0foo/string string name=string1bar/string string name=string2quack/string string name=string3oink/string Then, I would like to be able to do something like this in order to specify my static HashMap: ?xml version=1.0 encoding=utf-8? map name=mymap element name=@+id/string0foo-item/element element name=abc@+id/string1/element element name=@+id/string2@+id/string3/element /map The resulting generated code in R.java would look something like this: public static final class map { public static final MapString , String mymap = new ConcurrentHashMapString , String() {{ put(foo, foo-item); put(abc, bar); put(quack, oink); }}; } Is there a way to do anything even remotely similar to this under Android, perhaps using aadb? Or am I out of luck? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Generating a static HashMap from resources?
OOPS: I wrote aadb, above, but I meant to type aapt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic
No, we're not arguing semantics, we're agreeing. We were both responding to Miguel. (You did leave out being blocked in an IO call, but that's a minor detail). On Apr 10, 6:56 pm, Robert Green rbgrn@gmail.com wrote: Bob, Perhaps we're just arguing semantics. I was simply saying that you can only call a thread idle when it is in wait() or sleep(), neither of which consume any CPU. If it is in any other state, it is not idle. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic
You say: So, say I have the game loop logic in a thread like that, using the render fps average as a counter, I've noticed that the fps drops when using more than one thread, even if it's just running in an empty loop. Um, ESPECIALLY if it's running in an empty loop. The point is, you don't want it to run AT ALL unless it has something to do. Handler is one way to do this. Sleep never helps you do this, UNLESS something to do is purely based on time. What your code below is doing is called polling. Polling is the technique of last resort, because your thread has to wake up periodically even if there's nothing to do. That may not be serious -- and sometimes it's your only choice. But the ideal is to block, waiting to be told there's actual work to do. I remember timing this was I would constantly send network data to the network thread with a timestamp, then I would check how long it took for that message to make it to the game loop by determining the time difference. This doesn't sound like a good way to measure, as there are too many variables. If you created the timestamp at the point of sending it to the handler, and how long it took before the handler began executing, you'd have a valid measurement of the latency. However, even latency is not telling you efficiency. Using a Handler does not involve creating a thread, so I'm not sure why you mention that you use a thread pool. Indeed, if you're using multiple threads to do intermittent work, a thread pool is a good idea. However, since you have only one main processor, if you're doing work that doesn't block, you may find no advantage, and even a small performance DECREASE, by having more than one thread in your pool! (There can be other reasons to have more than one thread, however; I'm just discussing performance). Handler is presumably doing something like this to queue: synchronized (m_actions) { m_actions.add(r); m_actions.notify(); } And something like this to pull from the queue and execute: while (true) { Runnable action = null; synchronized (m_actions) { while (m_actions.isEmpty()) { try { m_actions.wait(); } catch (InterruptedException e) { } } action = m_actions.remove(); } action.run(); } When there's nothing to do, the thread is waiting in the wait() call, not running, not consuming any CPU. (It does consume some significant memory; idle threads are not free!) (Don't worry about that inner loop and catch of InterruptedException -- nobody will be interrupting, that's a holdover from the early days of Java). When something is placed in m_actions, the thread running the loop *immediately* becomes runnable. Whether it runs immediately depends on whether it has to compete with other threads which are also runnable. And more importantly, if it was NOT in the wait() call -- that is, it is still running an earlier request, then it will not run the new runnable until the old one completes, and it goes around the loop again to check. This loop NEVER runs unless there is work to do -- yet it's immediately runnable when there is. (The exception is that it checks if something is already queued on first entry). This is the ideal. With polling, you have to check if there's work to do. The check here IS run before waiting after just completing work, but the thread was already awake in this case. It never wakes up just to see if there's work. The game loop I'm using is SUPPOSED to be 60fps but will undoubtedly vary, I use the Timer class's scheduleAtFixedRate to automatically take care of the timestep adjustments/wait time. Since the timer class uses a thread pool, it doesn't have an overhead of thread creation. I don't have to handle calculating how long to sleep to maintain a constant rate, and is quite efficient. I've achieved a smooth display, and the physics progresses a step at each game loop iteration. This has worked well for me. If that's all worked well for you, I'm NOT telling you that you need to change it. However, there's a number of ways this can break down when you really push the limits. But a guiding principle is -- Do The Simplest Thing That Could Possibly Work. It sounds like you've achieved that, for now. Or maybe The First Thing That Worked, and sometimes that's a good choice, too! :=) If someday you find it no longer meeting your needs, you can take these other things into consideration. Or others reading this thread may find them useful. On Apr 10, 6:34 pm, Miguel Morales therevolti...@gmail.com wrote: Ok, like I said I may have missed something,
[android-developers] Re: Service vs Singleton
(Not disagreeing with or contradicting anything in Streets of Boston's reply). Applications on Android consist of zero or more components -- activities, services, and broadcast receivers. Processes run components and applications. They're managed separately. An application's components have to run in a process. They do NOT have to run in the SAME process, though by default they do. A process can run components from more than one application. Though by default, for security reasons, it won't. But you can set it up that way for your own applications, typically for efficiency reasons. In other words, processes are just a resource for running your components. And between intervals running your component, that resource can be taken away! Your component will then later be reconstructed in a new process. (Broadcast receivers, since they run only once per instantiation, have no between intervals). On Apr 10, 7:25 pm, Jason LeBlanc jasonalebl...@gmail.com wrote: Since process != application.. just what are the distinctions? On Fri, Apr 9, 2010 at 5:06 PM, Bob Kerns r...@acm.org wrote: Just to point out a couple more things here. 1) a Service's lifetime is NOT, in general, the same as an Application's lifetime. A service can be deleted when it's not in active use by any activity or intent. This can save memory. 2) Under some circumstances, more than one application may be running in the same process. You won't be encountering those situations by accident, but it's an important part of the model nonetheless. In Android, process != application. 3) By using a service, you get control over when and how your service gets restarted if your application and process get deleted in a low- memory situation. Services will be automatically restarted. Applications, and any singletons they manage, will not, unless they're required by a service being restarted! In a sense, your service continues to exist even when there's no process available to run it in.Once a process is available, your service is recreated and resumed. (This applies to services started with startService rather than binding. But if you want this, you can do both operations on the same service). On Apr 9, 10:49 am, Mark Murphy mmur...@commonsware.com wrote: ailinykh wrote: What do mean by when all components of an Android application are destroyed? Let's talk about Activity, for example. Does destroy Activity means unload Java class? No, I mean destroyed, as in onDestroy(). If so, what happens when system tries to destroy activity but it is referenced by another object ( for instance, a singleton may keep reference to it) ? The component is destroyed from an Android standpoint, but the Activity will not be garbage collected. This results in a memory leak and is why mutable static data members should be avoided where possible. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. 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%2Bunsubs cr...@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 To unsubscribe, reply using remove me as the subject.
[android-developers] Android 2.1 for the ADP2... here it is!
I know a question which is often always popular with us Android developers and users is when will device x get firmware y... Well, I stumbled into an image on www.google.com/mobile from within the UK earlier today, and well, anyone with a ADP2 will be very happy with what they see! Image one: http://www.google.co.uk/mobile/images/mgc3/homepage1.jpg Checkout the Android 2.1 launcher on the ADP2! Image two: http://www.google.co.uk/mobile/images/mgc3/homepage3.jpg Notice the Android 2.1 gmail notification icon in the notes bar! If you visit www.google.com/mobile from within the US, you will likely see a Nexus One next to the iPhone and not the Magic. Anyone at Google fancy confirming a release date for this update? ;) Tom. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: how to get device's movement speed?
I see now he's asking about pitch roll and yaw velocity rather than x,y and z velocity. The simple case of pitch and roll tilt is detectable with a 3 axis accelerometer. Can't do yaw. That's what the magnetometer is for. So if you can get pitch and roll 20 times a sec (atan2(y,z) and atan2(x,z)), you can get pitch and roll rate 20 times a sec. So now we know the phone pitching at 90 degrees per second. What do we do with 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Sense of AnimationDrawable and of Animation classes at all
Hello, I experimented with frame animations to use them in a game. It seems that it's obviously the easiest way to load all Bitmaps in an array of Bitmaps and to draw every thread tick the next frame to the canvas. Before I tried out making animations with AnimationDrawable. First of all it is to draw to the background of an (Image)View. Then the background is to read into an AnimationDrawable which is usable. But what can I do with that because as I tried to use animation classes like AnimationDrawable I was not even able to draw the animation to a specific position because it's a view with one background which sticks anywhere on the screen and it is to draw with animation.draw(canvas) instead of canvas.drawBitmap(Bitmap, 20, 20, null) (You don't even have Bitmaps in your animation. That's the next difficulty). I'm not even able to change the speed or the duration of the animation, because I have to define the duration in the XML file once. It's very unwiedly to make a simple animation with this approach. Maybe I don't know how to use this in a meaningful way. Hence I'd like to know what this approach with AnimationDrawable is good for? Do I understand that right that this is not intended as usage in games? Up to now I see no benefit in using these Animation classes. 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Out of memory and no useful stack trace
On Apr 11, 3:44 pm, HippoMan hippo.mail...@gmail.com wrote: My android app is getting an Out of memory error without a useful stack trace. It occurs after I have repeatedly re-invoked its main logic through a menu interaction, which leads me to believe that there's a memory leak somewhere. I say that the stack trace isn't useful because it doesn't include references to any of my own code. There are no references to my own code in the logcat output, either. The problem with OOMs is that the thread/code fragment that will trigger the OOM is not necessarily the one that leaked memory. This is probably what you are observing. It is just bad luck that the Android message loop triggers it as it is trying to allocate memory that has been used up somewhere else. I'm wondering if any of you can help me figure out where my memory leak might be occurring, given my stack trace and my logcat output. Why not create a series of heap dumps over time and analyze their delta using the Eclipse Memory Analyzer (MAT)? That should point out where the leak is originating from. You will need to convert the Dalvik heap dump to Sun's .hprof format before MAT can read it. Regards, Thilo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Device Seeding Program for Top Android Market Developers
Nothing for London, Grrr... On Apr 10, 10:43 am, Thomas Riley tomrile...@googlemail.com wrote: Still nothing for me in UK either. From what Google have said via email, it's likely to be a few more weeks. Worth the wait though ;) On Apr 10, 9:28 am, dgoemans dgoem...@gmail.com wrote: Still no-one in Europe? Myself and another dev i know in the Netherlands have not got ours yet. On Apr 8, 11:57 pm, olivier.bo...@gmail.com olivier.bo...@gmail.com wrote: Sorry, I meant in Europe, no phone seems to have been received outside the US yet except for ADC2 phones (and yes I think I've read the 600+ messages in hope to find one :-)). I think us European will have to wait a couple of weeks more but it's ok, it's a free phone, it's a gift, it could arrive in a few month time and still be a great surprise and a nice touch from Google! On Apr 8, 11:37 pm, ~ TreKing treking...@gmail.com wrote: On Thu, Apr 8, 2010 at 3:52 PM, olivier.bo...@gmail.com olivier.bo...@gmail.com wrote: I'm still surprised about Google's comment that many people have already received their phone (for Market Seeding Program). If this is true, none of them is reading this thread I guess. If you trudge through the 600+ posts in this thread, you will find that many of them are people posting Got [X Phone] in [Y Location]. Also, those that got their phones are probably busy playing with / developing on them and have long since lost interest in this thread. --- -- TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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 athttp://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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Out of memory and no useful stack trace
You should at least have an idea/logs on the methods which creates OOM, you can encapsulate into a : try { bigMethod(); } catch(java.lang.OutOfMemoryError e) { all objects = null; System.gc(); System.runFinalization(); } Maybe you can also use : Runtime.getRuntime().freeMemory() Runtime.getRuntime().maxMemory() Runtime.getRuntime().totalMemory () to know if you have to stop what you are doing : properly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] video capture in portrait mode
Hi, I am writing an app to capture video. It am able to get the video in the landscape mode but the portrait orientation does not work. setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); shows the screen in the portrait but the preview is still landscape. How can get it to record videos in the portrait orientation. Thanks -Nayeem -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Device Seeding Program for Top Android Market Developers
Nothing for HongKong. On 4月12日, 上午5时29分, Genc gmt...@gmail.com wrote: Nothing for London, Grrr... On Apr 10, 10:43 am, Thomas Riley tomrile...@googlemail.com wrote: Still nothing for me in UK either. From what Google have said via email, it's likely to be a few more weeks. Worth the wait though ;) On Apr 10, 9:28 am, dgoemans dgoem...@gmail.com wrote: Still no-one in Europe? Myself and another dev i know in the Netherlands have not got ours yet. On Apr 8, 11:57 pm, olivier.bo...@gmail.com olivier.bo...@gmail.com wrote: Sorry, I meant in Europe, no phone seems to have been received outside the US yet except for ADC2 phones (and yes I think I've read the 600+ messages in hope to find one :-)). I think us European will have to wait a couple of weeks more but it's ok, it's a free phone, it's a gift, it could arrive in a few month time and still be a great surprise and a nice touch from Google! On Apr 8, 11:37 pm, ~ TreKing treking...@gmail.com wrote: On Thu, Apr 8, 2010 at 3:52 PM, olivier.bo...@gmail.com olivier.bo...@gmail.com wrote: I'm still surprised about Google's comment that many people have already received their phone (for Market Seeding Program). If this is true, none of them is reading this thread I guess. If you trudge through the 600+ posts in this thread, you will find that many of them are people posting Got [X Phone] in [Y Location]. Also, those that got their phones are probably busy playing with / developing on them and have long since lost interest in this thread. --- -- TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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 athttp://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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Out of memory and no useful stack trace
Thanks to both of you. I'm now going to try what each of you suggested. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Device Seeding Program for Top Android Market Developers
More breaking news... Jimmy Hoffa is still dead... More at 11... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Max decoding resolution for Android image formats.
Dear all. I would like to know max decoding resolution for each Android image formats. , like JPEG, BMP, PNG, GIF. If anyone knows this, please share your information. Thanks. Best 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: any lawyer types out there that can get this site down?
I can careless about your pity nor do I need it. Good day. On Apr 11, 2:19 pm, Edward Falk ed.f...@gmail.com wrote: On Apr 8, 6:59 pm, Guess Who, You Probably have my Number nnarb...@gmail.com wrote: I did. But I am know internet genius. Just me and a friend trying to make a quick buck a while ago. Never thought it would actually work! made a couple hundred. Called it quits. Working on other projects. My info is not on record with them. If you look at where he got this info and when it says it was last updatedjan-26th It shows itslef as out dated. You created site whose sole purpose was to steal from us. You get zero pity from us, whether or not you still run it. Now you claim you don't run it any more. One question: who did you sell it to? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: How to force my TextView to get measured?
Does anyone have any ideas or suggestions about this? I know I can subclass TextView and then override the onMeasure() method to retrieve the view's measured dimensions. However, onMeasure() gets called _after_ I make a call to setBackgroundDrawable() on my TextView object. I want to get the measurement before I set the background, because my choice of background depends on the dimensions of the viewing area. Can anyone suggest a way to do this? 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: How to force my TextView to get measured?
Does anyone have any ideas or suggestions about this? I know I can subclass TextView and then override the onMeasure() method to retrieve the view's measured dimensions. However, onMeasure() gets called _after_ I make a call to setBackgroundDrawable() on my TextView object. I want to get the measurement before I set the background, because my choice of background depends on the dimensions of the viewing area. Can anyone suggest a way to do this? 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: Auto-centering and auto-clipping TextView background?
I'll look into 9-patch images. I'm sure the learning curve will be worthwhile. 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 To unsubscribe, reply using remove me as the subject.
Re: [android-developers] Re: Steps to transfer a simple object from server to android using XML
On Sun, Apr 11, 2010 at 2:50 AM, raqz abdulraqee...@gmail.com wrote: Hi, I just tried reading a tutorial and created my app using SAX but its not working for some reason and I have no idea why :) Could some one try helping me Let me ask you this: if you, who wrote your project and have all the code, have no idea why your app is not working, how are any of us reading this post supposed to help you when you have posted no information about your problem whatsoever? Hmm? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
Re: [android-developers] Re: How do I get the MD5 fingerprint of my application certificate through code?
On Sun, Apr 11, 2010 at 6:08 AM, ko5tik kpriblo...@yahoo.com wrote: It definitely varies - I use several boxes for development (my older laptop retired to mother in law house ;) ) and I have to uninstall apps compiled with debug keys before I can start them from other box. I believe that the debug key is based on the relative path from your project to the folder where you installed the Android SDK. I used to have this same problem of having to uninstall my app when switching machines until I moved the SDK to within my project's root, such that the relative path from the project was the same on both machines. After that I no longer have to uninstall and reinstall when switching machines and the debug Maps API key generated for both is the same. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
Re: [android-developers] Managing Google apiKeys
On Fri, Apr 9, 2010 at 7:47 PM, Tom Opgenorth opgeno...@gmail.com wrote: So does this mean that we'd have to have three copies of the layout file: one for my debug key, one for my colleagues debug key, and then one for production? If you both have the SDK installed in a folder that has the same relative path from your project, you should both get the same debug keystore which will generate the same debug Maps API key. This works for me across my PC and laptop. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Generating a static HashMap from resources?
Yep, Use reflection on the R.string class for strings. Or use reflection on the R.drawable class if you need to map strings to drawables. Query the (publicly) declared fields of R.string using reflection. The code below doesn't follow your example mappings exactly, but you'll get the idea: String key = foo; Field stringField = R.string.class.getField(mymap.get(key)); int stringFieldId = stringField.getInt(null); String stringFieldValue = getResources().getString(stringFieldId); On Apr 11, 2:48 pm, HippoMan hippo.mail...@gmail.com wrote: In my app, I'd like to define some static resources in an xml file which can be accessed via a HashMap. I know I can do this at run time in a manner similar to the one which is described here: http://groups.google.com/group/android-developers/browse_thread/threa... However, since my HashMap will be a non-changing resource, I'd like to precompile my xml into a static HashMap in a manner that is similar to how the aapt utility precomplies the data in various xml files into R.java. Furthermore, I'd like the keys and values to be expandable via the @+id/item convention, as follows ... Suppose the following items exist in strings.xml: string name=string0foo/string string name=string1bar/string string name=string2quack/string string name=string3oink/string Then, I would like to be able to do something like this in order to specify my static HashMap: ?xml version=1.0 encoding=utf-8? map name=mymap element name=@+id/string0foo-item/element element name=abc@+id/string1/element element name=@+id/string2@+id/string3/element /map The resulting generated code in R.java would look something like this: public static final class map { public static final MapString , String mymap = new ConcurrentHashMapString , String() {{ put(foo, foo-item); put(abc, bar); put(quack, oink); }}; } Is there a way to do anything even remotely similar to this under Android, perhaps using aadb? Or am I out of luck? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Need Help in Webview Highlight
Hello Everyone, I want to select text from Webview and than Highlight it. I am able to get the selected text using *emulateshiftHeld() *method but If i try to search it in file and than Underline it the problem is that it doesn't know the position of text so it underlines that word in whole file as many time it is repeated. So i want to find the position of that text (which will be known only at runtime) in webview. Can anyone please help me?? Awaiting for a positive reply.. Regards, Brijesh Masrani. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
Re: [android-developers] Re: Down Tab Bar in Android
Hi Hehe, I tried it but still it showing Null Pointer Exception. On Sun, Apr 11, 2010 at 7:38 AM, HeHe cnm...@gmail.com wrote: in case you still find no way to go, here is mine that you might like to try if you can bear the fly in the ointment -- the thin white bar of tabwidget is below instead of above the tab buttons. hope android team shall give more flexibility in this aspect :-@ ?xml version=1.0 encoding=utf-8? TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:paddingBottom=60px LinearLayout android:id=@+id/calltabs_content android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent /LinearLayout /FrameLayout RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_alignParentBottom=true android:layout_width=fill_parent android:layout_height=60px/ /RelativeLayout /TabHost ho da la!! On Feb 18, 6:43 am, Sasikumar.S sasikumar.it1...@gmail.com wrote: Thanks for ur reply I will try it On Thu, Feb 18, 2010 at 7:12 PM, Dilli rao dilliraomca...@gmail.com wrote: implement your own layout with *tabhost, framelayout *and *tabwidget* you can arrange the tabs at bottom of the layout On Thu, Feb 18, 2010 at 11:06 AM, Sasikumar S sasikumar.it1...@gmail.comwrote: Hi, How to show tab bar in down in android like iphone ? Any suggestion? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thank you Dilli Rao -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] How to apply different textures on different faces of a cylinder
Hello, Can anybody tell me how to apply apply different textures on different faces of a cylinder?I am able to apply one texture which covers the whole cylinder.But I want one texture for each face. Thanks in advance!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] MotionEvent.ACTION_DOWN stop working after 1 day Livewallpaper
After some days MotionEvent.ACTION_DOWN Or ACTION_UP stop working. It is a livewallpaper and I try everything nothing works Have you any idea? Here is the logs: Logs -This log has no ACTION_UP-- 04-12 08:11:15.972: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:11:15.972: INFO/SmartCube(24011): CustomSimpleOnGestureListener: 04-12 08:11:15.972: INFO/SmartCube(24011): ACTION_DOWN:x=416 y=592e 04-12 08:11:15.982: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:11:15.982: INFO/SmartCube(24011): onTouchEvent1 action=0 04-12 08:11:15.982: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:11:16.002: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:11:16.002: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:11:16.002: INFO/SmartCube(24011): onTouchEvent1 action=2 04-12 08:11:16.002: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:11:16.002: INFO/SmartCube(24011): ACTION_MOVE: 04-12 08:11:16.012: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:11:16.012: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:11:16.012: INFO/SmartCube(24011): onTouchEvent1 action=2 04-12 08:11:16.012: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:11:16.012: INFO/SmartCube(24011): ACTION_MOVE: 04-12 08:11:16.042: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:11:16.042: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:11:16.042: INFO/SmartCube(24011): onTouchEvent1 action=2 04-12 08:11:16.042: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:11:16.052: INFO/SmartCube(24011): ACTION_MOVE: 04-12 08:11:16.062: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:11:16.062: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:11:16.062: INFO/SmartCube(24011): onTouchEvent1 action=2 04-12 08:11:16.062: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:11:16.062: INFO/SmartCube(24011): ACTION_MOVE: 04-12 08:11:16.072: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:11:16.072: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:11:16.072: INFO/SmartCube(24011): onTouchEvent1 action=2 04-12 08:11:16.072: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:11:16.072: INFO/SmartCube(24011): ACTION_MOVE: -This log has no ACTION_DOWN-- 04-12 08:16:33.532: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:16:33.532: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:16:33.532: INFO/SmartCube(24011): onTouchEvent1 action=2 04-12 08:16:33.532: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:16:33.532: INFO/SmartCube(24011): ACTION_MOVE: 04-12 08:16:33.562: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:16:33.562: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:16:33.562: INFO/SmartCube(24011): onTouchEvent1 action=2 04-12 08:16:33.562: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:16:33.562: INFO/SmartCube(24011): ACTION_MOVE: 04-12 08:16:33.602: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:16:33.602: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:16:33.602: INFO/SmartCube(24011): onTouchEvent1 action=1 04-12 08:16:33.602: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:16:33.602: INFO/SmartCube(24011): ACTION_UP bugFixDownCounter--=-92 04-12 08:16:33.602: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-0 04-12 08:16:33.602: INFO/SmartCube(24011): mGestureDetector.onTouchEvent( event)_-1 04-12 08:16:33.602: INFO/SmartCube(24011): onTouchEvent1 action=1 04-12 08:16:33.602: INFO/SmartCube(24011): onTouchEvent2 pointercount=1 04-12 08:16:33.602: INFO/SmartCube(24011): ACTION_UP bugFixDownCounter--=-93 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Down Tab Bar in Android
itself cannot cause program exception, i think. you need to debug your apk and find out which object access causes np exception. On Apr 11, 9:22 pm, Sasikumar.S sasikumar.it1...@gmail.com wrote: Hi Hehe, I tried it but still it showing Null Pointer Exception. On Sun, Apr 11, 2010 at 7:38 AM, HeHe cnm...@gmail.com wrote: in case you still find no way to go, here is mine that you might like to try if you can bear the fly in the ointment -- the thin white bar of tabwidget is below instead of above the tab buttons. hope android team shall give more flexibility in this aspect :-@ ?xml version=1.0 encoding=utf-8? TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:paddingBottom=60px LinearLayout android:id=@+id/calltabs_content android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent /LinearLayout /FrameLayout RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_alignParentBottom=true android:layout_width=fill_parent android:layout_height=60px/ /RelativeLayout /TabHost ho da la!! On Feb 18, 6:43 am, Sasikumar.S sasikumar.it1...@gmail.com wrote: Thanks for ur reply I will try it On Thu, Feb 18, 2010 at 7:12 PM, Dilli rao dilliraomca...@gmail.com wrote: implement your own layout with *tabhost, framelayout *and *tabwidget* you can arrange the tabs at bottom of the layout On Thu, Feb 18, 2010 at 11:06 AM, Sasikumar S sasikumar.it1...@gmail.comwrote: Hi, How to show tab bar in down in android like iphone ? Any suggestion? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thank you Dilli Rao -- You received this message because you are subscribed to the Google Groups Android Developers group. 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%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
Re: [android-developers] Re: Down Tab Bar in Android
ok i will try it now. On Mon, Apr 12, 2010 at 11:04 AM, HeHe cnm...@gmail.com wrote: itself cannot cause program exception, i think. you need to debug your apk and find out which object access causes np exception. On Apr 11, 9:22 pm, Sasikumar.S sasikumar.it1...@gmail.com wrote: Hi Hehe, I tried it but still it showing Null Pointer Exception. On Sun, Apr 11, 2010 at 7:38 AM, HeHe cnm...@gmail.com wrote: in case you still find no way to go, here is mine that you might like to try if you can bear the fly in the ointment -- the thin white bar of tabwidget is below instead of above the tab buttons. hope android team shall give more flexibility in this aspect :-@ ?xml version=1.0 encoding=utf-8? TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:paddingBottom=60px LinearLayout android:id=@+id/calltabs_content android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent /LinearLayout /FrameLayout RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_alignParentBottom=true android:layout_width=fill_parent android:layout_height=60px/ /RelativeLayout /TabHost ho da la!! On Feb 18, 6:43 am, Sasikumar.S sasikumar.it1...@gmail.com wrote: Thanks for ur reply I will try it On Thu, Feb 18, 2010 at 7:12 PM, Dilli rao dilliraomca...@gmail.com wrote: implement your own layout with *tabhost, framelayout *and *tabwidget* you can arrange the tabs at bottom of the layout On Thu, Feb 18, 2010 at 11:06 AM, Sasikumar S sasikumar.it1...@gmail.comwrote: Hi, How to show tab bar in down in android like iphone ? Any suggestion? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thank you Dilli Rao -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject. -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options,
[android-developers] Re: Generating a static HashMap from resources?
Just what are you trying to achieve? If you're actually wanting a hash map, efficiently populated on class loading, then Streets of Boston's approach won't help you -- nor will aapt. To do what you actually ask for, you could write an XSLT script to generate the necessary java code. One of the things you'd have to deal with is handling the @+id/string0 stuff. Well, actually that makes no sense at all. I think you mean something like @string/string0? You'd have to make your XSLT script handle your strings.xml other values files, and map to the appropriate strings. That's probably easiest done as a separate step to consolidate them into a single temporary file. In other words, it's not all that hard to create something like this, given a compelling reason. Do you have a compelling reason? Is there a reason to not just read the XML resource and process it at runtime? On Apr 11, 11:48 am, HippoMan hippo.mail...@gmail.com wrote: In my app, I'd like to define some static resources in an xml file which can be accessed via a HashMap. I know I can do this at run time in a manner similar to the one which is described here: http://groups.google.com/group/android-developers/browse_thread/threa... However, since my HashMap will be a non-changing resource, I'd like to precompile my xml into a static HashMap in a manner that is similar to how the aapt utility precomplies the data in various xml files into R.java. Furthermore, I'd like the keys and values to be expandable via the @+id/item convention, as follows ... Suppose the following items exist in strings.xml: string name=string0foo/string string name=string1bar/string string name=string2quack/string string name=string3oink/string Then, I would like to be able to do something like this in order to specify my static HashMap: ?xml version=1.0 encoding=utf-8? map name=mymap element name=@+id/string0foo-item/element element name=abc@+id/string1/element element name=@+id/string2@+id/string3/element /map The resulting generated code in R.java would look something like this: public static final class map { public static final MapString , String mymap = new ConcurrentHashMapString , String() {{ put(foo, foo-item); put(abc, bar); put(quack, oink); }}; } Is there a way to do anything even remotely similar to this under Android, perhaps using aadb? Or am I out of luck? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] About how to make new buttons in a row?
Hi all, I want to create three button on the layout. But the default align of the buttons is in a column like: Button1 Button2 Button3 But I want to the three buttons align in a row in order to save space. The align of the three buttons I need is : Button1 Botton2 Botton3 Would you please tell me how to do that? Thank you very much! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: How to apply different textures on different faces of a cylinder
Draw your faces separately with different paint objects. Thanks and Regards, Kumar Bibek On Apr 12, 10:15 am, kirti kaul kirti.k...@wipro.com wrote: Hello, Can anybody tell me how to apply apply different textures on different faces of a cylinder?I am able to apply one texture which covers the whole cylinder.But I want one texture for each face. Thanks in advance!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: how to read database of one application in another application using contentproviders
Hi, In the manifest file of both applications you have to give permissions. In the manifest file of application with content provider you have to give the following permission provider android:name=. android:authorities=. android:readPermission = /*Package name of Content provider*/.Permission.READ android:writePermission = /*Package name of Content provider*/.Permission.WRITE android:multiprocess = true android:exported=true / In the manifest file of application you going to use this provider, you havr to give uses permission uses-permission android:name=/*Package name of Content provider*/.Permission.READ / uses-permission android:name=/*package name of Content provider*/.Permission.WRITE / You have to give the same permissions in both manifests Regards, SREEHARI. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.