[android-developers] Re: How to check the Foreground Process from a Service
Does anyone know how to, or if it's even possible to check the (foreground process/top of the activity stack) from a service? It is possible, see the ActivityManager class functions like getRunningAppProcesses(). getRunningTasks() looks useful but is flakey in my experience e.g. when you return to the launcher it is sometimes not updated. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Empty Spinner before first selection
On Sat, Aug 21, 2010 at 5:33 PM, William Ferguson william.ferguson.au@ gmail.com wrote: I don't want to add an empty/blank item at the head of my list of items because that means that it shows as an avalaible selection in the DropDownView and looks pretty lame. This is pretty common practice. There's really nothing wrong with doing this (granted, I'm biased, as this is what I do, and I don't think it's pretty lame) And if a selection is made I want it to be a valid one. It's trivial to ignore the initial selection. but spinner#setOnClickListener throw a RuntimeException saying You probably want to use #setOnItemClickListener instead. And trying to use #setOnItemClickListener throws a RuntimeException saying it is not valid for a Spinner. Yeah, those errors aren't very helpful. You're looking for setOnItem*SELECTED*Listener. Try that, - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android and Proguard
As far as I could work out, no. ProGuard needs to be inserted into middle of the build process, and while ant lets you do this, Eclipse does not (at least, not for someone at my level of expertise). It seems likely Google will integrate ProGuard into the Eclipse plugin at some point, but that hasn't happened yet. Personally, I gave up on ProGuard - after several hours of messing around - when it threw several hundred errors on my app. I also am not impressed with optimization that makes my stack traces worthless, thank you very much. String On Aug 21, 7:58 am, neptune2000 papa.ma...@gmail.com wrote: There are several tutorials online for using ProGuard with an Android Ant build. There is nothing for using ProGuard with and Eclipse Android Package build. Is this possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Why are the standard Android components as ugly as MS Visual Studio components?
Since you can clearly do better and Android is open source, I look forward to you improving the ugly components with beautiful ones that put the iPhone to shame. Do post back when you're done. Thanks! - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Facing licensing issue in already published paid app
Hello, I had some problems with one of my published apps, where the licensing would always fail (even though my other apparently were fine). I had to re-create my eclipse project to sort the problem. Doesn't really make sense why, but it worked... Don On Aug 21, 9:16 am, Feelsocial feelsocial.andr...@gmail.com wrote: Hi all, I am facing the problem in licensing of my old published paid apps. Basically i have paid app which is published by version code 1. I implemented the license code on it, it working fine to me. Licensing server giving the response or allow that you can use it. But once i changed version code from 1 to 2 in manifest file, then licensing service not allow to use the app.Server giving the response dont allow. I not understanderd, y it has relation with version code? i can't publish the update version.??? Moreover, i am already login to my publisher account, i have setting of LICENSED in edit profile section. Is any body can help me?.. Help -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to reduced size of Android Emulator come up with SDK
Hi, I want to reduced the size of Android Emulator i.e. come up with your SDK ? As Emulator size is greater than my laptops screen size, unable to see whole content on simulator. Regards Atul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Check Activity Stack from Service
Do it the other way around: call stopService() from the activity when appropriate. 20.08.2010 4:13, Call_Waiting пишет: Hey ya'll, I have an app that starts a service, then starts another activity previously selected by the user. Everything works on my app except I'm trying to get the service to kill itself, after it leaves the other activity without it having to come back to my activity. I've looked everywhere to see if anyone knows how to peek() search() the Activity Stack from a Service. Another way of wording is to check the foreground process from a service. Thanks. -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to reduced size of Android Emulator come up with SDK
Got the answer : Run this on you command prompt : $ emulator [ur virtual machine name]AVD2.2 -skin [size as u want]480*480 $ emulator AVD2.2-8 -skin 480*480 Regards Atul On Sun, Aug 22, 2010 at 1:11 PM, Atul Raut atul.dr...@gmail.com wrote: Hi, I want to reduced the size of Android Emulator i.e. come up with your SDK ? As Emulator size is greater than my laptops screen size, unable to see whole content on simulator. Regards Atul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Optimizing image processing algorithms for Android
Hi, As per the last msg on this thread, I did check out about GC pre- empting the CPU/locking up the thread. As I said, I hadn't considered this possibility, and I wasn't aware of it either, to be honest. I googled around to check out more on it, and came across another thread on the forums http://groups.google.com/group/android-ndk/browse_thread/thread/6bc6b9b0c3540c27 I believe the same thing is happening in my case: except that I am doing image/video processing as opposed to the audio processing that this thread above concerns. Will post back/share as I learn more.. Another related stuff is I was checking out some docs relating to writing efficient/optimized code for ARM11 architecture. For the record, the processor I am running my stuff on has the ARM1176JZF-S which has independent I/D caches of 16 KB each and two TCMs (Tightly Coupled Memories) also of 16KB each... I did some tests on a simple loop which I was using to define my image data (one naive code vs. ARM code) but did not notice significant difference... What is more is that the profile time varies significantly. I checked the logs to see what the GC is upto and sure enough you see the GC thread doing its stuff... So I guess I am going to tackle this more basic issue first, and then think about optimizing the C code :) thanks, Amit On Aug 20, 2:35 pm, Amit prabhudesai.a...@gmail.com wrote: Hi, Thanks for your reply This sounds all find and good, but I still haven't heard anything about the far more common cause of delay: the garbage collector locking up the thread or pre-empting the CPU. Or has Amit already solved this problem? About GC locking up the thread or pre-empting the CPU, no I haven't solved that, nor had I thought about it. I am kind of new to developing for Android, and may be my expertise on the platform can be considered Average. And I haven't developed or deployed image processing algorithms on Android either (though I have done that a bit on other embedded platforms), so I do not know the specifics involved. I am mapping what I know from optimizing algorithms for DSPs and what I get from profile data and trying to come up with solutions. Could you provide me with some resources (docs) for what you mention? (I will of course try googling for it ;-) ) It would be interesting to know that, as I am really trying to learn more about Android platform also (apart from imaging stuff). Finally, I'll take a look at the jsr-239 java.nio; I haven't used it or seen samples of it earlier, so totally new to me. Thanks again for your pointers. Amit On Aug 20, 3:25 am, Indicator Veritatis mej1...@yahoo.com wrote: This sounds all find and good, but I still haven't heard anything about the far more common cause of delay: the garbage collector locking up the thread or pre-empting the CPU. Or has Amit already solved this problem? As for alignment, OpenGL as implemented by JSR-239 (therefore available onAndroid) solves this problem by using the JSR-239 java.nio Buffer classes. If you use one of these, you are guaranteed word-alignment on the ARM. NB: I say jsr-239 java.nio because there may be subtle implementation differences between those and the original java.nio classes. For example, JSR-239 does not expect flip() to be useful, nor is supporting Mark required. NB: the online docs forAndroid'sjava.nio do not mention alignment: I found this info in one of the OpenGL ES specs (I forget which one): I forget whether or not the Buffer must be allocated Direct or not to get this benefit. On Aug 19, 12:40 pm, Marc gobl...@gmail.com wrote: I have spent a lot of time optimizing signalprocessingalgorithms using both arm assembly and memory optimizations. The memory optimizations can be huge. I remember one project the speed more than doubled once we only using cache memory. That is the entire working data set was less than 8k. The process is fairly straight forward: Determine the size of your cache, then use only that much memory. This typically requires doing tricks like making the output buffer overlap the input buffer. Basically you need to know exactly where every byte of memory is being used. Java tends to be allocate as you need memory model, but for cache optimizations you need tighter control of memory usage. On Aug 19, 11:47 am, DanH danhi...@ieee.org wrote: Hate to sound like I'm harping on the same stuff, but then (assuming that the JVM/JIT compiler is doing good enough), the memory bottleneck still remains. Yep, much of our effort on iSeries went into the memory bottleneck area. Eg, we got fairly astounding improvements (ca 20%) when we packed objects so that the fields of SubclassOfA filled in the holes left from aligning the fields of A. And even more improvement by packing the Char array owned by a String into the String and arranging it so that the two shared a single header.
Re: [android-developers] Re: How to reduced size of Android Emulator come up with SDK
Also, there's a scaling option when you start the emulator from the AVD Manager. On Sun, Aug 22, 2010 at 3:51 AM, Atul Raut atul.dr...@gmail.com wrote: Got the answer : Run this on you command prompt : $ emulator [ur virtual machine name]AVD2.2 -skin [size as u want]480*480 $ emulator AVD2.2-8 -skin 480*480 Regards Atul On Sun, Aug 22, 2010 at 1:11 PM, Atul Raut atul.dr...@gmail.com wrote: Hi, I want to reduced the size of Android Emulator i.e. come up with your SDK ? As Emulator size is greater than my laptops screen size, unable to see whole content on simulator. Regards Atul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Failed installs
Hi, lately i've been receiving reports of failed updates (e.g. myTouch 3G, HTC Incredible) for my app. After the 'failed' update, they're saying they're able to launch the app only from the Open button in the Market, but not from the app icon. Is this happening to other devs too? Anyone knows what this is about? 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
[android-developers] Share library
Does anyone know of a library that will give me the share functionality for pictures? Ie, how in many apps now you are given the option of sharing a page or image with facebook, twitter, email, sms, etc. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] vibrate() does not behave according to API docs (HTC Desire)
Hi folks, I'm trying to get a simple vibration working and according to the api docs (http://developer.android.com/reference/android/os/Vibrator.html) all I need to use is this: public void vibrate (long milliseconds) Turn the vibrator on. Parameters millisecondsHow long to vibrate for. However the behavior I am seeing is not what is described. Instead of a number of milliseconds, it seems this parameter translates into an intensity?? I tried: vibrator.vibrate(200); and I got a sustained vibration which didn't stop until I exited my app. Initially I thought perhaps the api docs were wrong and the parameter was seconds, not milliseconds, so I tried: vibrator.vibrate(2); This time I got the same behavior, i.e. continuous vibration, but the vibration was very gentle.. almost in-perceptible. This leads me to conclude that the parameter translates into an intensity, not a time. Is it possible that this is a feature of the particular device? In my case HTC Desire. I'm running 2.1 as my crappy telco hasn't distributed an update to 2.2, but it worries me that this behavior may differ from device to device. Anyone else had any experience with this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Share library
On Sun, Aug 22, 2010 at 5:10 AM, samspade79 samspad...@gmail.com wrote: Does anyone know of a library that will give me the share functionality for pictures? Ie, how in many apps now you are given the option of sharing a page or image with facebook, twitter, email, sms, etc. I am not quite certain what you mean by your question. If you are looking to determine what services allow you to share, construct an ACTION_SEND Intent that describes what you want to share and use PackageManager and queryIntentActivities() to find out details of who all supports that action. If you are looking to determine what applications *request* ACTION_SEND Intents, I don't think there's a way to do that sort of reverse lookup. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: connecting mysql database
I think it is rather presumptuous of some commentators to suggest one approach is either right or wrong. The real world is never this black or white. A direct connection to a remote database is perfectly secure, usable and technically possible particularly if the Android device is connecting via a secure wi-fi network or a GPRS/3G network where the SIM is part of a private APN. Unlike J2ME for example, the Android framework supports full database JDBC connectivity. Android also supports many technical solutions to supporting offline connectivity that does not just involve REST and web services. Our MobiForms Developer rapid application development tool for example supports the creation of apps that can directly connect to a multitude of back office databases via JDBC. We do not currently support MySQL in this direct mode, but this is a licensing issue rather than a technical issue. The complementary MobiForms Sync Server also supports bi-directional data replication, synchronisation and offline buffering between just about any back office database or ERP package (such as Oracle Apps, SAP, Navision, Dynamics etc.), and Google Android or others such as Windows Mobile. Supported back office databases include Oracle, SQL Server, Access, Sybase, IBM DB2, SQLite, HSQLDB and MySQL For more information go to: http://www.mobiforms.com. crajesh wrote: Hi All, I am new in android. I want to know to connect the mysql database. Please give your opinion and give also examples on how to use any of the solutions. Thanks everyone in Advance. C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] vibrate() does not behave according to API docs (HTC Desire)
Hey, I just tried on my HTC Desire (with Android 2.2) and vibrate() works as expected...(i.e. the parameter is milliseconds). On Sun, Aug 22, 2010 at 11:16 AM, Jason jason.poli...@gmail.com wrote: Hi folks, I'm trying to get a simple vibration working and according to the api docs (http://developer.android.com/reference/android/os/Vibrator.html) all I need to use is this: public void vibrate (long milliseconds) Turn the vibrator on. Parameters millisecondsHow long to vibrate for. However the behavior I am seeing is not what is described. Instead of a number of milliseconds, it seems this parameter translates into an intensity?? I tried: vibrator.vibrate(200); and I got a sustained vibration which didn't stop until I exited my app. Initially I thought perhaps the api docs were wrong and the parameter was seconds, not milliseconds, so I tried: vibrator.vibrate(2); This time I got the same behavior, i.e. continuous vibration, but the vibration was very gentle.. almost in-perceptible. This leads me to conclude that the parameter translates into an intensity, not a time. Is it possible that this is a feature of the particular device? In my case HTC Desire. I'm running 2.1 as my crappy telco hasn't distributed an update to 2.2, but it worries me that this behavior may differ from device to device. Anyone else had any experience with this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: connecting mysql database
On Sun, Aug 22, 2010 at 5:32 AM, Tim t...@mobiforms.com wrote: A direct connection to a remote database is perfectly secure, usable and technically possible particularly if the Android device is connecting via a secure wi-fi network or a GPRS/3G network where the SIM is part of a private APN. Unlike J2ME for example, the Android framework supports full database JDBC connectivity. However, the database connection protocols are designed with reliable LANs in mind. Neither WiFi nor 3G are reliable, simply because device owners have the audacity to move around, sometimes while doing the unthinkable and actually using their devices. :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Empty Spinner before first selection
Thanks, though I wasn't confused about which Listener I needed to set in order to respond to a selection from a user. Nor how to ignore the initial selection using a switch in that Listener (though that is something that is also annoying). I was hoping to use those Listeners to switch from a null Adapater to my real Adapter prior to displaying the DropDownView so it would 1) only show the items that are truly available for selection 2) not show any selected item prior to DropDownView. It seems strange that a ListView can have no items selected via #setSelection(-1), but a Spinner cannot. It all hinges on the code in AbsSpinner#setAdapter if (mAdapter != null) { ... mItemCount = mAdapater.getCount(); int position = mItemCount 0 ? 0 : INVALID_POSITION; setSelectedPositionInt(position); setNextSelectedPositionInt(position); ... } which selects the first element in the Adapter when the Adapter is set. But if it was if (mAdapter != null) { ... mItemCount = mAdapater.getCount(); int position = INVALID_POSITION; setSelectedPositionInt(position); setNextSelectedPositionInt(position); ... } then initial selection of the Spinner would be configurable instead of always being the first element. On Aug 22, 5:21 pm, TreKing treking...@gmail.com wrote: On Sat, Aug 21, 2010 at 5:33 PM, William Ferguson william.ferguson.au@ gmail.com wrote: I don't want to add an empty/blank item at the head of my list of items because that means that it shows as an avalaible selection in the DropDownView and looks pretty lame. This is pretty common practice. There's really nothing wrong with doing this (granted, I'm biased, as this is what I do, and I don't think it's pretty lame) And if a selection is made I want it to be a valid one. It's trivial to ignore the initial selection. but spinner#setOnClickListener throw a RuntimeException saying You probably want to use #setOnItemClickListener instead. And trying to use #setOnItemClickListener throws a RuntimeException saying it is not valid for a Spinner. Yeah, those errors aren't very helpful. You're looking for setOnItem*SELECTED*Listener. Try that, - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: vibrate() does not behave according to API docs (HTC Desire)
Hmm.. ok. I wonder if it's something crufty in my code.. sounds like my call to vibrate may be looping somewhere. I'll assume I've done something wrong. Thanks for the info. On Aug 22, 7:36 pm, YuviDroid yuvidr...@gmail.com wrote: Hey, I just tried on my HTC Desire (with Android 2.2) and vibrate() works as expected...(i.e. the parameter is milliseconds). On Sun, Aug 22, 2010 at 11:16 AM, Jason jason.poli...@gmail.com wrote: Hi folks, I'm trying to get a simple vibration working and according to the api docs (http://developer.android.com/reference/android/os/Vibrator.html) all I need to use is this: public void vibrate (long milliseconds) Turn the vibrator on. Parameters milliseconds How long to vibrate for. However the behavior I am seeing is not what is described. Instead of a number of milliseconds, it seems this parameter translates into an intensity?? I tried: vibrator.vibrate(200); and I got a sustained vibration which didn't stop until I exited my app. Initially I thought perhaps the api docs were wrong and the parameter was seconds, not milliseconds, so I tried: vibrator.vibrate(2); This time I got the same behavior, i.e. continuous vibration, but the vibration was very gentle.. almost in-perceptible. This leads me to conclude that the parameter translates into an intensity, not a time. Is it possible that this is a feature of the particular device? In my case HTC Desire. I'm running 2.1 as my crappy telco hasn't distributed an update to 2.2, but it worries me that this behavior may differ from device to device. Anyone else had any experience with this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!)http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: I don't know how to use Animation translate
Set fillEnabled and fillAtfer properies of your aimation On Aug 21, 2:28 pm, CaryWang wangjf...@gmail.com wrote: I use translate move image from top to bottom,but translate finish image jump to image initial position.I don't know why,I want move image from A to B,finsih this image stay B. -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: vibrate() does not behave according to API docs (HTC Desire)
lol.. yep.. my coding skills strike again. Works as expected, when you're not an idiot. On Aug 22, 7:56 pm, Jason jason.poli...@gmail.com wrote: Hmm.. ok. I wonder if it's something crufty in my code.. sounds like my call to vibrate may be looping somewhere. I'll assume I've done something wrong. Thanks for the info. On Aug 22, 7:36 pm, YuviDroid yuvidr...@gmail.com wrote: Hey, I just tried on my HTC Desire (with Android 2.2) and vibrate() works as expected...(i.e. the parameter is milliseconds). On Sun, Aug 22, 2010 at 11:16 AM, Jason jason.poli...@gmail.com wrote: Hi folks, I'm trying to get a simple vibration working and according to the api docs (http://developer.android.com/reference/android/os/Vibrator.html) all I need to use is this: public void vibrate (long milliseconds) Turn the vibrator on. Parameters milliseconds How long to vibrate for. However the behavior I am seeing is not what is described. Instead of a number of milliseconds, it seems this parameter translates into an intensity?? I tried: vibrator.vibrate(200); and I got a sustained vibration which didn't stop until I exited my app. Initially I thought perhaps the api docs were wrong and the parameter was seconds, not milliseconds, so I tried: vibrator.vibrate(2); This time I got the same behavior, i.e. continuous vibration, but the vibration was very gentle.. almost in-perceptible. This leads me to conclude that the parameter translates into an intensity, not a time. Is it possible that this is a feature of the particular device? In my case HTC Desire. I'm running 2.1 as my crappy telco hasn't distributed an update to 2.2, but it worries me that this behavior may differ from device to device. Anyone else had any experience with this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!)http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Empty Spinner before first selection
On Sun, Aug 22, 2010 at 5:52 AM, William Ferguson william.ferguson...@gmail.com wrote: It all hinges on the code in AbsSpinner#setAdapter if (mAdapter != null) { ... mItemCount = mAdapater.getCount(); int position = mItemCount 0 ? 0 : INVALID_POSITION; setSelectedPositionInt(position); setNextSelectedPositionInt(position); ... } which selects the first element in the Adapter when the Adapter is set. But if it was if (mAdapter != null) { ... mItemCount = mAdapater.getCount(); int position = INVALID_POSITION; setSelectedPositionInt(position); setNextSelectedPositionInt(position); ... } then initial selection of the Spinner would be configurable instead of always being the first element. Subclass Spinner, override setAdapter() to behave how you want, and use it. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: I don't know how to use Animation translate
I want suit different screen,I don't now how to do? 2010/8/22 Paul Turchenko paul.turche...@gmail.com Set fillEnabled and fillAtfer properies of your aimation On Aug 21, 2:28 pm, CaryWang wangjf...@gmail.com wrote: I use translate move image from top to bottom,but translate finish image jump to image initial position.I don't know why,I want move image from A to B,finsih this image stay B. -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to distribute expensive Android app
On Aug 22, 12:34 am, TreKing treking...@gmail.com wrote: On Sat, Aug 21, 2010 at 5:13 PM, RLScott fixthatpi...@yahoo.com wrote: I have a $300 iPhone app that I might like to port to Android. Any chance of you naming this app? I'm really curious what kind of app justifies $300. Sure. It is TuneLab Piano Tuner, and among my competition, which are similar programs on the Pocket PC (Verituner and Reyburn CyberTuner), mine is actually the cheapest. And thanks, Mark, for giving me a direct answer without using lmgtfy. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Calling the stop() function of MediaPlayer
Hi! I don't know if I'm doing something wrong, but I see calling the stop function of MediaPlayer simply does nothing. The playback goes on. I looked in the documentation and I found: Stops playback after playback has been stopped or paused. So, I tried to pause() it before stopping, but the MediaPlayer then pauses and resumes the playback. The only thing I can see is that the buffering stops. But the playback continues. Is this the expected behavior? Could the problem be related to the fact that I call the methods of the MediaPlayer object from different threads than the creator by synchronizing with Semaphores? 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
Re: [android-developers] Calling the stop() function of MediaPlayer
On Sun, Aug 22, 2010 at 7:09 AM, Luca Carlon carlon.l...@gmail.com wrote: Hi! I don't know if I'm doing something wrong, but I see calling the stop function of MediaPlayer simply does nothing. The playback goes on. I looked in the documentation and I found: Stops playback after playback has been stopped or paused. So, I tried to pause() it before stopping, but the MediaPlayer then pauses and resumes the playback. The only thing I can see is that the buffering stops. But the playback continues. Is this the expected behavior? No. Here is a project that behaves correctly: http://github.com/commonsguy/cw-advandroid/tree/master/Media/Audio/ Could the problem be related to the fact that I call the methods of the MediaPlayer object from different threads than the creator by synchronizing with Semaphores? Possibly -- I don't know whether MediaPlayer uses thread-local values or anything. I have only ever used MediaPlayer from a single thread. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Best way to scale for different screen resolutions/dimensions?
The problem, and it may be that I'm misunderstanding how Android handles different screen sizes, is that when trying to incorporate the material found on the Supporting Multiple Screens developer doc, it appears to always display in compatibility mode. If one has a custom layout, or a SurfaceView, and wants to build for HVGA, is there a way to have the OS scale everything nicely when used on other sized screens? Is there a place to define the intended layout or SurfaceView dimensions that are used as the basis for any automatic scaling the OS does (if indeed automatic scaling is possible)? I'm just confused on the process to use and the settings to set. Since all drawing will be custom, similar to a game concept drawing bitmap objects directly, it just seems a little different than if there was a UI with widgets. Does anyone have any experience or pointers? On Aug 6, 9:04 am, Warren warrenba...@gmail.com wrote: Check out onMeasure() and onLayout(). Those functions are called while views are being positioned, etc. On Aug 6, 7:51 am, TreKing treking...@gmail.com wrote: On Thu, Aug 5, 2010 at 8:24 PM, powerdroid d...@levelgroundmedia.comwrote: What I'm trying to accomplish is support for devices that have varying screen dimensions and resolutions from the same code base, with each device being scaled properly.. Tip: Search the official documentation and the group first, especially for common problems like these. http://developer.android.com/guide/practices/screens_support.html --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Calling the stop() function of MediaPlayer
can u try calling exit once it is stopped. Lokesh On Sun, Aug 22, 2010 at 11:17 AM, Mark Murphy mmur...@commonsware.comwrote: On Sun, Aug 22, 2010 at 7:09 AM, Luca Carlon carlon.l...@gmail.com wrote: Hi! I don't know if I'm doing something wrong, but I see calling the stop function of MediaPlayer simply does nothing. The playback goes on. I looked in the documentation and I found: Stops playback after playback has been stoppopped.ed or paused. So, I tried to pause() it before stopping, but the MediaPlayer then pauses and resumes the playback. The only thing I can see is that the buffering stops. But the playback continues. Is this the expected behavior? No. Here is a project that behaves correctly: http://github.com/commonsguy/cw-advandroid/tree/master/Media/Audio/ Could the problem be related to the fact that I call the methods of the MediaPlayer object from different threads than the creator by synchronizing with Semaphores? Possibly -- I don't know whether MediaPlayer uses thread-local values or anything. I have only ever used MediaPlayer from a single thread. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Lokesh Gupta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Calling the stop() function of MediaPlayer
Thanks for the link! I see in that code they do: mediaPlayer.stop(); mediaPlayer.prepare(); mediaPlayer.seekTo(0); This way it seems to stop correctly. Still unfortunately, I'm experiencing a strange behavior: after the stop, I let the user open another resource, with: mediaPlayer.reset(); mediaPlayer.setOnBufferingUpdateListener(this); mediaPlayer.setOnCompletionListener(this); mediaPlayer.setOnPreparedListener(this); mediaPlayer.setOnVideoSizeChangedListener(this); mediaPlayer.setDataSource(this, Uri.parse(uri)); mediaPlayer.prepare(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); and it seems that after some stop, open and start, the player start to behave strangely and, for instance, it goes to onCompletion when it shouldn't, it stops buffering correctly and hangs at setDataSource for minutes before going on. Now I tried to use runOnUiThread to make sure only one thread manages the media player. Any idea why? Anyone who also noticed this behavior? Thanks! On 22 Ago, 13:17, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 22, 2010 at 7:09 AM, Luca Carlon carlon.l...@gmail.com wrote: Hi! I don't know if I'm doing something wrong, but I see calling the stop function of MediaPlayer simply does nothing. The playback goes on. I looked in the documentation and I found: Stops playback after playback has been stopped or paused. So, I tried to pause() it before stopping, but the MediaPlayer then pauses and resumes the playback. The only thing I can see is that the buffering stops. But the playback continues. Is this the expected behavior? No. Here is a project that behaves correctly: http://github.com/commonsguy/cw-advandroid/tree/master/Media/Audio/ Could the problem be related to the fact that I call the methods of the MediaPlayer object from different threads than the creator by synchronizing with Semaphores? Possibly -- I don't know whether MediaPlayer uses thread-local values or anything. I have only ever used MediaPlayer from a single thread. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Must pass Context to other classes?
Yes, I'm admittedly weak on object-oriented design experience and still tend to treat classes more like subroutine libraries than true objects. I also miss the ability to simplify life (at least as far as writing the initial code is concerned) by being able to fall back on global variables that are visible everywhere. But learning to program in Java will eventually cure me of this ailment. :-) On Aug 21, 11:38 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Aug 21, 2010 at 11:12 PM, Doug Gordon gordo...@gmail.com wrote: Am I correct that this is the only way to do this? Yes. Also, if I want to use any other Android class that requires a context (e.g. AlertDialog.Builder), I essentially have to pass the context from the main Activity object to any class that needs to use it? Yes. The more you find that you are doing this, the more you have over-engineered your object model, IMHO. I guess my main question is whether there's another way to get the Context without having to pass it from class to class as an argument. No, sorry. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Calling the stop() function of MediaPlayer
You can use Async class as welll wherein u have three methods, onPreexecution, doInbackgound and OnPostexecution. You can try out these .. Lokesh On Sun, Aug 22, 2010 at 12:02 PM, Luca Carlon carlon.l...@gmail.com wrote: Thanks for the link! I see in that code they do: mediaPlayer.stop(); mediaPlayer.prepare(); mediaPlayer.seekTo(0); This way it seems to stop correctly. Still unfortunately, I'm experiencing a strange behavior: after the stop, I let the user open another resource, with: mediaPlayer.reset(); mediaPlayer.setOnBufferingUpdateListener(this); mediaPlayer.setOnCompletionListener(this); mediaPlayer.setOnPreparedListener(this); mediaPlayer.setOnVideoSizeChangedListener(this); mediaPlayer.setDataSource(this, Uri.parse(uri)); mediaPlayer.prepare(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); and it seems that after some stop, open and start, the player start to behave strangely and, for instance, it goes to onCompletion when it shouldn't, it stops buffering correctly and hangs at setDataSource for minutes before going on. Now I tried to use runOnUiThread to make sure only one thread manages the media player. Any idea why? Anyone who also noticed this behavior? Thanks! On 22 Ago, 13:17, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 22, 2010 at 7:09 AM, Luca Carlon carlon.l...@gmail.com wrote: Hi! I don't know if I'm doing something wrong, but I see calling the stop function of MediaPlayer simply does nothing. The playback goes on. I looked in the documentation and I found: Stops playback after playback has been stopped or paused. So, I tried to pause() it before stopping, but the MediaPlayer then pauses and resumes the playback. The only thing I can see is that the buffering stops. But the playback continues. Is this the expected behavior? No. Here is a project that behaves correctly: http://github.com/commonsguy/cw-advandroid/tree/master/Media/Audio/ Could the problem be related to the fact that I call the methods of the MediaPlayer object from different threads than the creator by synchronizing with Semaphores? Possibly -- I don't know whether MediaPlayer uses thread-local values or anything. I have only ever used MediaPlayer from a single thread. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Lokesh Gupta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Must pass Context to other classes?
On Sun, Aug 22, 2010 at 8:05 AM, Doug Gordon gordo...@gmail.com wrote: But learning to program in Java will eventually cure me of this ailment. :-) That's OK. You'll come down with new and exciting ailments once you start getting into Java... :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Failed installs
Did you change the MAIN/LAUNCHER activity when you released the update? If you did you will invalidate any shortcuts the users have created. Only the Icon in the applications panel will work until the user re-creates their shortcuts. On Aug 22, 9:26 am, Teo [GD API Guru] teomina...@gmail.com wrote: Hi, lately i've been receiving reports of failed updates (e.g. myTouch 3G, HTC Incredible) for my app. After the 'failed' update, they're saying they're able to launch the app only from the Open button in the Market, but not from the app icon. Is this happening to other devs too? Anyone knows what this is about? 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
[android-developers] how to upgrade android emulator to Android2.2 froyo.
Hi, As of now I am using Eclairs but wanna upgrade the same to froyo. Please let me know which Adt to use and how to do the same. -- Thanks Regards Lokesh Gupta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: installing sdk problems
Problem solved. It was a local problem in my country, Turkey. dl- ssl.google.com is not reachable here. Adding this line 209.85.229.99 dl-ssl.google.com to host file under windows/system32/drivers/etc resolved problem. btw, wrong size errors were probably because of download limit of the proxies i tried. On Aug 20, 5:55 pm, emre onal emr...@gmail.com wrote: Am I the only one getting so much problems installing the sdk? I am trying to install android in an 64bit Windows7. First when i run setup.exe, i got connection time out exception. Forcing https from the settings menu did not work. Then I tried setting proxy and port numbers from settings menu. I tried different proxies. I could find one which works and at the end I could get available package list. But this time the proxies i tried was too slow, i was downloading with 1kb. Anyway i found a proxy which lets me download with a normal speed but this time i faced new kind of errors, wrong size and 400 Downloading Documentation for Android SDK, API 8, revision 1 Download finished with wrong size. Expected 60112864 bytes, got 3014294 bytes. Downloading SDK Platform Android 2.2, API 8, revision 2 Server returned HTTP response code: 400 for URL:http://dl-ssl.google.com/android/repository/android-2.2_r02-windows.zip Downloading Samples for SDK API 8, revision 1 Download finished with wrong size. Expected 7969716 bytes, got 2670163 bytes. I am in the office but I don't think it is related with firewall or such thing, once before i tried to install at home and i had encountered similar problems. I think it is related with luck :p I will try again at home and if i manage to do i will copy the android folder to my computer in the office :) -- Emre -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Failed installs
Users are referring to the main icons, but the funny thing is i indeed renamed the main activity, thanks for the tip! I'll try naming it back and see what happens. On Aug 22, 3:17 pm, RichardC richard.crit...@googlemail.com wrote: Did you change the MAIN/LAUNCHER activity when you released the update? If you did you will invalidate any shortcuts the users have created. Only the Icon in the applications panel will work until the user re-creates their shortcuts. On Aug 22, 9:26 am, Teo [GD API Guru] teomina...@gmail.com wrote: Hi, lately i've been receiving reports of failed updates (e.g. myTouch 3G, HTC Incredible) for my app. After the 'failed' update, they're saying they're able to launch the app only from the Open button in the Market, but not from the app icon. Is this happening to other devs too? Anyone knows what this is about? 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
[android-developers] So can we use Directions API or not in Android?
I would love to be able to use the Directions API in my Android app, but I'm confused by the information in the Directions API documentation: http://code.google.com/apis/maps/documentation/directions/ so the short form of my question is: can Android apps use the Google Directions API? It clearly states the intended audience includes mobile developers. But it also states that you're limited to 2500 requests per day. Does this mean my app, if deployed to thousands of devices, is in total restricted to 2500 requests per day? How could the Google server tell anyway? Based on IP address? In which case I may be okay. The docs also say no API key is required so again it would seem the Google servers have nothing to use to accumulate a counter of requests per day. Still, I don't want to be in violation of any Google Terms of Service. So is it okay or not? Thanks in advance. - dave -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Must pass Context to other classes?
Yes. The more you find that you are doing this, the more you have over-engineered your object model, IMHO. I don't know, I would actually argue the opposite. IMHO, any object that doesn't need a Context or one of its super or subclasses, is not really targeting the Android platform. The Android specific code can obviously factored out of any class using the Strategy patttern, but I think that just complicates the design and mostly a useful exercise only for cross-platform libraries. It would also requiry violating MY first rule in an AndroidStrategy class: - I never EVER store a Context family object as a member of a class -- I always pass it as an argument. This is to avoid accidentally leaking the context. - The above is true for cases when inner classes need the context, like UI event handlers. In my app, for example, there is a CopyUI class. This CopyUI is comprised of a few dialogs -- it may prompt for a file name, or it may pop-up a warning that the file already exists and it also displays a spinner while copying. The method CopyUI.show() takes a Context, but it's never stored in a member, but instead, it is made final and passed around from dialog to dialog. - I always pass the most appropriate context. For example, if I need to retrieve a string only, I only pass a Resources object. This is more a self-documentation style, than a real requirement, though. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Calling the stop() function of MediaPlayer
Thank, I see... this can be useful. But I suppose this wouldn't solve this issue... As far as I can see, the problem is almost exclusively related to remote resources. Local resources seem to work as expected with the same code. The method setDataSource doesn't hang and no other unexpected behaviors reveal. Any idea what there could be wrong? Am I the only one experiencing this? Thanks for your help! On Aug 22, 2:07 pm, lokesh gupta lokeshgupt...@gmail.com wrote: You can use Async class as welll wherein u have three methods, onPreexecution, doInbackgound and OnPostexecution. You can try out these .. Lokesh On Sun, Aug 22, 2010 at 12:02 PM, Luca Carlon carlon.l...@gmail.com wrote: Thanks for the link! I see in that code they do: mediaPlayer.stop(); mediaPlayer.prepare(); mediaPlayer.seekTo(0); This way it seems to stop correctly. Still unfortunately, I'm experiencing a strange behavior: after the stop, I let the user open another resource, with: mediaPlayer.reset(); mediaPlayer.setOnBufferingUpdateListener(this); mediaPlayer.setOnCompletionListener(this); mediaPlayer.setOnPreparedListener(this); mediaPlayer.setOnVideoSizeChangedListener(this); mediaPlayer.setDataSource(this, Uri.parse(uri)); mediaPlayer.prepare(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); and it seems that after some stop, open and start, the player start to behave strangely and, for instance, it goes to onCompletion when it shouldn't, it stops buffering correctly and hangs at setDataSource for minutes before going on. Now I tried to use runOnUiThread to make sure only one thread manages the media player. Any idea why? Anyone who also noticed this behavior? Thanks! On 22 Ago, 13:17, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 22, 2010 at 7:09 AM, Luca Carlon carlon.l...@gmail.com wrote: Hi! I don't know if I'm doing something wrong, but I see calling the stop function of MediaPlayer simply does nothing. The playback goes on. I looked in the documentation and I found: Stops playback after playback has been stopped or paused. So, I tried to pause() it before stopping, but the MediaPlayer then pauses and resumes the playback. The only thing I can see is that the buffering stops. But the playback continues. Is this the expected behavior? No. Here is a project that behaves correctly: http://github.com/commonsguy/cw-advandroid/tree/master/Media/Audio/ Could the problem be related to the fact that I call the methods of the MediaPlayer object from different threads than the creator by synchronizing with Semaphores? Possibly -- I don't know whether MediaPlayer uses thread-local values or anything. I have only ever used MediaPlayer from a single thread. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twit... _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Lokesh Gupta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Using Multiple Viewports in OpenGL|ES
Hi, I'm trying to get two viewports setup on the screen of the Android Emulator (I have no real Android device as my University only gave me a tablet pc with Windows 7 for development). The FIRST VIEWPORT (orthographic projection) fills the emulators screen and displays a white, screen filling polygon. The SECOND VIEWPORT (perspective projection) is only a square inside the screen and should appear above the other viewport showing a cube. Now, when i have both viewports active I cannot see the white polygon but the smaller viewport with the cube. In case I have the second viewports code in block comments it again apears. I don't get where I have to modify the code that both viewports appear correctly on the emulator. Here are some code snippets: --CODE-- public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Set the background color to red ( rgba ). gl.glClearColor(1.0f, 0.0f, 0.0f, 0.5f); // Enable Smooth Shading, default not really needed. gl.glShadeModel(GL10.GL_SMOOTH); // Depth buffer setup. gl.glClearDepthf(1.0f); // Enables depth testing. gl.glEnable(GL10.GL_DEPTH_TEST); // The type of depth testing to do. gl.glDepthFunc(GL10.GL_LEQUAL); // Really nice perspective calculations. gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); } public void onDrawFrame(GL10 gl) { // Clears the screen and depth buffer. gl.glClear(GL10.GL_COLOR_BUFFER_BIT); // Modelview Matrix selektieren gl.glMatrixMode(GL10.GL_MODELVIEW); // Replace the current Matrix with the identity matrix gl.glLoadIdentity(); // Translates 6 units into the screen gl.glTranslatef(0, 0, -10); // Draw RECTANGLE square.draw(gl); // CUBE // Save the current matrix gl.glPushMatrix(); gl.glTranslatef(0, 0, -5); // Draw the cube root.draw(gl); // Restore the last matrix gl.glPopMatrix(); } public void onSurfaceChanged(GL10 gl, int width, int height) { for(int i = 0; i 2; i++) { if(i==0) { // Main Viewport gl.glViewport(0, 0, width, height); // Select the projection matrix gl.glMatrixMode(GL10.GL_PROJECTION); // Reset the projection matrix gl.glLoadIdentity(); // Setup orthographic projection. Consider aspect ratio to avoid distortion. if(width height) { gl.glOrthof(-1.0f, 1.0f, -1.0f * height / width, 1.0f * height / width, -2.0f, 10.0f); } else { gl.glOrthof(-1.0f * width / height, 1.0f * width / height, -1.0f, 1.0f, -2.0f, 10.0f); } GLU.gluLookAt(gl, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f); } if(i==1) { // Sets the cube's viewport. gl.glViewport(width/2, height/3, width/ 2, height/3); // Select the projection matrix gl.glMatrixMode(GL10.GL_PROJECTION); // Reset the projection matrix gl.glLoadIdentity(); // Calculate the aspect ratio of the window GLU.gluPerspective(gl, 45.0f, (float) width / (float) height, -2.0f, 10.0f); GLU.gluLookAt(gl, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f); } // Select the modelview matrix gl.glMatrixMode(GL10.GL_MODELVIEW); // Reset the modelview matrix gl.glLoadIdentity(); // Clear Depth Buffer gl.glClear(GL10.GL_DEPTH_BUFFER_BIT); } } --CODE-- Here is a screenshot how it looks in the emulator when I have both viewports active: http://userpages.uni-koblenz.de/~saditanis/picture.jpg Maybe somebody can tell me if I have an errror in reasoning! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
[android-developers] Re: Share library
Hi Mark, What I mean is, rather than writing code that talks to Facebook, Twitter, etc, I wonder if anyone had already released this as a library I can use. I tried googling but share xxx brings up unrelated stuff. On Aug 22, 10:16 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 22, 2010 at 5:10 AM, samspade79 samspad...@gmail.com wrote: Does anyone know of a library that will give me the share functionality for pictures? Ie, how in many apps now you are given the option of sharing a page or image with facebook, twitter, email, sms, etc. I am not quite certain what you mean by your question. If you are looking to determine what services allow you to share, construct an ACTION_SEND Intent that describes what you want to share and use PackageManager and queryIntentActivities() to find out details of who all supports that action. If you are looking to determine what applications *request* ACTION_SEND Intents, I don't think there's a way to do that sort of reverse lookup. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Running JUnit 4 Tests on Android Device
Just put the JUnit 4 jar before the Android jar in the classpath. This will hide the JUnit 3 classes. Note that you must not use any Android classes in your test! You will get Stub! exceptions if you do. If you need a few basic Android classes in your tests (like Intent and Bundle), add simple replacements to your test folder. Try to separate testing close to Android with the Android testing framework (JUnit 3 based), and core logic without Android framework dependencies (using JUnit 4) and you're good to go.. Cheers, tfdj On Aug 16, 9:39 pm, Eric e...@alum.mit.edu wrote: Hello, As the first step of the port of my existing Java swing application to Android, I'd like to get the non-UI logic unit tests running on the Android device. The unit tests are written against JUnit 4. It looks like Android 2.2 comes with JUnit 3 as the default. Is there an easy way (or any way) to bootstrap JUnit 4 as the test runner? I am using IDEA as my dev environment, but it doesn't appear there's any settings that will allow me to specify JUnit 4. - Eric -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Any Interview Question
I agree I generally don't like to see packed resumes with so much bs... :P In any case assuming you are proficient in Android they will probably ask: Q: Can you start an activity via a Broadcast Intent? A: try it out... Prbl many things in regards to Intents... how to use them... etc... That's on of the big things in Android... Services, Activities what are their differences... Read the whole Android.com site! :P -Moto On Aug 22, 12:28 am, TreKing treking...@gmail.com wrote: On Sat, Aug 21, 2010 at 1:48 PM, Vinay Julme vinayju...@gmail.com wrote: I just love that you follow this: Don't demoralizes the kid. Immediately with this: and Yo kid Rajesh have you heard something called Google? OP: I think what they're trying to say is if you need people to send you questions about something that is a new technology for you, you may not be quite ready to be interviewing for the position. Besides that, Vinay's advice is quite sound. Good luck. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Animation support different resolution rate?
I use Animation Translate in my application,my mobile phone resolution rate is 320*280,but In the 480*800 resolution rate don't support.I want ask I should how to do ? -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] So can we use Directions API or not in Android?
As far as I know, the 2500 requests per day is for all applications out there (be it desktop, mobile or whatever), so your application really can't rely on this directions API since it can be brought offline in less then an hour by all the applications using it. (And in my opinion that's why noone is using it for anything but debugging.) 2010/8/22 davemac davemac...@gmail.com I would love to be able to use the Directions API in my Android app, but I'm confused by the information in the Directions API documentation: http://code.google.com/apis/maps/documentation/directions/ so the short form of my question is: can Android apps use the Google Directions API? It clearly states the intended audience includes mobile developers. But it also states that you're limited to 2500 requests per day. Does this mean my app, if deployed to thousands of devices, is in total restricted to 2500 requests per day? How could the Google server tell anyway? Based on IP address? In which case I may be okay. The docs also say no API key is required so again it would seem the Google servers have nothing to use to accumulate a counter of requests per day. Still, I don't want to be in violation of any Google Terms of Service. So is it okay or not? Thanks in advance. - dave -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Share library
I use the share options available by Android devices. Most apps such as facebook or other twitter apps support the share intent. You can actually see the intent call on the logcat if you do a share on a picture Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType(text/plain); Moto On Aug 22, 10:53 am, samspade79 samspad...@gmail.com wrote: Hi Mark, What I mean is, rather than writing code that talks to Facebook, Twitter, etc, I wonder if anyone had already released this as a library I can use. I tried googling but share xxx brings up unrelated stuff. On Aug 22, 10:16 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 22, 2010 at 5:10 AM, samspade79 samspad...@gmail.com wrote: Does anyone know of a library that will give me the share functionality for pictures? Ie, how in many apps now you are given the option of sharing a page or image with facebook, twitter, email, sms, etc. I am not quite certain what you mean by your question. If you are looking to determine what services allow you to share, construct an ACTION_SEND Intent that describes what you want to share and use PackageManager and queryIntentActivities() to find out details of who all supports that action. If you are looking to determine what applications *request* ACTION_SEND Intents, I don't think there's a way to do that sort of reverse lookup. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Adding a contact without a READ_CONTACTS permission
It is very hard to ensure that someone with write access can't also get data back from the provider, so generally no. It's a bit lame, imho. According to Google, developers should use the least permissions possible. But how can we do that if we have to use READ_CONTACTS to write contacts? Personally, I get suspicious when an app wants to read my contacts. editor with your data to allow the user to be involved with adding it, using SHOW_OR_ADD_CONTACT:http://developer.android.com/reference/android/provider/ContactsContr... Thanks, that is a good alternative. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: C2DM properly working on the emulator, anybody?
Answering my own question here. I solved it and in my case the problem was that my Google account on the phone wasn't set up to sync and do background data. You can enable that by going to Settings and editing you Google account info under Accounts. Now I have the ChromeToPhone app working fine on the emulator. Best! German On Aug 21, 3:50 am, German germanvisc...@gmail.com wrote: Hello! I looked all over the web and in this group for a solution but I don't seem to have any luck. I'm probably not the only developer that needs to try C2DM on the emulator so a solution to this could be quite useful. First of all let me say that I'm running the latest Google APIs 8 rev 2 as AVD which should have all the necessary magic to allow me to run C2DM (it even has all the market components to run the LVL). I tried both Chrome to Phone and Jumpnote and it was impossible to make the C2DM service work. - Chrome to Phone fails when trying to connect from the Android app running on the emulator with a Error: Unable to connect. On the Chrome to Phone site they recommend that Talk should be tried first and that the Market should be available (none of these come in the emulator image and I'm not sure if I should even try to install them on the emulator). - Jumpnote does not synchronize automatically and gives me an error: Error calling remote note sync RPC (when I do a manual sync I can see the docs being synchronized but looks like C2DM, which enables the auto sync, is broken). I also heard a comment that maybe port forwarding via adb could be necessary (but I'm really not sure this makes any sense). So can anybody confirm or deny that C2DM enabled apps can be run properly on the emulator? (eg Jumpnote, Chrome to Phone). How can I test C2DM on the emulator? Alternatively, does anybody know of an AVD image with all features on it? (full Market, Talk, etc) Best!! Thx in advance. German -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Empty Spinner before first selection
On Sun, Aug 22, 2010 at 4:52 AM, William Ferguson william.ferguson.au@ gmail.com wrote: Thanks, though I wasn't confused about which Listener I needed to set in order to respond to a selection from a user. Oh, well you posted you tried two different things that were throwing exceptions ... so that's the implication I got. Sorry. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to distribute expensive Android app
On Sun, Aug 22, 2010 at 6:04 AM, RLScott fixthatpi...@yahoo.com wrote: Sure. It is TuneLab Piano Tuner, and among my competition, which are similar programs on the Pocket PC (Verituner and Reyburn CyberTuner), mine is actually the cheapest. Thanks. That's the cheapest? I think I'm working on the wrong type of app ... =P - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to distribute expensive Android app
On Sat, Aug 21, 2010 at 5:13 PM, RLScott fixthatpi...@yahoo.com wrote: So the $300 price point is necessary. However I have heard that the Google Android Market puts a limit of $200 on apps. Also, for your $200 limit problem, here's an idea: distribute TWO $150 apps - one that's the primary app and another that is a key which the former won't work without. Your main app checks for the key on startup and only works if it's present. Many people do this for upgrading a free app to a paid app - don't see why you can't use the same concept. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Any Interview Question
Hi, I don't know what is there in the post which made u to think it's funny. But anyway i have experience in android application development. But i don't have experience in android server side. I also searched in google for interview questions related to android server side. But i couldn't get much information. It would be great if u can help me here by providing any documents which tells more about android server side concepts(like connecting database from the server) Thanks Regards, Rajesh On Aug 21, 11:26 pm, Miguel Morales therevolti...@gmail.com wrote: I hope you're joking because this post is funny. I don't understand how you can have an interview but don't know how to use google for information about Android. I hope never to use any software you write. On Sat, Aug 21, 2010 at 7:55 AM, crajesh crajesh2...@gmail.com wrote: Hi, Can any one send me some basic information about Android. I have a interview. I really want to work in Android technology, its a new technology for me. so i need some help. Any one send me the interview question plz My email address is crajesh_2...@yahoo.co.in crajesh2...@gmail.com Thanks C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --http://developingthedream.blogspot.com/,http://diastrofunk.com,http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Must pass Context to other classes?
On Sun, Aug 22, 2010 at 7:05 AM, Doug Gordon gordo...@gmail.com wrote: I also miss the ability to simplify life (at least as far as writing the initial code is concerned) by being able to fall back on global variables that are visible everywhere. Well, you can, technically still use global variables in Java, but I would certainly argue that they usually complicate life, not simplify it. On Sun, Aug 22, 2010 at 8:05 AM, Zsolt Vasvari zvasv...@gmail.com wrote: IMHO, any object that doesn't need a Context or one of its super or subclasses, is not really targeting the Android platform. I completely disagree. Sure, you need Context pretty much everywhere the UI and other Android specifics are concerned, but your core objects that represent the general layout of your application should not know anything about what a Context is or have any reason to use it. Just because Context is usually readily available (in your Activity or Service) does not mean you should force arbitrary dependencies on it. The Android specific code can obviously factored out of any class using the Strategy patttern, but I think that just complicates the design and mostly a useful exercise only for cross-platform libraries. I think (a variation of) MVC is more appropo in this case and definitely simplifies things, IMO. Example: in my app I have a Bus object. This has absolutely no reason to know about Context or the Android platform in general. However, when I, say, plot a bus on a map, it's *view* knows about the bus and how it should be displayed, using the current Context. I agree with everything else, though. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Any Interview Question
I don't know why you think there's something Android-specific on the server side. Excepting, of course the market, LVL and perhaps C2DM. However most client-server communication between Android and a server, respectively, generally follow these three patterns: 1) document-centric, such as XML, RSS, HTML, JSON 2) RPC, such as SOAP (almost a legacy these days) 3) REST -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Best way to scale for different screen resolutions/dimensions?
Do you have this in your manifest? supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:anyDensity=true / Are you compiling against Android 1.6 (at least)? -- Kostya 22.08.2010 15:54, powerdroid пишет: The problem, and it may be that I'm misunderstanding how Android handles different screen sizes, is that when trying to incorporate the material found on the Supporting Multiple Screens developer doc, it appears to always display in compatibility mode. If one has a custom layout, or a SurfaceView, and wants to build for HVGA, is there a way to have the OS scale everything nicely when used on other sized screens? Is there a place to define the intended layout or SurfaceView dimensions that are used as the basis for any automatic scaling the OS does (if indeed automatic scaling is possible)? I'm just confused on the process to use and the settings to set. Since all drawing will be custom, similar to a game concept drawing bitmap objects directly, it just seems a little different than if there was a UI with widgets. Does anyone have any experience or pointers? On Aug 6, 9:04 am, Warrenwarrenba...@gmail.com wrote: Check out onMeasure() and onLayout(). Those functions are called while views are being positioned, etc. On Aug 6, 7:51 am, TreKingtreking...@gmail.com wrote: On Thu, Aug 5, 2010 at 8:24 PM, powerdroidd...@levelgroundmedia.comwrote: What I'm trying to accomplish is support for devices that have varying screen dimensions and resolutions from the same code base, with each device being scaled properly.. Tip: Search the official documentation and the group first, especially for common problems like these. http://developer.android.com/guide/practices/screens_support.html --- -- TreKinghttp://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Animation support different resolution rate?
Cary, Redo your layouts using device-independent units (dp) instead of pixels if you use them, and use % values in animation definitions (e.g. animate -100% to 0% or some such). -- Kostya 22.08.2010 19:23, CaryWang пишет: I use Animation Translate in my application,my mobile phone resolution rate is 320*280,but In the 480*800 resolution rate don't support.I want ask I should how to do ? -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: connecting mysql database
One more thing to consider: network latency. Requesting data over HTTP requires one round-trip for data, in addition to TCP session setup. The latter can be all but eliminated by using HTTP connection keep-alive. DB protocols can be more chatty, requiring more network round-trips to get the same data. This can result in lowered performance. -- Kostya 22.08.2010 13:49, Mark Murphy пишет: On Sun, Aug 22, 2010 at 5:32 AM, Timt...@mobiforms.com wrote: A direct connection to a remote database is perfectly secure, usable and technically possible particularly if the Android device is connecting via a secure wi-fi network or a GPRS/3G network where the SIM is part of a private APN. Unlike J2ME for example, the Android framework supports full database JDBC connectivity. However, the database connection protocols are designed with reliable LANs in mind. Neither WiFi nor 3G are reliable, simply because device owners have the audacity to move around, sometimes while doing the unthinkable and actually using their devices. :-) -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Share library
Hmmm it never occured to me that I could just use that. On Aug 22, 4:57 pm, Moto medicalsou...@gmail.com wrote: I use the share options available by Android devices. Most apps such as facebook or other twitter apps support the share intent. You can actually see the intent call on the logcat if you do a share on a picture Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType(text/plain); Moto On Aug 22, 10:53 am, samspade79 samspad...@gmail.com wrote: Hi Mark, What I mean is, rather than writing code that talks to Facebook, Twitter, etc, I wonder if anyone had already released this as a library I can use. I tried googling but share xxx brings up unrelated stuff. On Aug 22, 10:16 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 22, 2010 at 5:10 AM, samspade79 samspad...@gmail.com wrote: Does anyone know of a library that will give me the share functionality for pictures? Ie, how in many apps now you are given the option of sharing a page or image with facebook, twitter, email, sms, etc. I am not quite certain what you mean by your question. If you are looking to determine what services allow you to share, construct an ACTION_SEND Intent that describes what you want to share and use PackageManager and queryIntentActivities() to find out details of who all supports that action. If you are looking to determine what applications *request* ACTION_SEND Intents, I don't think there's a way to do that sort of reverse lookup. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] TabIndicator's tab_selected/tab_unselected drawables are white in v1.6 and grey in v2.x
Hi From the TabWidget example in the docs, this is what the tabs look like in v1.5/1.6: http://developer.android.com/resources/tutorials/views/images/hello-tabwidget.png As you can see, the TabIndicator is white, with the icon in grey. In v2.x the TabIndicator is no longer white, but grey. This, then, leads to the issue of the tab's selected/unselected icons not being visible on one platform or the other (i.e. if the icon is white, it won't show up on the white background in v1.5/v1.6 but is OK on v2.x and vice-versa). So, my current thoughts are to essentially flip the icons and put them in resource directories specific to the platforms (i.e. using the v3 and v4 qualifiers). Is there another workaround that I'm missing? Cheers James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: connecting mysql database
In other words, eat cake. On Aug 21, 6:26 pm, Bob Kerns r...@acm.org wrote: Re: This is a limitation/shortcoming/feature of Android. No, it's not. It's a characteristic of SQL database connections, vs the characteristics of distributed clients. This is not new with Android -- well-written desktop applications use a service layer rather than direct connection to the SQL database. There are many, many very important reasons for this, from performance and scalability to network reliability. But to my mind, the single most important reason for it is this: If you change your database schema for whatever reason, you are not able to force all of the clients to synchronously update to use that brand-new schema. Yes, you can use views, triggers, and such to try to mask such changes, but they're both extremely awkward to maintain and quite limited, and often negate the very benefit you wanted to achieve with the schema change. I would even agree with Miguel's formulation, that Any decent developer should know this -- if you take it as advice. This is core architectural savvy that if a developer is not familiar with, he should seek to remedy. And -- despite it not being useful in this way -- I would also say that a solid knowledge of SQL is something any well-rounded developer should acquire. Put them on the list with all the others... But the bottom line is, the advice to not use SQL this way has nothing at all to do with Android, or Java. And only a bit to do with being on a mobile device. On Aug 21, 11:53 am, DanH danhi...@ieee.org wrote: Any decent developer should know this. That's unfair. The OP did state that he was new to Android, and on other platforms you CAN connect directly to a remote database. This is a limitation/shortcoming/feature of Android. On Aug 21, 1:24 pm, Miguel Morales therevolti...@gmail.com wrote: Don't connect to mysql directly from the android device. Any decent developer should know this. You'll have to create a web frontend for your data/app probably using a RESTful style. http://code.google.com/events/io/2010/sessions/developing-RESTful-and... On Sat, Aug 21, 2010 at 11:05 AM, Frank Weiss fewe...@gmail.com wrote: Out of the many ways to interpret your question, I'm going to assume your Android app needs to query certain data you have in a MySQL database running on a server on the internet. The typical way that's done is add a web service on that server that performs the SQL queries locally and returns XML or JSON data to the Android app. I suppose it would help if you explained how data in that database is currently being accessed. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --http://developingthedream.blogspot.com/,http://diastrofunk.com,http:/..., ~Isaiah 55:8-9 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Share library
On Sun, Aug 22, 2010 at 8:57 AM, Moto medicalsou...@gmail.com wrote: I use the share options available by Android devices. Most apps such as facebook or other twitter apps support the share intent. You can actually see the intent call on the logcat if you do a share on a picture Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType(text/plain); You should wrap this in an intent chooser with Intent.createChooser(). That will get rid of the make this the default checkbox etc. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Toggle Button state programatically
Any clue on this anyone? On Aug 20, 10:32 am, Abhi abhishek.r.sha...@gmail.com wrote: Hi I am trying to toggle button state programatically. I want to go between setEnabled(False) and setEnabled(True) for a given duration. I have a timer and I want to toggle between these states at regular time intervals. I see that the button toggles correctly the first time, for e.g. from True state to False state, but doesn't go back to True state again unless I touch the button, which is kinda weird. Can someone help me on this? Thanks, Abhi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Must pass Context to other classes?
On Sun, Aug 22, 2010 at 10:41 AM, TreKing treking...@gmail.com wrote: On Sun, Aug 22, 2010 at 7:05 AM, Doug Gordon gordo...@gmail.com wrote: I also miss the ability to simplify life (at least as far as writing the initial code is concerned) by being able to fall back on global variables that are visible everywhere. Well, you can, technically still use global variables in Java, but I would certainly argue that they usually complicate life, not simplify it. It's all about how you use them. For example, a static to hold a reference on a singleton instance of a class is extremely useful and can simplify things greatly. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Want titles different on home icon versus activity
When the app starts up it shows the activity label property in the title bar. If you set a different title for the activity in onCreate that will show up later. You see the launcher activity title for a while and then the programmatic title replaces it, which is not very nice visually. The icon on the home screen uses the label for the activity. What I'm trying to do is get a label for the icon on the home screen that is different from the activity title bar. I tried setting the intent- filter label, but that didn't appear under the home screen icon. There is a label property for the application, the activity, and the intent-filter. The activity label is shown for the icon and the title and the other label properties are not shown Any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Best way to scale for different screen resolutions/dimensions?
Or just android:targetSdkVersion=4 or better. On Sun, Aug 22, 2010 at 10:59 AM, Kostya Vasilyev kmans...@gmail.comwrote: Do you have this in your manifest? supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:anyDensity=true / Are you compiling against Android 1.6 (at least)? -- Kostya 22.08.2010 15:54, powerdroid пишет: The problem, and it may be that I'm misunderstanding how Android handles different screen sizes, is that when trying to incorporate the material found on the Supporting Multiple Screens developer doc, it appears to always display in compatibility mode. If one has a custom layout, or a SurfaceView, and wants to build for HVGA, is there a way to have the OS scale everything nicely when used on other sized screens? Is there a place to define the intended layout or SurfaceView dimensions that are used as the basis for any automatic scaling the OS does (if indeed automatic scaling is possible)? I'm just confused on the process to use and the settings to set. Since all drawing will be custom, similar to a game concept drawing bitmap objects directly, it just seems a little different than if there was a UI with widgets. Does anyone have any experience or pointers? On Aug 6, 9:04 am, Warrenwarrenba...@gmail.com wrote: Check out onMeasure() and onLayout(). Those functions are called while views are being positioned, etc. On Aug 6, 7:51 am, TreKingtreking...@gmail.com wrote: On Thu, Aug 5, 2010 at 8:24 PM, powerdroidd...@levelgroundmedia.com wrote: What I'm trying to accomplish is support for devices that have varying screen dimensions and resolutions from the same code base, with each device being scaled properly.. Tip: Search the official documentation and the group first, especially for common problems like these. http://developer.android.com/guide/practices/screens_support.html --- -- TreKinghttp://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to check the Foreground Process from a Service
Note that these methods are very much not intended for doing anything except presenting UI to the user about what is running. Do not rely on them to drive logic in your app. You will ultimately be unhappy. On Sat, Aug 21, 2010 at 11:35 PM, Pent tas...@dinglisch.net wrote: Does anyone know how to, or if it's even possible to check the (foreground process/top of the activity stack) from a service? It is possible, see the ActivityManager class functions like getRunningAppProcesses(). getRunningTasks() looks useful but is flakey in my experience e.g. when you return to the launcher it is sometimes not updated. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to check the Foreground Process from a Service
The OP didn't specify whether he needs to track activities of other apps, or his own. If it's his own activities, it could be as simple as tracking state changes in activities' onStart/onStop or onResume/onPause. More reliable, too. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 23.08.2010 1:00 пользователь Chris Stratton cs07...@gmail.com написал: I had something sort of working once, but it kept doing things like reporting an ime as the foreground, rather than the activity it was accepting input on behalf of... which made it useless for my purpose. On Aug 22, 4:29 pm, Dianne Hackborn hack...@android.com wrote: Note that these methods are very... On Sat, Aug 21, 2010 at 11:35 PM, Pent tas...@dinglisch.net wrote: Does anyone know how 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... hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private suppo... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Empty Spinner before first selection
I tried that, but AbsSpinner#setAdapter makes use of package private fields and methods of its super classes which I don't have access to. I even tried creating my subclass in the same package (android.widget) but to no avail. Is the shipped SDK doing something to specifically hide fields and methods like AdapterView#mOldItemCount and AdapterView#setselectedPositionInt in 2.1 and 2.2? On Aug 22, 8:03 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Aug 22, 2010 at 5:52 AM, William Ferguson william.ferguson...@gmail.com wrote: It all hinges on the code in AbsSpinner#setAdapter if (mAdapter != null) { ... mItemCount = mAdapater.getCount(); int position = mItemCount 0 ? 0 : INVALID_POSITION; setSelectedPositionInt(position); setNextSelectedPositionInt(position); ... } which selects the first element in the Adapter when the Adapter is set. But if it was if (mAdapter != null) { ... mItemCount = mAdapater.getCount(); int position = INVALID_POSITION; setSelectedPositionInt(position); setNextSelectedPositionInt(position); ... } then initial selection of the Spinner would be configurable instead of always being the first element. Subclass Spinner, override setAdapter() to behave how you want, and use it. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to check the Foreground Process from a Service
I had something sort of working once, but it kept doing things like reporting an ime as the foreground, rather than the activity it was accepting input on behalf of... which made it useless for my purpose. On Aug 22, 4:29 pm, Dianne Hackborn hack...@android.com wrote: Note that these methods are very much not intended for doing anything except presenting UI to the user about what is running. Do not rely on them to drive logic in your app. You will ultimately be unhappy. On Sat, Aug 21, 2010 at 11:35 PM, Pent tas...@dinglisch.net wrote: Does anyone know how to, or if it's even possible to check the (foreground process/top of the activity stack) from a service? It is possible, see the ActivityManager class functions like getRunningAppProcesses(). getRunningTasks() looks useful but is flakey in my experience e.g. when you return to the launcher it is sometimes not updated. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Empty Spinner before first selection
No need to apologise. I appreciate the help, I really do. I guess I just wasn't clear enough in my original post. I'll try and do better next time. On Aug 23, 2:47 am, TreKing treking...@gmail.com wrote: On Sun, Aug 22, 2010 at 4:52 AM, William Ferguson william.ferguson.au@ gmail.com wrote: Thanks, though I wasn't confused about which Listener I needed to set in order to respond to a selection from a user. Oh, well you posted you tried two different things that were throwing exceptions ... so that's the implication I got. Sorry. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Empty Spinner before first selection
On Sun, Aug 22, 2010 at 5:44 PM, William Ferguson william.ferguson...@gmail.com wrote: Is the shipped SDK doing something to specifically hide fields and methods like AdapterView#mOldItemCount and AdapterView#setselectedPositionInt in 2.1 and 2.2? Well, the latter might have an @hide directive. You may need to copy more than one class into your own package (AdapterView, AbsSpinner, Spinner) to achieve your desired effect. Personally, I'd just let the Spinner have some existing value as its default. After all, all Spinner values should be valid. Setting the default means some percentage of users will have one less touch-screen thing to manipulate, and no matter how slick we make these devices, user input is a pain for users. You may feel there is value in forcing everyone to make a choice from the Spinner; your users may not necessarily agree. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: connecting mysql database
Sometimes it is black and white. And sometimes, just a very dark gray against a very bright background. On the surface, at least, your Sync Server would appear to be a far superior approach. On Aug 22, 2:32 am, Tim t...@mobiforms.com wrote: I think it is rather presumptuous of some commentators to suggest one approach is either right or wrong. The real world is never this black or white. A direct connection to a remote database is perfectly secure, usable and technically possible particularly if the Android device is connecting via a secure wi-fi network or a GPRS/3G network where the SIM is part of a private APN. Unlike J2ME for example, the Android framework supports full database JDBC connectivity. Android also supports many technical solutions to supporting offline connectivity that does not just involve REST and web services. Our MobiForms Developer rapid application development tool for example supports the creation of apps that can directly connect to a multitude of back office databases via JDBC. We do not currently support MySQL in this direct mode, but this is a licensing issue rather than a technical issue. The complementary MobiForms Sync Server also supports bi-directional data replication, synchronisation and offline buffering between just about any back office database or ERP package (such as Oracle Apps, SAP, Navision, Dynamics etc.), and Google Android or others such as Windows Mobile. Supported back office databases include Oracle, SQL Server, Access, Sybase, IBM DB2, SQLite, HSQLDB and MySQL For more information go to:http://www.mobiforms.com. crajesh wrote: Hi All, I am new in android. I want to know to connect the mysql database. Please give your opinion and give also examples on how to use any of the solutions. Thanks everyone in Advance. C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Intent not opening correct ativity
Hello, I'm having a struggle understanding why my intent is not working.. I basically just copied paste from other examples in my code that work perfectly like this.. here it is: Intent addIntent = new Intent(v.getContext(), thenNnowMode.class); Bundle w = new Bundle(); String activityName = addPic; w.putString(activity, activityName); w.putParcelable(bitmap, selectedDeviceImage); //a.putString(id, picId); addIntent.putExtras(w); startActivity(addIntent); finish(); The intent is opening a different class called thenNnow.class instead of thenNnowMode.class.. and I have no idea why this is happening.. any suggestion? I've tried sending the intent to open other activities other than thenNnowMode but it always opens thenNnow.. am I missing some silly syntax mistake? It's so strange.. its the same code PS: Im not sure if it's relevant but the thenNnowMode class uses the device camera -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Weird behaviour on Nexus phone ?
Hi all, After developing my application and Installing it on nexus phone,and open it after a while it causes the phone to be switched off ?? Is it possible for an application to cause that ??? however in this application I didn't involve any power management API's Regards, -- tarek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android and Proguard
To integrate an Ant build step into your Eclipse project, go to the Builders section in the project properties, and add an Ant builder, tell it what targets and when to run them, etc. You get to tell it what changes trigger it, and what changes it produces. But I wouldn't recommend integrating ProGuard into a development build process, for any number of reasons. Nor would I do production builds with an Eclipse-based build process, for an entirely different set of reasons. If you use Proguard correctly, it doesn't mess up your stack traces, it obfuscates them, and you then unobfuscate them when you need them. You can set that up to be pretty convenient, but it's not as convenient as reading the trace in an email and instantly knowing the problem -- you'll have to feed it to the stack trace unobfuscator first. Using it correctly that way requires a certain amount of effort, planning, and discipline. That can be more of a distraction than the value it adds -- as can the learning curve, as you experienced. As an indication of where I stand on that -- I have yet to apply Proguard to an Android project. I expect it would take me a couple of days of fiddling and testing and build engineering and testing and setting up the tracking of the data for deobfuscation, and more testing etc. If it's your first Proguard project, I'd suggest allowing a week for a small project, or two for a large one. If obfuscation, or optimization, are worth that size investment, go for it. But don't do it just because it's there, and you want to keep your code secret. On Aug 22, 12:24 am, String sterling.ud...@googlemail.com wrote: As far as I could work out, no. ProGuard needs to be inserted into middle of the build process, and while ant lets you do this, Eclipse does not (at least, not for someone at my level of expertise). It seems likely Google will integrate ProGuard into the Eclipse plugin at some point, but that hasn't happened yet. Personally, I gave up on ProGuard - after several hours of messing around - when it threw several hundred errors on my app. I also am not impressed with optimization that makes my stack traces worthless, thank you very much. String On Aug 21, 7:58 am, neptune2000 papa.ma...@gmail.com wrote: There are several tutorials online for using ProGuard with an Android Ant build. There is nothing for using ProGuard with and Eclipse Android Package build. Is this possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Weird behaviour on Nexus phone ?
Post the LogCat please On Aug 22, 11:46 pm, tarek attia tarek.m.at...@gmail.com wrote: Hi all, After developing my application and Installing it on nexus phone,and open it after a while it causes the phone to be switched off ?? Is it possible for an application to cause that ??? however in this application I didn't involve any power management API's Regards, -- tarek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] android 2.1 issue
Hi All, I have a app that runs properly on andorid 1.6 and on my test G1 phone. It is force closing on the new Android 2.1 phones.I am parsing XML( from internet) and displaying in a listview. Is the openstream() method no longer supported. If I debug the app in api level 7, xml is correctly parsed when I step execute it, as soon as I hit continue the app gives the following stack. Any ideas? here is the stack Thread [3 main] (Suspended (exception NullPointerException)) ViewRoot.draw(boolean) line: 1373 ViewRoot.performTraversals() line: 1114 ViewRoot.handleMessage(Message) line: 1633 ViewRoot(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4363 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 860 ZygoteInit.main(String[]) line: 618 NativeStart.main(String[]) line: not available [native method] -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Adding a contact without a READ_CONTACTS permission
If we can't ensure that an application with WRITE_CONTACTS can't actually use that to extract contact information, it is lame to lie to the user that there is such a guarantee. As I said, my recommendation would be to use the add contact UI, which requires *no* permissions. On Sun, Aug 22, 2010 at 9:06 AM, Pinheiro rui.c.pinhe...@gmail.com wrote: It is very hard to ensure that someone with write access can't also get data back from the provider, so generally no. It's a bit lame, imho. According to Google, developers should use the least permissions possible. But how can we do that if we have to use READ_CONTACTS to write contacts? Personally, I get suspicious when an app wants to read my contacts. editor with your data to allow the user to be involved with adding it, using SHOW_OR_ADD_CONTACT: http://developer.android.com/reference/android/provider/ContactsContr... Thanks, that is a good alternative. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Animation support different resolution rate?
I use % in animation xml translate android:fromYDelta=0% android:toYDelta=-100% android:duration=5000 / in 320*280 ok.but 480*800.. 2010/8/23 Kostya Vasilyev kmans...@gmail.com Cary, Redo your layouts using device-independent units (dp) instead of pixels if you use them, and use % values in animation definitions (e.g. animate -100% to 0% or some such). -- Kostya 22.08.2010 19:23, CaryWang пишет: I use Animation Translate in my application,my mobile phone resolution rate is 320*280,but In the 480*800 resolution rate don't support.I want ask I should how to do ? -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Cary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] setBackgroundColor changes button shape
I have a button on my app that I want to change the color of during different states of my application. However when I call btn.setBackgroundColor(Color.GREEN); the shape of the button changes. The rounded edges go away and I get a flat looking rectangle that is green. Is there a reason the shape is changing? Is there a a way to change the button color without the shape changing? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get absolute time ?
Yes... the reboot is problem... so I think I need a current time and remind time. 1. get current time - this time should not be changed by user or location or anything else : absolute time?? 2. save remind time as a sharedreference. ( ex. remind time = current time + 30minutes) 3. start timer 4. If the device reboot before remind time, the timer will be re-set based on the saved remind time. how about this? In this case, I need only current absolute time. Are there any methods for it?? (I think the absolute time what I'm saying will be used for DRM check...) On 8월20일, 오후9시17분, String sterling.ud...@googlemail.com wrote: On Aug 20, 11:17 am, Filip Havlicek havlicek.fi...@gmail.com wrote: I think he thought on device reboot. Although I'm not sure if PendingIntents are stored before device powering off. Alarms do not persist through a reboot, no. If the OP wants something like that to happen, they'll need to set up a receiver for Intent.ACTION_BOOT_COMPLETED, and re-set the alarm there. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Adding a contact without a READ_CONTACTS permission
Giving the program permission to write what it cannot read sounds like a recipe for trouble. If anything, I would expect the finer granulation of permission to go exactly the other way, i.e. granting permission to read contacts w/o permission to write them. But we don't get that either. Not having it still sounds to me like a small loss, though. Writing what you cannot read is like painting your windshield black before driving your car out of the driveway. I can do without permissions for doing that. If a program asked for such permissions, I would assume the author was crazy. I can think of use cases for reading contacts w/o write permissions, but they are not THAT compelling. So I can see making it a feature request, but I can't see expecting a very high priority for it. After all, it seems Google was more concerned about someone reading your contacts to get your private information than they were about a malicious program writing bogus values to your contacts (though I can see that as an attack vector too). On Aug 22, 9:06 am, Pinheiro rui.c.pinhe...@gmail.com wrote: It is very hard to ensure that someone with write access can't also get data back from the provider, so generally no. It's a bit lame, imho. According to Google, developers should use the least permissions possible. But how can we do that if we have to use READ_CONTACTS to write contacts? Personally, I get suspicious when an app wants to read my contacts. editor with your data to allow the user to be involved with adding it, using SHOW_OR_ADD_CONTACT:http://developer.android.com/reference/android/provider/ContactsContr... Thanks, that is a good alternative. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Button State does not toggle automatically!! Help!
Guys, I am trying to get the button in my layout to have focus as I am programmatically changing its state. My application is a video player using VideoView. I am toggling the state of the button based on where my video is. So basically, I am doing videoview.getCurrentPosition() and if it is in a certain window, I want to toggle my Button state (enabled to disabled and vice versa). The layout is LinearLayout and I have the VideoView and Button layed horizontally. When I first had the MediaController in my Video, the button would change focus on touching the videoview (which is when the MediaController would pop up). I later removed the controller because I didn't want the button state to change when the user touches the screen. I want it to change automatically. I tried all sorts of combinations possible. button.setFocusable(), button.requestFocus(), button.bringToFront() and so on. But none of them seem to work. Is there any way I can make it toggle programatically and without user intervention through touch? or is it impossible to do it with the VideoView? Thanks, Abhi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No underline for texts candidates in html before committing
We just found there is no such problem on 1.6. This bug was introduced since 2.0. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get absolute time ?
In case of #4, the rest time for timer will be set. ex) new rest time = get current time - saved remind time; start timer for the rest time... On 8월23일, 오전9시17분, optimusgeek choongb...@gmail.com wrote: Yes... the reboot is problem... so I think I need a current time and remind time. 1. get current time - this time should not be changed by user or location or anything else : absolute time?? 2. save remind time as a sharedreference. ( ex. remind time = current time + 30minutes) 3. start timer 4. If the device reboot before remind time, the timer will be re-set based on the saved remind time. how about this? In this case, I need only current absolute time. Are there any methods for it?? (I think the absolute time what I'm saying will be used for DRM check...) On 8월20일, 오후9시17분, String sterling.ud...@googlemail.com wrote: On Aug 20, 11:17 am, Filip Havlicek havlicek.fi...@gmail.com wrote: I think he thought on device reboot. Although I'm not sure if PendingIntents are stored before device powering off. Alarms do not persist through a reboot, no. If the OP wants something like that to happen, they'll need to set up a receiver for Intent.ACTION_BOOT_COMPLETED, and re-set the alarm there. String- 원본 텍스트 숨기기 - - 원본 텍스트 보기 - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Strange ActivityNotFoundException
The error I receive is, android.content.ActivityNotFoundException: Unable to find explicit activity class {com.droidea.birthday/ EditBirthdayActivity}; have you declared this activity in your AndroidManifest.xml? The error seems simple enough, but I don't see a problem with the way I have identified this activity in my manifest file. I have also been unable to see any problems with the activity class itself. Code: AndroidManifiest.xml: activity android:name=com.droidea.birthday.EditBirthdayActivity android:windowSoftInputMode=stateVisible| adjustResize /activity Activity call: Intent intent = new Intent(Intent.ACTION_INSERT, People.CONTENT_URI); intent.setClassName(com.droidea.birthday, EditBirthdayActivity); startActivity(intent); The EditBirthdayActivity is public, and I can see the activity from Dev Tools - Package Browser using the emulator. I have spent several hours trying different configurations, but I'm spinning my wheels at this point. Has anyone experienced this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] opnegl es 2.0 on the Froyo is working now?
Hello, I am testing the opengl es 2.0 on the Froyo(SDK2.2) for the code thing and make it as normal. but it has been failed all the time. Always it says, No configs match configSpec what prablem is here? isn't opengl es 2.0 working on the android sdk 2.2?? Please someone tell why... Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: opnegl es 2.0 on the Froyo is working now?
It tested on the Emulator. not a device. On 8월23일, 오전11시01분, choi devmc...@gmail.com wrote: Hello, I am testing the opengl es 2.0 on the Froyo(SDK2.2) for the code thing and make it as normal. but it has been failed all the time. Always it says, No configs match configSpec what prablem is here? isn't opengl es 2.0 working on the android sdk 2.2?? Please someone tell why... Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] sending and receiving LinkedHashMap through Bundle
I am having problem with getting LinkedHashMap from a Bundle. Help to solve this issue. Sample code would be of great help. Thanks Shakeel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Greystripe experiences?
Hi all Is anyone using Greystrip for ads within their apps? Care to share experiences? In particular: 1. Any hassles getting payments from them? 2. eCPM comparisons with other ad networks? Many thanks ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get absolute time ?
Is the Date.getTime() available? It will return milliseconds based on GMT(UTC) = public long getTime () Since: API Level 1 Returns this Date as a millisecond value. The value is the number of milliseconds since Jan. 1, 1970, midnight GMT. Returns the number of milliseconds since Jan. 1, 1970, midnight GMT. = On 8월23일, 오전10시37분, optimusgeek choongb...@gmail.com wrote: In case of #4, the resttimefor timer will be set. ex) new resttime= get currenttime- saved remindtime; start timer for the resttime... On 8월23일, 오전9시17분, optimusgeek choongb...@gmail.com wrote: Yes... the reboot is problem... so I think I need a currenttimeand remindtime. 1. get currenttime- thistimeshould not be changed by user or location or anything else :absolutetime?? 2. save remindtimeas a sharedreference. ( ex. remindtime= current time+ 30minutes) 3. start timer 4. If the device reboot before remindtime, the timer will be re-set based on the saved remindtime. how about this? In this case, I need only currentabsolutetime. Are there any methods for it?? (I think theabsolutetimewhat I'm saying will be used for DRM check...) On 8월20일, 오후9시17분, String sterling.ud...@googlemail.com wrote: On Aug 20, 11:17 am, Filip Havlicek havlicek.fi...@gmail.com wrote: I think he thought on device reboot. Although I'm not sure if PendingIntents are stored before device powering off. Alarms do not persist through a reboot, no. If the OP wants something like that to happen, they'll need to set up a receiver for Intent.ACTION_BOOT_COMPLETED, and re-set the alarm there. String- 원본 텍스트 숨기기 - - 원본 텍스트 보기 -- 원본 텍스트 숨기기 - - 원본 텍스트 보기 - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get absolute time ?
alright... Date.getTime() is not available... when I change time in setting of emulator, the getTime() is changed as much again. How can I get current UTC time independent of local time? On 8월23일, 오전11시26분, optimusgeek choongb...@gmail.com wrote: Is the Date.getTime() available? It will return milliseconds based on GMT(UTC) ===== public long getTime () Since: API Level 1 Returns this Date as a millisecond value. The value is the number of milliseconds since Jan. 1, 1970, midnight GMT. Returns the number of milliseconds since Jan. 1, 1970, midnight GMT. ===== On 8월23일, 오전10시37분, optimusgeek choongb...@gmail.com wrote: In case of #4, the resttimefor timer will be set. ex) new resttime=getcurrenttime- saved remindtime; start timer for the resttime... On 8월23일, 오전9시17분, optimusgeek choongb...@gmail.com wrote: Yes... the reboot is problem... so I think I need a currenttimeand remindtime. 1.getcurrenttime- thistimeshould not be changed by user or location or anything else :absolutetime?? 2. save remindtimeas a sharedreference. ( ex. remindtime= current time+ 30minutes) 3. start timer 4. If the device reboot before remindtime, the timer will be re-set based on the saved remindtime. how about this? In this case, I need only currentabsolutetime. Are there any methods for it?? (I think theabsolutetimewhat I'm saying will be used for DRM check...) On 8월20일, 오후9시17분, String sterling.ud...@googlemail.com wrote: On Aug 20, 11:17 am, Filip Havlicek havlicek.fi...@gmail.com wrote: I think he thought on device reboot. Although I'm not sure if PendingIntents are stored before device powering off. Alarms do not persist through a reboot, no. If the OP wants something like that to happen, they'll need to set up a receiver for Intent.ACTION_BOOT_COMPLETED, and re-set the alarm there. String- 원본 텍스트 숨기기 - - 원본 텍스트 보기 -- 원본 텍스트 숨기기 - - 원본 텍스트 보기 -- 원본 텍스트 숨기기 - - 원본 텍스트 보기 - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to get absolute time ?
I assume you are trying to get current UTC time for purposes of DRM, such as expring a trial license. From what I can tell on my Droid, there are two ways the system time is set, automatically and manually. I'm pretty sure manually can be used to defeat time-based DRM, as it has been on desktops for years. If your app can tell if the time is automatic or manual, you could require that it be automatic to run your app. The other way is to make a network request to a trusted time server. Even that can be defeated, but requires more effort in networking than a typical hacker would probably find worthwhile. The other problem with this approach is what do do when the network is unreachable. If the app requires network access to function anyway, then OK. Otherwise, there's probably some reasonable way to validate the app during network unavailable times. BTW, local time has nothing to do with this problem, if you implement it correctly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] sending and receiving LinkedHashMap through Bundle
You haven't been specific about what the problem is. Can you provide compiler warnings or runtime errors? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] sending and receiving LinkedHashMap through Bundle
Its an run time error -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Frank Weiss Sent: Monday, August 23, 2010 8:40 AM To: android-developers@googlegroups.com Subject: Re: [android-developers] sending and receiving LinkedHashMap through Bundle You haven't been specific about what the problem is. Can you provide compiler warnings or runtime errors? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] sending and receiving LinkedHashMap through Bundle
I hope you realize I'm not psychic and can't see your display, so you'll have to provide more info. In fact, if you can describe the problem in more detail, chances are you'd be able to diagnose it yourself :-) What runtime error and the source code at which the error is apparently being thrown? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] For a published application if I upgrade minSdk requirement to higher level what will happen?
Hi All, I have a published application now if I upgrade minSdk requirement to higher level what will happen? 1. Published application has minSdk set to 3 that is OS V1.5 2. Now if I increase it to 5 (OS v2.0) and republish (upload upgrade) people using older OS than 2.0 who already have installed my application I believe will not see in the market but still will be able to run from the phone. And once they uninstall it will be gone for ever. Is that right? 3. What is good practice? What should I do? Have another application published with higher OS version requirement or upgrade original. My application is free app so no money is involve. 4 4. If I publish new application while keeping old one with lower OS version in the market intact, how the people will know that they have update available who already have installed my applicaiton but has the phone with higher OS and could run my second application? Please advice. Thanks, JP -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android and Proguard
As an indication of where I stand on that -- I have yet to apply Proguard to an Android project. I expect it would take me a couple of days of fiddling and testing and build engineering and testing and setting up the tracking of the data for deobfuscation, and more testing etc. If it's your first Proguard project, I'd suggest allowing a week for a small project, or two for a large one. If obfuscation, or optimization, are worth that size investment, go for it. A week is a good estimate for how long it's taken me, over the lifetime of the project. But don't do it just because it's there, and you want to keep your code secret. Yeah, do it for the small, speedy code too :-) Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to check the Foreground Process from a Service
Note that these methods are very much not intended for doing anything except presenting UI to the user about what is running. Do not rely on them to drive logic in your app. You will ultimately be unhappy. That paragraph should go in the docs IMO, save people finding out the hard way. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to check the Foreground Process from a Service
I'm curious what the OP was trying to accomplish. It seems to me that even if the informastion were available, it could be out of date in a very short matter of time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en