[android-developers] unrevoked 3.20
Hey guys I need unrevoked 3.20(G7 windows),but I can't find one copy on internet,if someone has,please send it to my gmail. Thinks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 redirect GPS nmea from /dev/ttymxc to somewhere
Here is the solution about the GpsStatus and GpsSvStatus that I fixed the original problem. http://nelsonchunglife.blogspot.com/2010/12/android-gps-porting-hal-code-fix.html On 12月27日, 上午11時04分, nelsonchung chihchun.ch...@gmail.com wrote: Hi all, I found that I need to implement other functions follow by gps.h in order to see the information of gps nmea. Here is the solution I described on my blog about how to fix gps nmea issue.http://nelsonchunglife.blogspot.com/2010/12/android-gps-porting-hal-c... Please let me know if you have any question. On 12月24日, 下午5時12分, nelsonchung chihchun.ch...@gmail.com wrote: Dear Anil, http://nelsonchunglife.blogspot.com/2010/12/android-gps-porting-hal-c... I follow your comment to implement HAL. AP - LocationManager can read Location information now. Very appreciate for you help. I have another problem. How can I let GpsStatus.Listener() and GpsStatus.NmeaListener() work fine? I think I must implement something in HAL too, but I have no idea about this. In HAL, I implement the following function. nmea_reader_init nmea_reader_set_callback nmea_reader_update_time nmea_reader_update_date nmea_reader_update_latlong nmea_reader_update_altitude nmea_reader_update_bearing nmea_reader_update_speed nmea_reader_parse What else function should I implement? Very appreciate for any help or comment. On 12月13日, 下午3時00分, Anil Sasidharan anil...@gmail.com wrote: Hi, You need to implement gps HAL to hook this data up into Android's LocationService JNI. Warm Regards, Anil On Mon, Dec 13, 2010 at 12:27 PM, nelsonchung chihchun.ch...@gmail.comwrote: I can read gps nmea from /dev/ttymxc1 under linux shell command mode like this - cat /dev/ttymxc1. But, I want to know how/where to set in order to let AP level application - LocationManager can get gps nmea via JNI/Android. How/Where should I set? Should I implement some codes followed gps.h? Or Can I redirect the nmea from /dev/ttymxc1 to somewhere? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: What changed in Gingerbread as far as the app widgets?
29.12.2010 5:23, Mark Murphy пишет: On Tue, Dec 28, 2010 at 9:15 PM, Zsolt Vasvarizvasv...@gmail.com wrote: Sorry, what's your point? Those docs haven't been updated since 1.5 and they assume a 320x480 screen. I am fairly certain that document is newer than 1.5, but, never mind. I have an Android 2.3 device. I have tried some third-party app widgets (Ambling, Remember the Milk, Extended Controls). None appear to have 11px cropped off the bottom. Hence, the problem you are experiencing may solely be with the 2.3 emulator. It wouldn't be the first reported problem. My observations match Zsolt's (not regarding 2.3, but rather widget sizing in general). The sizes and artwork templates in the guidelines only work for HVGA devices and for high-res devices in portrait mode (because portrait screen width scales the same way as the device's dpi value). On high-res devices in landscape mode, the templates don't line up (esp. when you consider that 800 and 854 pixel wide hdpi screens use equal scaling but different home screen layouts). On QVGA the templates fail for both portrait and landscape modes. For anyone interested: take standard 4x1 landscape widget width per the above document, 424dp. Scale that to pixels at ldpi resolution - you get 318. The screen is 320 pixels wide, but the app drawer handle takes more than 2 pixels, so widgets actually have smaller width than in the docs. What would really help, IMHO, is if there was a special dimension unit for widgets: one home screen cell. Then one could specify widget layout size as, e.g., 2wc by 1wc (widget cell) and use margins expressed in dp to add space between widgets. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cache size and Heap size
Thanks Dianne. I have some more queries. 1. I am refering to the Cache memory which is return by getCacheDir function. Is there any limit that per application only this much Cache memory could be used? 2. If Cache memory is same as normal internal data storage space then is it dependent upon the mobile's phone memory? Is there any % amount of total internal memory which could be used as Cache memory. 3. Heap Memory: I had tried functions like Debug.getMemoryInfo which returns Debug.memoryInfo object and also ActivityManager.getProcessMemoryInfo function which returns ActivityManager.MemoryInfo object. Now there are different functions in MemoryInfo like getTotalPrivateDirty or getTotalPss(). I am unable to understand use of these functions. What is the meaning of Total Private Dirty memory or total PSS memory? Which one of them returns Heap memory? Is there any limit per application to use heap memory? Can we configure size of the heap memory? Regards, Manish On Dec 29, 12:26 am, Dianne Hackborn hack...@android.com wrote: There is no cache memory size. I'm not sure what you are referring to as cache; if you mean stuff put in the cache directory of your app, that is just in the normal internal data storage space. Heap size is available from:http://developer.android.com/reference/android/app/ActivityManager.ht...() On Tue, Dec 28, 2010 at 5:08 AM, cool.manish mannishga...@gmail.com wrote: Hi, What is cache memory size for android device? Is it very according to Devices? Is it divided in between application and one application can use only specific amount of total size? How to get info regarding Heap Memory Size? Again how to know application specific Heap size? Can we change it? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to update one of views(setText, setImage) in item already added on ListView
TreKing *thank you for your replying* Yes, I did search google with term: BaseAdapter getView Just like you said, pretty many results showing that the layout is decided(addView, inflate) at overrided getView method. *my question is* Is that meaning the layout of ListView item is decided when 'getView' method called somewhere? I mean, the behavior is not that fit to the method name getView Mingchung On 12月24日, 上午11時40分, TreKing treking...@gmail.com wrote: On Wed, Dec 22, 2010 at 11:02 PM, Mingchung jaw...@gmail.com wrote: My question is, an item has been already added to a ListView, can I still update the UI? Yes - you'll want to create a custom Adapter that overrides the getView() method and update the view there. - 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] how to set the letter-spacing in the Textview
hey, does any one know how to set the letter-spacing in the Textview,i can only find API about the line-spacing.need help,ur generous help will be highly appriciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Testing in android
We are exploring the Android Junit, and trying to figure out to use Emma code coverage On Dec 29, 12:40 pm, oriharel ori.ha...@gmail.com wrote: Just a question - How many of you use the testing infrastructure provided by Android? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 set the letter-spacing in the Textview
Dylan, See this: android:textScaleX Since: API Level Sets the horizontal scaling factor for the text. Must be a floating point value, such as 1.2. This may also be a reference to a resource (in the form @[package:]type:name) or theme attribute (in the form ?[package:][type:]name) containing a value of this type. This corresponds to the global attribute resource symbol textScaleX. Related Methods setTextScaleX(float) -- Kostya 29.12.2010 12:13, dylan-cool пишет: hey, does any one know how to set the letter-spacing in the Textview,i can only find API about the line-spacing.need help,ur generous help will be highly appriciated. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Cache size and Heap size
On Wed, Dec 29, 2010 at 12:40 AM, cool.manish mannishga...@gmail.comwrote: 1. I am refering to the Cache memory which is return by getCacheDir function. Is there any limit that per application only this much Cache memory could be used? It is just a directory in your app's private data dir, which is on the same partition as all of your other data, and the data of other apps. 2. If Cache memory is same as normal internal data storage space then is it dependent upon the mobile's phone memory? Is there any % amount of total internal memory which could be used as Cache memory. Keep it reasonable. 3. Heap Memory: I had tried functions like Debug.getMemoryInfo which returns Debug.memoryInfo object and also ActivityManager.getProcessMemoryInfo function which returns ActivityManager.MemoryInfo object. Now there are different functions in MemoryInfo like getTotalPrivateDirty or getTotalPss(). I am unable to understand use of these functions. What is the meaning of Total Private Dirty memory or total PSS memory? Which one of them returns Heap memory? Is there any limit per application to use heap memory? Can we configure size of the heap memory? Like I said, the function I previously mentioned will tell you about the Java heap limit. Memory used by an app is complicated. You shouldn't be using ActivityManager.getProcessMemoryInfo() for regular program logic. However, if you want to start to understand what these numbers mean, you can read a post I made about it here: http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android/2299813#2299813 -- 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: Alarm in sleep mode
On Tue, Dec 28, 2010 at 11:56 PM, b_t bartata...@gmail.com wrote: Hmm, so there is no possibility to display real-time information in a widget? For example a compass widget? Correct, app widgets are not intended to be continually refreshing. What is an acceptable refresh rate? Less is better. For polling, I'd suggest 15 minutes. Many times you would be better off doing something push-based, however, such as how gmail gets pushes when there is new mail, causing it to sync, and update any widget as part of that process. And the main question, why does the alarmmanager send alarms in sleep mode when I use RTC instead of RTC_WAKEUP? Because something is still keeping the CPU running. Note the use of the word asleep in the documentation here is somewhat misleading -- it is not talking about the screen being off, but the actual CPU being asleep. -- 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] Twitter client Application in Android
Use that code in onStart() of the Activity On Mon, Dec 27, 2010 at 2:36 AM, jayavenkat jaia...@gmail.com wrote: Hi All, I've developed twitter Oauth Application. I use shared prefrrence to store the values of access token . Everything works fine But the access token are saved only while changing the orientation of emulator using key ctrl + F12 at run time then only i can able to access my account But I want to do the same without changing orientation can anyone help please sorry if i did mistake .. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Praveena Ankitha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Unique Phone ID
A lot of discussion on this going on here. http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id I am not sure of the answer which would work on GSM/CDMA Phones + Tablets w/o phone capabilities. Any one got an Android Tablet around to check this? ANDROID ID would exist uniquely for Google enabled Phones as per the link here. On Dec 29, 1:33 am, Tommy droi...@gmail.com wrote: Wonderful Thanks!! -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Kostya Vasilyev Sent: Tuesday, December 28, 2010 12:37 PM To: android-developers@googlegroups.com Subject: Re: [android-developers] Re: Unique Phone ID http://developer.android.com/reference/android/telephony/TelephonyMan...() public String getDeviceId () Since: API Level 1 Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones. Return null if device ID is not available. Requires Permission: READ_PHONE_STATE Note that at least for GSM phones, the user can insert a new SIM card with a new phone number, or change the number assigned to the same card. So a phone number, while unique, does not identify the device. -- Kostya 28.12.2010 20:29, XiaoXiong Weng пишет: Um. I know that if I dial *#06# it would return the IMEI number, but each carrier might differ so it's probably not a good solution, I would stick with the cellphone number since that's accessible. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Tommy Sent: Tuesday, December 28, 2010 11:33 AM To: android-developers@googlegroups.com Subject: RE: [android-developers] Re: Unique Phone ID First off thanks to everyone who responded with input. My next question would be is my app able to access the MEID or the IMEI number or is that something that can't be accessed? -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Indicator Veritatis Sent: Thursday, December 23, 2010 7:07 PM To: Android Developers Subject: [android-developers] Re: Unique Phone ID I can confirm for you that the MEID is most certainly not the same as ANDROID ID. Furthermore, MEID is unique to CDMA phones, so my T-Mobile G2, for example, does not have one. It has an IMEI instead. Like any other GSM phone. On Dec 23, 2:11 pm, Ryan Avilesryan.avi...@gmail.com wrote: The MEID might be useful. I dont think this is the same as the ANDROID_IDOn Thu, Dec 23, 2010 at 3:58 PM, John Gabyjg...@gabysoft.com wrote: You could use ANDROID_ID, but be warned that I have found devices that return null for this value. http://developer.android.com/reference/android/provider/Settings.Secu... John On Dec 23, 10:21 am, Tommydroi...@gmail.com wrote: Hey evereyone, I was wondering if there is a way to get a unique ID for the users phone. I imagine the IME and Serial Numbers are unique to each phone right? Is there a way I can request the IME number or the serial number or is there another number I can request that is unique to each phone? This is used to help secure login to an app. Thanks, Tommy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] populate ItemizedOverlay when AlertDialog is showing
Hi, my problem is that I can't populate overlays if AlertDialog show. I put addOverlay and populate methods to listeners OK and Cancel, but new overlay doesn't showed on map. It will update after moving a map. Is it any other way to refresh overlays? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Painting in webkit's webview
hi all, I am looking into the code of webview.java.and one thing i want to know that how this webview class is holding other objects in a webpage...my requirement is that whenever user clicks on the checkbox on a page the focusring should not go off until the the checkbox loose focus other doubt is the focusring normally drawn by the webcore in other platform but it is happening in android platform because if i want to clear the focusring forcefully how to do that action... Regards Yogi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Suggestions for my inventory application
What else can i add in this to make it the only inventory solution out in mobile. Being ambitious is a nice quality... :D Take a look at what your competitors do, on mobile platforms(ios, android, windows mobile 6.5) and desktop. And go from there A quick obvious one : Scan the barcode if any on your product, retrieve the item from a webservice and allow for nice and easy input of quantities either sold or purchased Yahel On Dec 29, 6:50 am, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: Hey guys I have an application on which i have been working on for a while now. The application has 4 major areas :- 1. Item Master - Where user can create new products 2. Purchase - Created products are inflated in autocompletetextview and user can add quantity to it . 3. Sale - Created products are inflated in autocompletetextview and user can enter quantity of it sold . 4. Stock - This shows the list of the products present along with the colour and quantity. What else can i add in this to make it the only inventory solution out in mobile. Let me know. I don't mind spending time. Regards Abhishek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: pdf reader
Your Uri is invalid. Please use a valid path to your file. On Wed, Dec 29, 2010 at 2:56 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: This is my onclick code public void onClick(View v) { // TODO Auto-generated method stub Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse(file:///raw/unlockingandroid.pdg), application/pdf); try{ startActivity(i); } catch (ActivityNotFoundException e) { Toast.makeText(pdfviewer.this, No Application Available to View PDF, Toast.LENGTH_SHORT).show(); } } I see a toast when i click the button :( i cant see the pdf On Wed, Dec 29, 2010 at 12:26 PM, Jake Basile jakerbas...@gmail.com wrote: Just like opening any other type of file on Android, you should try to launch an intent to view it. Intent openPdfIntent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(pdfFile), application/pdf); try { startIntent(openPdfIntent); } catch(ActivityNotFoundException e) { // No app can open PDF files on their phone. } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How I get Command in Home Screen In Android
Step #1: Write your own home screen application. Step #2: Add this feature to your own home screen application. On Wed, Dec 29, 2010 at 2:23 AM, Animesh Sinha animesh.andr...@gmail.com wrote: I mean to say that i want a notification(Command) same as when we type *#06# in home screen it will show a IMEI no. in the same way when i press a certain code (eg: *#12345#) then it will notify to my service which is running in background. Plz solve my problem and reply me soon. Waiting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Default orientation of device
There is such a concept in Android. Check e.g.,: http://android-developers.blogspot.com/2010/09/brace-for-future.html(sections where Motorola Charm and Flipout are mentioned) I could not believe there is no API call to check device natural orientation. I posted this question on Stack Overflow hoping to get info about how to check it or other way to solve the problem I have faced (which indeed is not very uncommon). http://stackoverflow.com/questions/4553650/how-to-check-device-natural-default-orientation-on-android-i-e-get-landscape -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Set credentials for a secured http connection via a Webview with setHttpAuthUsernamePassword
http://stackoverflow.com/questions/995514/https-connection-android Regards, Sandeep On Dec 27, 2:00 am, MattBol mboll...@gmail.com wrote: Hi, I would like to use a WebView to connect to a secure website over HTTPS, accept its certificate and automatically handle credentials (given previously by the user). This far, I ve got the Webview working and accepting the certificate using the following website:http://damianflannery.wordpress.com/2010/09/28/android-webview-with-h... But although I try to set the credentials or to handle them in a method, nothing happens, I just end up at the login page without even any error messages. I couldnt find out the answer myself and I couldnt find it on the Internet answer, so I post here ... Anyone up for this challenge? =o) Here is my code: package ; import android.app.Activity; import android.net.http.SslError; import android.os.Bundle; import android.webkit.HttpAuthHandler; import android.webkit.SslErrorHandler; import android.webkit.WebView; import android.webkit.WebViewClient; public class ConnectorWebView extends Activity { WebView mWebView; String mUsrName; String mPassC; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.Connwebview); // Getting info from Intent extras // Get it if it s different from null Bundle extras = getIntent().getExtras(); mUsrName = extras != null ? extras.getString(username) : null; mPassC = extras != null ? extras.getString(passcode) : null; mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.setHttpAuthUsernamePassword(myhost.com, CertificateAuthentication, mUsrName, mPassC); mWebView.setWebViewClient(new WebViewClient() { @Override public void onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm){ handler.proceed(mUsrName, mPassC); } public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) { handler.proceed() ; } }); mWebView.loadUrl(https://myhost.com/user_area;); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] MultiTouch Support
Hi at all, I have one issues with multitouch features offers by the MotionEvent class, this is my code: @Override public boolean onTouchEvent(MotionEvent event) { [] if(event.getPointerCount() == 1){ switch (event.getAction()) { case MotionEvent.ACTION_DOWN: finger_one_ID = event.getAction() MotionEvent.ACTION_POINTER_ID_MASK; finger_one_X = (int) event.getX(finger_one_ID); finger_one_Y = (int) event.getY(finger_one_ID); renderer.stopTimer(); break; case MotionEvent.ACTION_UP: finger_one_ID = NONE; renderer.setFrictionY(OpenGLRenderer.DEFAULT_FRICTION_Y); renderer.setFrictionX(OpenGLRenderer.DEFAULT_FRICTION_X); renderer.startTimer(); break; case MotionEvent.ACTION_MOVE: deltaX = finger_one_X - (int) event.getX(finger_one_ID); deltaY = finger_one_Y - (int) event.getY(finger_one_ID); deltaX = Math.abs(deltaX); deltaY = Math.abs(deltaY); distance = (float) ((Math.sqrt(Math.pow(deltaX,2) + Math.pow(deltaY, 2; renderer.setFrictionY(OpenGLRenderer.NULL_FRICTION); renderer.setFrictionX(OpenGLRenderer.NULL_FRICTION); if(deltaX 5.0f deltaX 80) renderer.setYacc( (deltaX / 50)); else if(deltaY 5.0f deltaY 80) renderer.setXacc( (deltaY / 50)); break; default: break; } Log.d(TAG, Single finger_one_Y:+finger_one_X); Log.d(TAG, Single finger_one_Y:+finger_one_Y); } else if(event.getPointerCount() == 2){ Log.d(TAG,Doppio Tocco); switch (event.getAction()) { case MotionEvent.ACTION_POINTER_DOWN: finger_two_ID = MotionEvent.ACTION_POINTER_DOWN MotionEvent.ACTION_POINTER_ID_MASK; finger_two_X = (int) event.getX(finger_two_ID); finger_two_Y = (int) event.getY(finger_two_ID); multitouch_distance = (float) Math.sqrt(Math.pow(finger_one_X - finger_two_X, 2) + Math.pow(finger_one_Y - finger_two_Y, 2)); break; case MotionEvent.ACTION_MOVE: finger_one_X = (int) event.getX(finger_one_ID); finger_one_Y = (int) event.getY(finger_one_ID); finger_two_X = (int) event.getX(finger_two_ID); finger_two_Y = (int) event.getY(finger_two_ID); multitouch_distance_updated = (float) Math.sqrt(Math.pow(finger_one_X - finger_two_X, 2) + Math.pow(finger_one_Y - finger_two_Y, 2)); Log.d(TAG,multitouch_distance_updated:+String.valueOf(multitouch_distance_updated)); default: break; } Log.d(TAG, Double finger_one_Y:+finger_one_X); Log.d(TAG, Doppio finger_one_Y:+finger_one_Y); Log.d(TAG, Doppio finger_two_Y:+finger_two_X); Log.d(TAG, Doppio finger_two_Y:+finger_two_Y); } } The problem is that in multitouch branch of my code the X,Y of first and second finger are the same, therefore the multitouch distance is even zero!! I am tried to develop an two fingers zoom... Any suggestion will be appreciated. pedr0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] help with ColorStateList
i've got a layout for a List row entry as: (i've removed extraneous code) LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:background=@color/child_row_color ... /LinearLayout in the res/color folder, i've got a a file child_row_color.xml ?xml version=1.0 encoding=UTF-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:color=#0f0/ /selector every time, i try to display the List child row - it craps out in a android inflator code. 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] Issue with messages in this group?
Hi: I posted a message last 12/27/2010, and it was responded, and now I can't find it...Same issue happened before. Are some messages deleted or they just dissapear? Below is the original message: Suject: Can't debug/install applications into Tablet with Android 2.1 using ADB commands Body: Hi: I have a tablet with Android 2.1 and I'm able to query the device issuing the adb devices command, for which I get the 0123456789ABCDEF device response (serial number and device state). However, any other command such install, push, pull, or shell, I never get a response. I mean, after issuing the command, nothing happens until, after a while, I press ^C and it returns to the Windows Command prompt. Any idea what could be wrong or how to debug what it's happening? Thanks; Gus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Ant Emma and JUnit, integrating all three
Is there a step by step guide to try 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] moving InputMethod to the top
Hi, I have a text field that is displayed at the bottom of the screen (its a fake component, not an android component). When the user enters the field, i open the input method with this: imm.showSoftInput(instance, 0); However, since the field is at the bottom and the input method is also at the bottom, the user can't see in the text field what's being typed. I saw some applications that moves the InputMethod to the top. How can i do the same? Open the input method at the top? thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] fromHtml doesn't work for textview font size, any help?
Hi Dear, i am trying to put text on a text view with different size for each word textView.setText(Html.fromHtml(font size='10' color='red' Word1 / font font size='15' color='white' Word2 /font))); color does work but no font size, any help plz -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Set credentials for a secured http connection via a Webview with setHttpAuthUsernamePassword
http://stackoverflow.com/questions/995514/https-connection-android Please don't just put some random code that trusts all certificates in your app. (like some people in the thread above suggest). Read all the answers and understand how to use a custom trust store in your application. If 'myhost.com' is using a self-signed certificate, you have to add it to your custom trust store. If it is issued by some CA (in house one, or whatever), you have to add the CA certificate to your trust store. Instead of following tutorials take some time to understand how Java handles SSL, it will make your life much easier. HTH -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] example on asynctask class..
Hi friends, can any one send me the example on asynctask class. I tried it's not working fine. Any help please. Regards, Abhilash.B -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How implement LBS in Android
Creating application i think is not a big deal , but getting POI's of different place (Creating Database) is a big deal. On Wed, Dec 29, 2010 at 7:42 AM, Frank Weiss fewe...@gmail.com wrote: There are of course many Android LBS apps to date. Most of them use their own proprietory databases. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers]How to get the data from LBS?
@mohammad shankayi Which api u're talking about? On Wed, Dec 22, 2010 at 8:27 AM, mohammad shankayi mohd...@gmail.comwrote: i think you must use google maps API ... it may have this useful info as a layer... sincerely mohammad shankayi On Wed, Dec 22, 2010 at 05:40, kevens hao ithjf.kev...@gmail.com wrote: Like Foursquare, I want to develop an application which can get the location and get the useful info(hotel, restaurant, groggery info and so on) around the location. So how to get the useful info? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.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] Set Android WIFI Ip address from my own application
Hi All, I wanna set android wifi ip address from my own application is there any way? i've post this question few months back didnt get any proper solution, so i m reposting this question. Regards, Faheem -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Alarm in sleep mode
Thank you, you answered all of my questions On Dec 29, 10:52 am, Dianne Hackborn hack...@android.com wrote: On Tue, Dec 28, 2010 at 11:56 PM, b_t bartata...@gmail.com wrote: Hmm, so there is no possibility to display real-time information in a widget? For example a compass widget? Correct, app widgets are not intended to be continually refreshing. What is an acceptable refresh rate? Less is better. For polling, I'd suggest 15 minutes. Many times you would be better off doing something push-based, however, such as how gmail gets pushes when there is new mail, causing it to sync, and update any widget as part of that process. And the main question, why does the alarmmanager send alarms in sleep mode when I use RTC instead of RTC_WAKEUP? Because something is still keeping the CPU running. Note the use of the word asleep in the documentation here is somewhat misleading -- it is not talking about the screen being off, but the actual CPU being asleep. -- 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] Set Android WIFI Ip address from my own application
Faheem, See Settings.System: http://developer.android.com/reference/android/provider/Settings.System.html#WIFI_STATIC_DNS1 Starting with: public static final String WIFI_STATIC_DNS1 Since: API Level 1 If using static IP, the primary DNS's IP address. Example: 192.168.1.1 Constant Value: wifi_static_dns1 and up through public static final String WIFI_USE_STATIC_IP Since: API Level 1 Whether to use static IP and other static network attributes. Set to 1 for true and 0 for false. Constant Value: wifi_use_static_ip However, if past is of any indication, any of these can be moved to Settings.Secure in a future Android release (or not). -- Kostya 29.12.2010 17:34, Faheem Khatri пишет: Hi All, I wanna set android wifi ip address from my own application is there any way? i've post this question few months back didnt get any proper solution, so i m reposting this question. Regards, Faheem -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] invoke my application at given Date/Time
Same like Alarm application.. On Mon, Dec 27, 2010 at 7:08 PM, asinha asinha.vocoll...@gmail.com wrote: How can I invoke my android application at given Date/Time, say daily at 9am? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Thank Regards Peeyush Varshney -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get Temporary Mobile Subscriber Identity(TMSI) in Android
rt. And who knows that how to get Channel Id of a CellLocation? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Is there a Horizontal ListView?
I did some digging around this a while back and Mark is on the money, it'll take a big chunk of time. But I would agree there are plenty of uses for things like horizontal lists, in fact there's a very prominent one in the core SMS app which allows you to choose a word from a list of predictions. So in answer to the question, perhaps you can make use of the code for that to give you a head start, found in: CandidateView.java This doesn't extend ListView, or BaseAdapterView but simply View. I had to slightly modify ListView and ended up having to jump through many hoops to make a small change, I'm finishing up an app which has very styled user interface elements and I've found the SDK makes creating custom components very easy, but extending existing components is very hard because it is understandably restrictive. This is quite often than not to do with ListView because it has so much useful functionality baked in to support adapters, states, touch, keyboard and trackball input that is just frustrating to re-implement. It's a problem because we want to be creating more expressive UIs where it improves on the standard, right now that usually means spending an great deal of time studying the source code and seeing if it can be achieved through composition or existing methods (sometimes over-complicating the view hierarchy) and more often copying the entire source code for one (often two) base classes so that you can modify a key private field and not lose out on performance. The easy answer is to just stick to the basics UIs we're used to seeing, but I really hope things get a bit more flexible so that more people can creative compelling-looking apps that don't just look like they've been put together in a drag and drop GUI form builder. Regards, Richard On 25 Dec 2010, at 23:41, Mark Murphy wrote: On Sat, Dec 25, 2010 at 6:27 PM, jotobjects jotobje...@gmail.com wrote: But UI designers don't take the API doesn't do that as a reason for changing the design. UI designers can ask for whatever they want. It is up to engineers to explain to management that the designers are asking for things that are not natively implemented on the platform and therefore will require significant additional engineering time. It is then management's responsibility to determine whether the UI designers feature is worth that additional engineering time. There are lots of posts in this forum with developers asking for horizontal scrolling and horizontal list views. It's a natural UI design element for some kinds of lists. It behaves somewhat like a drop down list (in that is is expandable) without obscuring the other widgets on the screen. The user can drag it (scroll) back and forth. I'm not saying it's a bad idea. I am saying you have your work cut out for you, and I am saying that I believe that it has not been done a 100 times already. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Atlanta: http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: pdf reader
Sorry I checked the path and i made a foolish mistake of not writing the name of the file correctly. Except that everything should go well . So is the following line correct ; sry i am a beginner i.setDataAndType(Uri.parse(file:///raw/unlockingandroid.pdf), application/pdf); or is it that the path in Uri.parse() is still incorrect I have the pdf in raw folder On Wed, Dec 29, 2010 at 4:49 PM, Mark Murphy mmur...@commonsware.comwrote: Your Uri is invalid. Please use a valid path to your file. On Wed, Dec 29, 2010 at 2:56 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: This is my onclick code public void onClick(View v) { // TODO Auto-generated method stub Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse(file:///raw/unlockingandroid.pdg), application/pdf); try{ startActivity(i); } catch (ActivityNotFoundException e) { Toast.makeText(pdfviewer.this, No Application Available to View PDF, Toast.LENGTH_SHORT).show(); } } I see a toast when i click the button :( i cant see the pdf On Wed, Dec 29, 2010 at 12:26 PM, Jake Basile jakerbas...@gmail.com wrote: Just like opening any other type of file on Android, you should try to launch an intent to view it. Intent openPdfIntent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(pdfFile), application/pdf); try { startIntent(openPdfIntent); } catch(ActivityNotFoundException e) { // No app can open PDF files on their phone. } -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2bunsubscr...@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 Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: pdf reader
On Wed, Dec 29, 2010 at 10:58 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Sorry I checked the path and i made a foolish mistake of not writing the name of the file correctly. Except that everything should go well . So is the following line correct ; sry i am a beginner i.setDataAndType(Uri.parse(file:///raw/unlockingandroid.pdf), application/pdf); or is it that the path in Uri.parse() is still incorrect I have the pdf in raw folder There is no raw folder. Your project, on your PC, has a res/raw/ folder. That is not a folder on the Android device. It is not accessed via a file:/// URL. It is a type of resource, and its contents are accessed via getResources().openRawResource(). The contents of a resource like this are not accessible via Uri objects. Hence, there is no simple way for you to store a PDF as a raw resource in a project of yours and have it be displayed by some other application. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] network LocationProvider
I have a request to distinguish location sources from the network LocationProvider (is it cell tower based, or ip address based). Is there a safe rule of thumb proxy I can use to determine this e.g. if the phone has a cell signal it uses the cell tower because that is more accurate, otherwise it uses the network? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: pdf reader
Then what do you suggest? Should i put the pdf on net and put it's url ? On Wed, Dec 29, 2010 at 9:36 PM, Mark Murphy mmur...@commonsware.comwrote: On Wed, Dec 29, 2010 at 10:58 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Sorry I checked the path and i made a foolish mistake of not writing the name of the file correctly. Except that everything should go well . So is the following line correct ; sry i am a beginner i.setDataAndType(Uri.parse(file:///raw/unlockingandroid.pdf), application/pdf); or is it that the path in Uri.parse() is still incorrect I have the pdf in raw folder There is no raw folder. Your project, on your PC, has a res/raw/ folder. That is not a folder on the Android device. It is not accessed via a file:/// URL. It is a type of resource, and its contents are accessed via getResources().openRawResource(). The contents of a resource like this are not accessible via Uri objects. Hence, there is no simple way for you to store a PDF as a raw resource in a project of yours and have it be displayed by some other application. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Ant Emma and JUnit, integrating all three
With some more study into the http://developer.android.com/guide/ developing/testing/testing_otheride.html able to generate code coverage.html for EMMA. 1.Initially i had created a project and Project test. 2.Used the command line Android - update project and update test project. 3.Then Run the Ant coverage.. it worked...it generated the coverage.html On Dec 29, 6:14 pm, maccoy maccoy2...@gmail.com wrote: Is there a step by step guide to try this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: pdf reader
If i m not having third party pdf application installed in the android device then? ?? On 29 Dec 2010 13:26, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: This is my onclick code public void onClick(View v) { // TODO Auto-generated method stub Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse(file:///raw/unlockingandroid.pdg), application/pdf); try{ startActivity(i); } catch (ActivityNotFoundException e) { Toast.makeText(pdfviewer.this, No Application Available to View PDF, Toast.LENGTH_SHORT).show(); } } I see a toast when i click the button :( i cant see the pdf On Wed, Dec 29, 2010 at 12:26 PM, Jake Basile jakerbas...@gmail.com wrote: Just like opening... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Gradient, Shadow and MaskFilter on a TextView
Hello. Im trying to customize a textview to add a gradientoverlay, a dropshadow and a maskfilter. There seems like i cant combine the different methods as i thought i would. For example when i use both gradient and shadow my shadow gets the same color as the gradient. Combinding dropshadow and a maskfilters renders no text at all. While a combination of gradient overlay seems to work fine. I have extended TextView and overriden onDraw: protected void onDraw(Canvas canvas) { TextPaint paint = getPaint(); // paint.setShader(new LinearGradient(8f, 80f, 30f, 20f, Color.RED,Color.WHITE,Shader.TileMode.MIRROR)); float height = paint.getFontSpacing(); Toast.makeText(getContext(), h: +height, Toast.LENGTH_SHORT).show(); paint.setMaskFilter(new EmbossMaskFilter(new float[] { 0, 0.3f, 0 },0.95f, 10, 0.1f)); // paint.setShadowLayer(0.1f, 30f, 5f, Color.parseColor(#ff)); paint.setShader(new LinearGradient(0, 0, 0, height, new int[] { GRADIENT_START,GRADIENT_MID,GRADIENT_MID,GRADIENT_END }, new float[] {0,0.4f,0.6f,1f}, Shader.TileMode.CLAMP)); super.onDraw(canvas); } Does these filters not work together? Is it the wrong aproach to try to extend a textview, should i create my own View for drawing thext with gradients, shadows and masks? // Anders -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: pdf reader
On Wed, Dec 29, 2010 at 11:26 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Then what do you suggest? Should i put the pdf on net and put it's url ? I cannot make a suggestion without knowing what it is that you are trying to do, at a higher level than invoking an ACTION_VIEW Intent on a PDF file. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: pdf reader
Environment.getExternalStorageDirectory(). On Dec 29, 10:26 am, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Then what do you suggest? Should i put the pdf on net and put it's url ? On Wed, Dec 29, 2010 at 9:36 PM, Mark Murphy mmur...@commonsware.comwrote: On Wed, Dec 29, 2010 at 10:58 AM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Sorry I checked the path and i made a foolish mistake of not writing the name of the file correctly. Except that everything should go well . So is the following line correct ; sry i am a beginner i.setDataAndType(Uri.parse(file:///raw/unlockingandroid.pdf), application/pdf); or is it that the path in Uri.parse() is still incorrect I have the pdf in raw folder There is no raw folder. Your project, on your PC, has a res/raw/ folder. That is not a folder on the Android device. It is not accessed via a file:/// URL. It is a type of resource, and its contents are accessed via getResources().openRawResource(). The contents of a resource like this are not accessible via Uri objects. Hence, there is no simple way for you to store a PDF as a raw resource in a project of yours and have it be displayed by some other application. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to store date and time in database
It should be pointed out that it doesn't matter (much) what time reference is used, so long as it's used consistently, and all conversion algorithms to/from the reference form understand its details. So long as a consistent reference is used dates will sort and compare correctly. On Dec 28, 9:41 pm, Bob Kerns r...@acm.org wrote: I didn't realize until now that POSIX absolutely FAILED on this. Every description I've seen of this time indicates either that it's number of seconds since January 1, 1970, or that it's UTC -- but it is, in fact, neither. ((Bangs head on keyboard at one second intervals, carefully skipping over leap seconds)). I'm torn between thanking you for pointing this out, and screaming! Both, I guess. I guess it shows how poorly people -- even people on standards committees who OUGHT to know better -- understand time. See the Sun Javadoc for the wiggle room Java allows, based on whatever imperfections the underlying OS has on this score:http://download.oracle.com/javase/6/docs/api/java/util/Date.html The Android SDK documentation, on the other hand, is pathetically silent on the matter. The Wikipedia article on Unix time indicates that there's discussion of dropping leap seconds, and letting civil time drift. I guess eventually, noon will lose whatever vestiges of meaning it has now. This has been a sore point for me for decades. Timekeeping with sufficient accuracy (i.e within seconds) for celestial navigation is one of the greatest scientific endeavors, occupying some of science's best minds over centuries, culminating in the Longitude Prize, offered in 1714 and ultimately won in 1773. The earth rotates one nautical mile at the equator every 4 seconds, so even one second of error in time contributes significant error in position. I have in my possession the 6 volumes of Sight Reduction Tables published by the US Defense Mapping Agency. 6 volumes of tables of numbers for accurate calculation of spherical trigonometry with detailed attention to accuracy, carefully described procedures for calculation, down the the model of computer (IBM 1401) used to perform the calculations. And yes, I used to use them. When your personal safety, and of your crew, depends on accurate time, it gives you a different perspective on the matter! Accurate timekeeping is no less important in computer systems, where properly sequencing internal and external events is often critical -- and sometimes involves life safety. Yet generations of programmers and system administrators alike have refused to be bothered with accurate timekeeping. I guess I'll go protest by setting all my clocks to UTC. (I've used exclusively 24-hour time for almost 40 years, and am used to doing the conversion to/from UTC, so it won't bother me!) On Dec 27, 9:12 pm, Steve Allen sla29...@gmail.com wrote: On Dec 26, 11:39 pm, Kostya Vasilyev kmans...@gmail.com wrote: With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. Keep in mind that the count of milliseconds does not conform to legal nor physical elapsed time for any observer. See here for morehttp://www.ucolick.org/~sla/leapsecs/epochtime.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] get the genre name with most songs from the music library
I am trying to get the genre with most songs by using the media store and failed to get it, as well as I can get the artist with most songs. Any one has good idea. Thanks. Kyle -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] sqlite on sdcard
Hi, I would like to store sqlite databse on sdcard. Is is possible to tell system somehow to put it on sdcard? Thanks. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] sqlite on sdcard
You'll have to write your own SQliteOpenHelper-type class for that, as the built-in implementation always calls context.getDatabasePath. If you are not using SQliteOpenHeper, just call SQLiteDatabase.openOrCreateDatabase() with a path of your choice. -- Kostya 29.12.2010 20:10, Nikola пишет: Hi, I would like to store sqlite databse on sdcard. Is is possible to tell system somehow to put it on sdcard? Thanks. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] sqlite on sdcard
On Wed, Dec 29, 2010 at 6:17 PM, Kostya Vasilyev kmans...@gmail.com wrote: You'll have to write your own SQliteOpenHelper-type class for that, as the built-in implementation always calls context.getDatabasePath. If you are not using SQliteOpenHeper, just call SQLiteDatabase.openOrCreateDatabase() with a path of your choice. -- Kostya Thanks for quick reply. Are there any doc on that. I still struggling with all of it. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] sqlite on sdcard
Docs: http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html I pasted my code here: http://pastebin.com/1hKWffeu It doesn't differentiate between read-only and writable database open modes (SqliteOpenHelper does), and probably lacks some error handling here and there (this is work in progress). However, it should be enough to get you on the way. -- Kostya 29.12.2010 20:23, Nikola ?: On Wed, Dec 29, 2010 at 6:17 PM, Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com wrote: You'll have to write your own SQliteOpenHelper-type class for that, as the built-in implementation always calls context.getDatabasePath. If you are not using SQliteOpenHeper, just call SQLiteDatabase.openOrCreateDatabase() with a path of your choice. -- Kostya Thanks for quick reply. Are there any doc on that. I still struggling with all of it. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android TTS sound braking
There is a feature that can allow you make sure the clips plays fully before termination. I can recall the method/function off the top of my head but I believe it was in the API. On Dec 28, 10:03 pm, Chandana Napagoda cnapag...@gmail.com wrote: HI, I have developed TTS based application, When playing it sound, if any other notification triggered, Then TTS playing with sound braking.( Ex: if SMS received TTS sound brake) What are condition which can occur such a issue? Thank You. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android SDK and AVD Manager - permission denied: connect
I'm getting the following message from the version 8 Android SDK and AVD Manager when I try to refresh the sources: Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Permission denied: connect I have no trouble browsing to the URL shown above. I am not using any type of proxy server. My platform is Windows Vista. Any ideas what might be wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 SDK and AVD Manager - permission denied: connect
I also tried the CLI version android.bat update sdk and got the same results. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to store date and time in database
Without even considering the computational aspects of this issue, there are at least 3 definitions of noon depending on how you measure a day: http://en.wikipedia.org/wiki/Earth%27s_rotation On Dec 28, 7:41 pm, Bob Kerns r...@acm.org wrote: The Wikipedia article on Unix time indicates that there's discussion of dropping leap seconds, and letting civil time drift. I guess eventually, noon will lose whatever vestiges of meaning it has now. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] sqlite on sdcard
On Wed, Dec 29, 2010 at 6:33 PM, Kostya Vasilyev kmans...@gmail.com wrote: Docs: http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html I pasted my code here: http://pastebin.com/1hKWffeu It doesn't differentiate between read-only and writable database open modes (SqliteOpenHelper does), and probably lacks some error handling here and there (this is work in progress). However, it should be enough to get you on the way. -- Kostya Thank you Kostya. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: CPU cost of a semi-infinite loop
Hello, thanks you so much for looking at my problem :) First, my application is using a SCREEN_DIM_WAKE_LOCK so the screen is always on, yet the backlight and the keyboard are dimmed. Did you say in this case, the battery would not be consumed ? So, about accuracy, the fastest callback that I can set is 60ms (a quarternote at 250 BPM tempo). I can afford a 10ms, lets say 15ms jitter, more and it will be noticeable at this tempo. Following this idea, I added a Thread.Sleep(10) since yesterday, to avoid too much iterations of my timing loop : while(isRunning){ //Do stuff... try { Thread.sleep(10); } catch (InterruptedException e) { } }//End while Is it better for CPU or is it only cosmetic ? I didn't try message posting, I'll check this immediately. Is it suitable for so short callback times ? I didn't specified a priority on the Thread, so I suppose it's inherited from the parent's priority. What would be the best value for it in your opinion ? Regards, Alex On 29 déc, 03:22, Dianne Hackborn hack...@android.com wrote: This will run the CPU at 100%. With the screen off, this will tremendously impact battery life. With it on, it will be at least noticeable. How accurate do you need to be? Have you tried other approaches such as posting messages at a time? What priority are you running your timing thread at (priority would be the first thing I look at when it comes to accuracy). On Tue, Dec 28, 2010 at 4:06 AM, Slash4 alex.cen...@gmail.com wrote: Hi, I'm working on a metronome application, so I need a rather accurate time-measuring system to fire the metronome sound at the right time. Actually I found a solution, but I'm wondering if my method will not be cpu consuming. Here is the code snippet : t = new Thread() { public void run() { long neededTime = 0; while(isRunning){ long curTime = SystemClock.uptimeMillis(); if(curTime=neededTime){ neededTime = curTime + (6/tempo); playSound(clickSoundId,100); incrementBeat(); mHandler.post(mUpdateUi); } } } }; t.setDaemon(true); t.start(); You can see I set up a semi-infinite loop with rather frequent accesses to uptimeMillis() . I chose this method after having some issues with sleep() which is not accurate enough. When I want to stop the metronome, I just have to set isRunning to false. How can I evaluate the impact of this on CPU and battery ? Thanks a lot. Rgds, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 store date and time in database
And that's not even considering the effects of tidal friction. I love Wikipedia. -- Kostya 29.12.2010 21:46, Bret Foreman пишет: Without even considering the computational aspects of this issue, there are at least 3 definitions of noon depending on how you measure a day: http://en.wikipedia.org/wiki/Earth%27s_rotation On Dec 28, 7:41 pm, Bob Kernsr...@acm.org wrote: The Wikipedia article on Unix time indicates that there's discussion of dropping leap seconds, and letting civil time drift. I guess eventually, noon will lose whatever vestiges of meaning it has now. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: CPU cost of a semi-infinite loop
I answered you but I don't see my message.. I hope it's OK :s On 29 déc, 03:22, Dianne Hackborn hack...@android.com wrote: This will run the CPU at 100%. With the screen off, this will tremendously impact battery life. With it on, it will be at least noticeable. How accurate do you need to be? Have you tried other approaches such as posting messages at a time? What priority are you running your timing thread at (priority would be the first thing I look at when it comes to accuracy). On Tue, Dec 28, 2010 at 4:06 AM, Slash4 alex.cen...@gmail.com wrote: Hi, I'm working on a metronome application, so I need a rather accurate time-measuring system to fire the metronome sound at the right time. Actually I found a solution, but I'm wondering if my method will not be cpu consuming. Here is the code snippet : t = new Thread() { public void run() { long neededTime = 0; while(isRunning){ long curTime = SystemClock.uptimeMillis(); if(curTime=neededTime){ neededTime = curTime + (6/tempo); playSound(clickSoundId,100); incrementBeat(); mHandler.post(mUpdateUi); } } } }; t.setDaemon(true); t.start(); You can see I set up a semi-infinite loop with rather frequent accesses to uptimeMillis() . I chose this method after having some issues with sleep() which is not accurate enough. When I want to stop the metronome, I just have to set isRunning to false. How can I evaluate the impact of this on CPU and battery ? Thanks a lot. Rgds, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. 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
[android-developers] Does Android's GPS location provider do a built-in optimization?
how accurate is the data from Android's GPS location provider? does the device always try to seek a satellite, or does it sometimes return an optimization of the past locations without querying the satellites? if this question is device-specific, i'm asking about HTC Hero, HTC Desire and Google Nexus One. 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] HELP: Receiver killed on startup.
Experts, I have a simple receiver that listens to the BOOT_COMPLETED action. The manifest is as follows -- ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.preciseinc.DroidLocator android:versionCode=1 android:versionName=1.0 uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / uses-permission android:name=android.permission.ACCESS_NETWORK_STATE / uses-sdk android:minSdkVersion=8 / application android:icon=@drawable/icon android:label=@string/ app_name android:debuggable=true receiver android:name=ServiceAutoStarter android:process=:DroidLocator intent-filter action android:name=android.intent.action.BOOT_COMPLETED/ /intent-filter /receiver /application /manifest -- However, when I start debugging with an emulator, the apk gets installed, but the receiver process is terminated. Please see a snippet of the logcat below. -- 12-29 13:55:48.674: DEBUG/PackageManager(60): Scanning package com.preciseinc.DroidLocator 12-29 13:55:48.684: INFO/PackageManager(60): Package com.preciseinc.DroidLocator codePath changed from /data/app/ com.preciseinc.DroidLocator-1.apk to /data/app/ com.preciseinc.DroidLocator-2.apk; Retaining data and using new 12-29 13:55:48.694: INFO/PackageManager(60): /data/app/ com.preciseinc.DroidLocator-2.apk changed; unpacking 12-29 13:55:48.704: DEBUG/installd(35): DexInv: --- BEGIN '/data/app/ com.preciseinc.DroidLocator-2.apk' --- 12-29 13:55:48.934: DEBUG/dalvikvm(363): DexOpt: load 47ms, verify 29ms, opt 2ms 12-29 13:55:48.954: DEBUG/installd(35): DexInv: --- END '/data/app/ com.preciseinc.DroidLocator-2.apk' (success) --- 12-29 13:55:48.954: WARN/PackageManager(60): Code path for pkg : com.preciseinc.DroidLocator changing from /data/app/ com.preciseinc.DroidLocator-1.apk to /data/app/ com.preciseinc.DroidLocator-2.apk 12-29 13:55:48.954: WARN/PackageManager(60): Resource path for pkg : com.preciseinc.DroidLocator changing from /data/app/ com.preciseinc.DroidLocator-1.apk to /data/app/ com.preciseinc.DroidLocator-2.apk 12-29 13:55:48.954: DEBUG/PackageManager(60): Receivers: com.preciseinc.DroidLocator.ServiceAutoStarter 12-29 13:55:48.974: INFO/ActivityManager(60): Force stopping package com.preciseinc.DroidLocator uid=10040 12-29 13:55:49.134: INFO/installd(35): move /data/dalvik-cache/ d...@app@com.preciseinc.droidlocator-2@classes.dex - /data/dalvik- cache/d...@app@com.preciseinc.droidlocator-2@classes.dex 12-29 13:55:49.144: DEBUG/PackageManager(60): New package installed in /data/app/com.preciseinc.DroidLocator-2.apk 12-29 13:55:49.354: INFO/ActivityManager(60): Force stopping package com.preciseinc.DroidLocator uid=10040 12-29 13:55:49.664: WARN/RecognitionManagerService(60): no available voice recognition services found 12-29 13:55:49.844: DEBUG/dalvikvm(60): GC_FOR_MALLOC freed 8811 objects / 535480 bytes in 171ms 12-29 13:55:49.984: DEBUG/dalvikvm(60): GC_EXPLICIT freed 511 objects / 27096 bytes in 139ms 12-29 13:55:49.984: INFO/installd(35): unlink /data/dalvik-cache/ d...@app@com.preciseinc.droidlocator-1@classes.dex 12-29 13:55:49.994: DEBUG/AndroidRuntime(356): Shutting down VM 12-29 13:55:50.034: DEBUG/dalvikvm(356): Debugger has detached; object registry had 1 entries 12-29 13:55:50.074: INFO/AndroidRuntime(356): NOTE: attach of thread 'Binder Thread #3' failed -- Any ideas on why this is being terminated, and any workarounds? Any and all help greatly appreciated. Regards, Raj Malhotra. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Does Android's GPS location provider do a built-in optimization?
in most gps devices , the device has a graph of visible sat.s and estimates the postion of sat.s based on it ... sincerely mohammad shankayi On Wed, Dec 29, 2010 at 10:59, t tomers...@gmail.com wrote: how accurate is the data from Android's GPS location provider? does the device always try to seek a satellite, or does it sometimes return an optimization of the past locations without querying the satellites? if this question is device-specific, i'm asking about HTC Hero, HTC Desire and Google Nexus One. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: CPU cost of a semi-infinite loop
Perhaps it would be a better idea to a use pre-recorded sound for this. You are trying to solve a problem at the application level that's already been solved, but at lower levels within the system. By using a pre-recorded sound, you can leverage other people's work. For different metronome paces, perhaps you could run some kind of preprocessing on the sound file before feeding it into the sound playback APIs. -- Kostya PS: 250 BPM tempo... do gabber DJs use metronomes? :) 29.12.2010 21:54, Slash4 пишет: Hello, thanks you so much for looking at my problem :) First, my application is using a SCREEN_DIM_WAKE_LOCK so the screen is always on, yet the backlight and the keyboard are dimmed. Did you say in this case, the battery would not be consumed ? So, about accuracy, the fastest callback that I can set is 60ms (a quarternote at 250 BPM tempo). I can afford a 10ms, lets say 15ms jitter, more and it will be noticeable at this tempo. Following this idea, I added a Thread.Sleep(10) since yesterday, to avoid too much iterations of my timing loop : while(isRunning){ //Do stuff... try { Thread.sleep(10); } catch (InterruptedException e) { } }//End while Is it better for CPU or is it only cosmetic ? I didn't try message posting, I'll check this immediately. Is it suitable for so short callback times ? I didn't specified a priority on the Thread, so I suppose it's inherited from the parent's priority. What would be the best value for it in your opinion ? Regards, Alex On 29 déc, 03:22, Dianne Hackbornhack...@android.com wrote: This will run the CPU at 100%. With the screen off, this will tremendously impact battery life. With it on, it will be at least noticeable. How accurate do you need to be? Have you tried other approaches such as posting messages at a time? What priority are you running your timing thread at (priority would be the first thing I look at when it comes to accuracy). On Tue, Dec 28, 2010 at 4:06 AM, Slash4alex.cen...@gmail.com wrote: Hi, I'm working on a metronome application, so I need a rather accurate time-measuring system to fire the metronome sound at the right time. Actually I found a solution, but I'm wondering if my method will not be cpu consuming. Here is the code snippet : t = new Thread() { public void run() { long neededTime = 0; while(isRunning){ long curTime = SystemClock.uptimeMillis(); if(curTime=neededTime){ neededTime = curTime + (6/tempo); playSound(clickSoundId,100); incrementBeat(); mHandler.post(mUpdateUi); } } } }; t.setDaemon(true); t.start(); You can see I set up a semi-infinite loop with rather frequent accesses to uptimeMillis() . I chose this method after having some issues with sleep() which is not accurate enough. When I want to stop the metronome, I just have to set isRunning to false. How can I evaluate the impact of this on CPU and battery ? Thanks a lot. Rgds, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. 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. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] List View inside a Layout
It will be done same way. I m working on similar thing. Exactly, where are you stuck? You have to get listview's id and use set adapter in same way as it is done for a normal listview. Thanks Manoj Kumar Maurya Hi all.. What I want to do is: I have a layout with some textviews and buttons. I want to add to this layout a simple listView with a String, i mean. a simple ListView not a custom one. this is my layout more or less: Layout screen TextView/ Button/ ListView/ /LayoutScreen So, I did a lot of google, but all the examples that i found is for an activity which layout only contains a ListView, simple or custom, but just only a ListView. In my case i don't know how to populate the my list View... I don't know what i am doing bad Can you help me? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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: CPU cost of a semi-infinite loop
This is very similar to a problem I solved when I was testing disk I/O subsystems and needed to generate I/O requests at fixed intervals of a few hundred per second. What I did was to take a timestamp at the beginning of the test and set up a loop with a sleep in it. The initial sleep value was just 1/desired_rate and then I adjusted the sleep value each time the process woke up to keep the average rate constant over the current_time - timestamp interval. This algorithm converged quickly and the jitter was quite small. I can probably find/ post the C code if you'd like to see it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] HELP: Receiver killed on startup.
On Wed, Dec 29, 2010 at 2:04 PM, Raj rnmalho...@gmail.com wrote: I have a simple receiver that listens to the BOOT_COMPLETED action. snip However, when I start debugging with an emulator, the apk gets installed, but the receiver process is terminated. Of course. Actually, your receiver process was probably terminated earlier, as a manifest-registered BroadcastReceiver can only live for a few seconds, tops. and any workarounds? Don't install a new version of your APK. To debug BOOT_COMPLETED receivers, add Log statements to your code and reboot your emulator. Examine LogCat to see what happened. Adjust your code. Lather, rinse, repeat. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Google analytics crash
Hi, I'm using google analytics in my app. I am getting a good number of force closes from users, finally got a stacktrace: Caused by: android.database.sqlite.SQLiteException: file is encrypted or is not a database at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method) at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java: 1864) at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java: 1814) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java: 808) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java: 168) at com.google.android.apps.analytics.PersistentEventStore.getNumStoredEvents(PersistentEventStore.java: 160) at com.google.android.apps.analytics.PersistentEventStore.startNewVisit(PersistentEventStore.java: 177) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(GoogleAnalyticsTracker.java: 108) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(GoogleAnalyticsTracker.java: 99) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(GoogleAnalyticsTracker.java: 83) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(GoogleAnalyticsTracker.java: 94) at com.me.myapp.MyActivity.onCreate(MyActivity.java:30) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2459) anyone else getting this? The call that causes it: private GoogleAnalyticsTracker tracker; tracker = GoogleAnalyticsTracker.getInstance(); tracker.start(mykey, context); - causes the exception. This is working fine for most users. I'm going to try catching the exception, hopefully that will work. 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] Re: CPU cost of a semi-infinite loop
I'd look into Kostya's suggestion. Ideally, you only need the click sample and you can program the audio player to play the sample at precise intervals. Trying to do precise timing with SDK programming is just frought with pitfalls, AFAIK. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 write a android keyboard preference and show in Android Setting Language Keyboard.
Hi I wrote the android keyboard , but I didn't have a preference. I tried to write a preference of my android keyboard , but it didn't show in Android Setting Language Keyboard. Here is my manifest: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.popj.popjkeyboard android:versionCode=1 android:versionName=1.2 application android:label=@string/ime_name service android:name=SoftKeyboard android:permission=android.permission.BIND_INPUT_METHOD intent-filter action android:name=android.view.InputMethod / /intent-filter meta-data android:name=android.view.im android:resource=@xml/ method / /service activity android:name=SoftKeyboardSettings android:label=Settings /activity /application uses-sdk android:minSdkVersion=7 / /manifest Please give me any suggestion. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How implement LBS in Android
Agreed, creating and keeping a POI database up to date is difficult. AFAIK Google Places is one attempt at a universal solution and there are others being considered. Tell us, what particular POIs are you interested in and for what kind of use cases? What are the limitations of Google Places API (I haven't studied it)? Is it just that it's not supported on Android? Could you access it from your web server? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] example on asynctask class..
I'm assuming you've studied this article very carefully: http://developer.android.com/resources/articles/painless-threading.html Please ask a question about a specific problem you're having. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Instructions to manually install an SDK
For reasons that I cannot discover, on my Windows Vista platform, the version 8 Android SDK Manager cannot access the repository URL at https://dl-ssl.google.com/android/repository/repository.xml nor the alternate directory at http://dl-ssl.google.com/android/repository/repository.xml. However, I can browse to both these URLs just fine. Is there a way I can manually download the appropriate SDK and install it in the correct platform folder? Does anyone know of instructions for this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: CPU cost of a semi-infinite loop
On Wed, Dec 29, 2010 at 10:54 AM, Slash4 alex.cen...@gmail.com wrote: First, my application is using a SCREEN_DIM_WAKE_LOCK so the screen is always on, yet the backlight and the keyboard are dimmed. Did you say in this case, the battery would not be consumed ? Absolutely not. The CPU running flat-out takes a fair amount of power. Especially since on most devices if you do this you will cause the kernel to bring the CPU up to its full speed, since as far as it can tell it has tons of work to do. So, about accuracy, the fastest callback that I can set is 60ms (a quarternote at 250 BPM tempo). I can afford a 10ms, lets say 15ms jitter, more and it will be noticeable at this tempo. Following this idea, I added a Thread.Sleep(10) since yesterday, to avoid too much iterations of my timing loop : while(isRunning){ //Do stuff... try { Thread.sleep(10); } catch (InterruptedException e) { } }//End while Is it better for CPU or is it only cosmetic ? I think you should be able to get 10ms accuracy with regular timers -- for reference, a frame at 60fps is 20ms, and we regularly run times update loops at 60fps. Possibly a bigger issue you will run into is GCs, which prior to 2.3 can take significantly more than 10ms and block all threads running in the Dalvik VM while doing so. At the very least, you want to be extremely careful in the rest of your app to avoid generating garbage objects while running. You can tell if this is causing the problem because there will be a log printed each time there is a GC. I didn't specified a priority on the Thread, so I suppose it's inherited from the parent's priority. What would be the best value for it in your opinion ? Probably: http://developer.android.com/reference/android/os/Process.html#THREAD_PRIORITY_AUDIO But note if you use this -- you ABSOLUTELY CAN NOT use a busy-loop. Running at this priority means that thread needs to use as little CPU as it can, only what it needs to do the specific audio work. -- 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] HELP: Receiver killed on startup.
On Wed, Dec 29, 2010 at 11:29 AM, Mark Murphy mmur...@commonsware.comwrote: To debug BOOT_COMPLETED receivers, add Log statements to your code and reboot your emulator. Examine LogCat to see what happened. Adjust your code. Lather, rinse, repeat. You can also use adb shell am to send a BOOT_COMPLETED broadcast to your app for quick testing. I can't remember the exact syntax, but am help will tell you. Be sure to specific your explicit component name when doing this, or you will cause all installed apps to re-run their boot completed receivers, which may not be fun. :) -- 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: CPU cost of a semi-infinite loop
To elaborate a bit: http://developer.android.com/reference/android/media/AudioTrack.html AudioTrack supports streaming mode of operation, where data can be fed into it on the fly. You'd still need to do some sort of scheduled periodic loop, for feeding data to AudioTrack in chunks, but this way can deal with much larger jitter, which would be reasonable at application level. At some point, you'd need to queue the metronome click, presumably from an audio file packed within the application. This should help with that: http://mindtherobot.com/blog/580/android-audio-play-a-wav-file-on-an-audiotrack/ -- Kostya 29.12.2010 22:40, Frank Weiss пишет: I'd look into Kostya's suggestion. Ideally, you only need the click sample and you can program the audio player to play the sample at precise intervals. Trying to do precise timing with SDK programming is just frought with pitfalls, AFAIK. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Does Android's GPS location provider do a built-in optimization?
That doesn't really make sense. When you ask for location, you will specify how accurate you want the data to be. If you ask for GPS accuracy, it will start using that (if it hasn't already). You keep the request open, so it continuously looks for satellites and tracks movement. Each update it gives you includes the accuracy of the position, which is based on the source of the data (network, GPS, etc), and for GPS the number of satellites. Often when you first ask for GPS data, there will be no GPS fix at all, but you will still be able to get some data based on cell towers. The accuracy information tells you how much you can infer from each report you get. But this is not a one-shot request -- as long as you have asked for position reports, it will continually monitor the location as accurately as it can. There is of course the newer API to get the last location, and of course that is what it says -- the last reported location, whatever that was, without use GPS or cell towers to try to determine the current location. On Wed, Dec 29, 2010 at 10:59 AM, t tomers...@gmail.com wrote: how accurate is the data from Android's GPS location provider? does the device always try to seek a satellite, or does it sometimes return an optimization of the past locations without querying the satellites? if this question is device-specific, i'm asking about HTC Hero, HTC Desire and Google Nexus One. 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.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] Instructions to manually install an SDK
I just tried downloading outside the AVD manager - the following worked for me: - Open http://dl-ssl.google.com/android/repository/repository.xml in Internet Explorer, scroll down and find sdk:platform, and inside that, the archive for windows. - Replace repository.xml with the file name, you'll get something like: http://dl-ssl.google.com/android/repository/android-2.2_r02-windows.zip As for installing, it seems like the contents of sdk:platform goes into android-sdk-windows\platforms\android-X (8 for 2.2). There are two more packages, Android SDK Platform-tools, and Android SDK Tools, you can find them in the same .xml file. I would guess they go into android-sdk-windows\platform-tools and android-sdk-windows\tools. -- Kostya 29.12.2010 22:59, Bret Foreman пишет: For reasons that I cannot discover, on my Windows Vista platform, the version 8 Android SDK Manager cannot access the repository URL at https://dl-ssl.google.com/android/repository/repository.xml nor the alternate directory at http://dl-ssl.google.com/android/repository/repository.xml. However, I can browse to both these URLs just fine. Is there a way I can manually download the appropriate SDK and install it in the correct platform folder? Does anyone know of instructions for this? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Does Android's GPS location provider do a built-in optimization?
dianne is right but this ability is only in A-gps devices and as we know all android devices has the ability of positioning with cell towers :) sincerely mohammad shankayi On Wed, Dec 29, 2010 at 12:23, Dianne Hackborn hack...@android.com wrote: That doesn't really make sense. When you ask for location, you will specify how accurate you want the data to be. If you ask for GPS accuracy, it will start using that (if it hasn't already). You keep the request open, so it continuously looks for satellites and tracks movement. Each update it gives you includes the accuracy of the position, which is based on the source of the data (network, GPS, etc), and for GPS the number of satellites. Often when you first ask for GPS data, there will be no GPS fix at all, but you will still be able to get some data based on cell towers. The accuracy information tells you how much you can infer from each report you get. But this is not a one-shot request -- as long as you have asked for position reports, it will continually monitor the location as accurately as it can. There is of course the newer API to get the last location, and of course that is what it says -- the last reported location, whatever that was, without use GPS or cell towers to try to determine the current location. On Wed, Dec 29, 2010 at 10:59 AM, t tomers...@gmail.com wrote: how accurate is the data from Android's GPS location provider? does the device always try to seek a satellite, or does it sometimes return an optimization of the past locations without querying the satellites? if this question is device-specific, i'm asking about HTC Hero, HTC Desire and Google Nexus One. 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.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.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: How to store date and time in database
Sort and compare, mostly true -- but fail if you try to deal with a leap second. At least that's relatively rare. Subtract? No. Fails if a leap second falls between the two times. This is much a much more common case. In either case, your software can malfunction anew on every leap second. Do you want medical device, or industrial control, or flight navigation system, to hiccup on every leap second? Sometimes a second is an enormous error. On Dec 29, 9:05 am, DanH danhi...@ieee.org wrote: It should be pointed out that it doesn't matter (much) what time reference is used, so long as it's used consistently, and all conversion algorithms to/from the reference form understand its details. So long as a consistent reference is used dates will sort and compare correctly. On Dec 28, 9:41 pm, Bob Kerns r...@acm.org wrote: I didn't realize until now that POSIX absolutely FAILED on this. Every description I've seen of this time indicates either that it's number of seconds since January 1, 1970, or that it's UTC -- but it is, in fact, neither. ((Bangs head on keyboard at one second intervals, carefully skipping over leap seconds)). I'm torn between thanking you for pointing this out, and screaming! Both, I guess. I guess it shows how poorly people -- even people on standards committees who OUGHT to know better -- understand time. See the Sun Javadoc for the wiggle room Java allows, based on whatever imperfections the underlying OS has on this score:http://download.oracle.com/javase/6/docs/api/java/util/Date.html The Android SDK documentation, on the other hand, is pathetically silent on the matter. The Wikipedia article on Unix time indicates that there's discussion of dropping leap seconds, and letting civil time drift. I guess eventually, noon will lose whatever vestiges of meaning it has now. This has been a sore point for me for decades. Timekeeping with sufficient accuracy (i.e within seconds) for celestial navigation is one of the greatest scientific endeavors, occupying some of science's best minds over centuries, culminating in the Longitude Prize, offered in 1714 and ultimately won in 1773. The earth rotates one nautical mile at the equator every 4 seconds, so even one second of error in time contributes significant error in position. I have in my possession the 6 volumes of Sight Reduction Tables published by the US Defense Mapping Agency. 6 volumes of tables of numbers for accurate calculation of spherical trigonometry with detailed attention to accuracy, carefully described procedures for calculation, down the the model of computer (IBM 1401) used to perform the calculations. And yes, I used to use them. When your personal safety, and of your crew, depends on accurate time, it gives you a different perspective on the matter! Accurate timekeeping is no less important in computer systems, where properly sequencing internal and external events is often critical -- and sometimes involves life safety. Yet generations of programmers and system administrators alike have refused to be bothered with accurate timekeeping. I guess I'll go protest by setting all my clocks to UTC. (I've used exclusively 24-hour time for almost 40 years, and am used to doing the conversion to/from UTC, so it won't bother me!) On Dec 27, 9:12 pm, Steve Allen sla29...@gmail.com wrote: On Dec 26, 11:39 pm, Kostya Vasilyev kmans...@gmail.com wrote: With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. Keep in mind that the count of milliseconds does not conform to legal nor physical elapsed time for any observer. See here for morehttp://www.ucolick.org/~sla/leapsecs/epochtime.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Animation problem
Thank you for your answer. I tried all 2^6 combinations of the three flags (fillBefore, fillAfter, fillEnabled) but the animation still not works. I only want a pulsate. No matter what I do it is no liquid/smooth animation. It jerks and jumps. I can't find a solution. I would be grateful for help. On 29 Dez., 03:47, John Lussmyer johnlussm...@gmail.com wrote: You may want to set the setFillBefore and/or setFillAfter values. (one of them defaults to true, the other to false.) On Tue, Dec 28, 2010 at 3:21 PM, iced pascal-h...@t-online.de wrote: Hello, I'm new here and I don't know if this is the right place for my problem. Please excuse me if it's wrong. I want to create a scale animation where a view grows a bit from it's original size and then shrinks to it's old size. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: New Application - advice on how to get started?
You'll probably need a set of reusable Android components (Database, Services, etc) for this. You may want to take a look a the Jt Design Pattern Framework: a) Java Pattern Oriented Framework, An application of the Messaging Design Pattern IBM Technical Library http://www.ibm.com/developerworks/webservices/library/ws-designpattern/index.html b) Messaging Design Pattern (MDP) and pattern implementation - Published in the 17th conference on Pattern Languages of Programs (PLoP 2010). https://jt.dev.java.net/files/documents/5553/150311/designPatterns.pdf On Dec 27, 6:45 pm, chat2joe chat2...@gmail.com wrote: Hey all, We're starting a new project for college. We've no android development experience, not even Java, so really jumping in the deep end. So any advice on relevant tutorials is welcome... I haven't found too much on maps online. - We need to develop an application that will allow users to share their location... this will upload to a database every few seconds. - Then users can view other users on a google map, positions downloaded every few seconds from the database. - We will want the positions to update automatically at a fixed interval and redraw on the map. - Also we will need to draw paths/manual-routes as an overlay on the map. Any advice where to begin with this? I have the SDK downloaded and the Hello Android tutorial completed. Any advice on a series of tutorials, videos, etc that would help achive the above would be great it's a big step from Hello Android! Thanks, Joe -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] New Android Market Client Update
I just released my first payed application and a get alot of refunds but they are usally within in 3 minutes which is really odd, im almost positive that it works on most phones, its just weird because you wouldent even be able to play the first level in that time. On Dec 11, 2010 3:42 AM, webmonkey webmonke...@gmail.com wrote: From the blog post at: http://android-developers.blogspot.com/2010/12/android-market-client-update.html Since most users who request a refund do so within minutes of purchase, we will reduce the refund window on Market to 15 minutes. Funny, this is also my experience but not because they do not like the app, but because it won't download!!! The purchase was successful, but the download will be stuck at 0%. So they panic and cancel it within minutes and then mail us that it won't work! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Does Android's GPS location provider do a built-in optimization?
Yes if the device does not have a GPS, or if the user has turned off the GPS, you will only get cell or network based location. On Wed, Dec 29, 2010 at 12:47 PM, mohammad shankayi mohd...@gmail.comwrote: dianne is right but this ability is only in A-gps devices and as we know all android devices has the ability of positioning with cell towers :) sincerely mohammad shankayi On Wed, Dec 29, 2010 at 12:23, Dianne Hackborn hack...@android.comwrote: That doesn't really make sense. When you ask for location, you will specify how accurate you want the data to be. If you ask for GPS accuracy, it will start using that (if it hasn't already). You keep the request open, so it continuously looks for satellites and tracks movement. Each update it gives you includes the accuracy of the position, which is based on the source of the data (network, GPS, etc), and for GPS the number of satellites. Often when you first ask for GPS data, there will be no GPS fix at all, but you will still be able to get some data based on cell towers. The accuracy information tells you how much you can infer from each report you get. But this is not a one-shot request -- as long as you have asked for position reports, it will continually monitor the location as accurately as it can. There is of course the newer API to get the last location, and of course that is what it says -- the last reported location, whatever that was, without use GPS or cell towers to try to determine the current location. On Wed, Dec 29, 2010 at 10:59 AM, t tomers...@gmail.com wrote: how accurate is the data from Android's GPS location provider? does the device always try to seek a satellite, or does it sometimes return an optimization of the past locations without querying the satellites? if this question is device-specific, i'm asking about HTC Hero, HTC Desire and Google Nexus One. 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.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.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.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: Animation problem
jerks and jumps in the emulator, or one the phone? I've found that the emulator is VERY bad at running things at a consistent speed. The phone seems to do a much better job of it. On Wed, Dec 29, 2010 at 1:27 PM, iced pascal-h...@t-online.de wrote: Thank you for your answer. I tried all 2^6 combinations of the three flags (fillBefore, fillAfter, fillEnabled) but the animation still not works. I only want a pulsate. No matter what I do it is no liquid/smooth animation. It jerks and jumps. I can't find a solution. I would be grateful for 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] Re: Converting Touch Inputs to Vectors
Bumping hoping someone can point me in the right direction! Paul On Dec 29, 1:18 am, Paul pmmen...@gmail.com wrote: Hi all. I am writing an app that will convert touchscreen user inputs (such as the user 'handwriting' on the screen) into vectors that can then be saved and recalled later. I need to get the vectors into a format I can store locally, either as a file or in an SQLite database. Just wondering if anyone had any pointers as to how to get started... my initial thought was to listen for MotionEvents and when an ACTION_DOWN is detected, record the coordinates and use this as the vector's start point, and then record intermediate coordinates as the ACTION_MOVE is triggered (used to help define the shape of this Path they are creating), ending the stroke vector on ACTION_UP... but this results in many many intermediate points per vector (30 or 40) and with several hundred vectors (a full page of handwritten text on a tablet for example) this solution gets quickly out of hand as each page will potentially require tens of thousands of points... Any suggestions on a better way to represent and store user-inputed vectors/paths? Or maybe another approach completely? Thanks for any help! Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 avoid cut off of words in TextView
Hi list! for example : TextView a = new TextView(this); a.setText(I'm a set of words, some ones larger than others, no matter); it is posible to have painted the next : i'm a set of wo rds, some one s larger than o thers, no matt er i need something like i'm a set of words, some ones larger than others, no matter I have tried using Gravity.CENTER_HORIZONTAL, it works but not totally. some advice? 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] how to avoid cut off of words in TextView
On Wed, Dec 29, 2010 at 11:47 PM, gato chlr dany...@gmail.com wrote: Hi list! for example : TextView a = new TextView(this); a.setText(I'm a set of words, some ones larger than others, no matter); it is posible to have painted the next : i'm a set of wo rds, some one s larger than o thers, no matt er i need something like i'm a set of words, some ones larger than others, no matter I have tried using Gravity.CENTER_HORIZONTAL, it works but not totally. some advice? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en IMHO android doesn't have lexical knowledge about language. Is is purely based on length value you might say. I my native language you have words that are pretty long and which you have to dissect in specific way so even this wouldn't work. I think you will have to implement something that will do padding with empty space to achieve that behavior. -- God is Real, unless declared Integer. J. Allan Toogood, FORTRAN programmer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Passing objects to new intents
On Tue, Dec 28, 2010 at 11:52 PM, maomaostevencao maomaosteven...@hotmail.com wrote: If I want to load a new activity and pass some of arguments using this way, I have to get the reference of this new activity, but seems platform doesn't provide any API to get it. How can you do it? I mean how I can get the reference of the new activity You do not need a reference to the new activity. You launch an intent with the proper variables, then the new activity is launched and within it you use getIntent() to get the Intent that launched it, including any variables you passed along. - 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: How to store date and time in database
Of course, if you're adding/subtracting you need to know what your policy is not just for leap seconds but for DST -- a much more common and substantial problem. In general you shouldn't add/subtract seconds in an attempt to calculate days/months/years, but should convert to/from some sort of calendar notation, letting the conversion handle such oddities. (And one hopes that no one's relying on Android accuracy to run a nuclear reactor.) (Though actually medical devices and industrial controls are fairly happy with the Unix clock, since they mostly just want to measure time intervals, not calculate wall time accurately.) (And I've always felt that a serious mistake was made to add leap seconds, vs define the second a hair longer and subtract seconds. Handling an 61 second minute is far trickier for a computer than handling a 59 second minute.) On Dec 29, 3:00 pm, Bob Kerns r...@acm.org wrote: Sort and compare, mostly true -- but fail if you try to deal with a leap second. At least that's relatively rare. Subtract? No. Fails if a leap second falls between the two times. This is much a much more common case. In either case, your software can malfunction anew on every leap second. Do you want medical device, or industrial control, or flight navigation system, to hiccup on every leap second? Sometimes a second is an enormous error. On Dec 29, 9:05 am, DanH danhi...@ieee.org wrote: It should be pointed out that it doesn't matter (much) what time reference is used, so long as it's used consistently, and all conversion algorithms to/from the reference form understand its details. So long as a consistent reference is used dates will sort and compare correctly. On Dec 28, 9:41 pm, Bob Kerns r...@acm.org wrote: I didn't realize until now that POSIX absolutely FAILED on this. Every description I've seen of this time indicates either that it's number of seconds since January 1, 1970, or that it's UTC -- but it is, in fact, neither. ((Bangs head on keyboard at one second intervals, carefully skipping over leap seconds)). I'm torn between thanking you for pointing this out, and screaming! Both, I guess. I guess it shows how poorly people -- even people on standards committees who OUGHT to know better -- understand time. See the Sun Javadoc for the wiggle room Java allows, based on whatever imperfections the underlying OS has on this score:http://download.oracle.com/javase/6/docs/api/java/util/Date.html The Android SDK documentation, on the other hand, is pathetically silent on the matter. The Wikipedia article on Unix time indicates that there's discussion of dropping leap seconds, and letting civil time drift. I guess eventually, noon will lose whatever vestiges of meaning it has now. This has been a sore point for me for decades. Timekeeping with sufficient accuracy (i.e within seconds) for celestial navigation is one of the greatest scientific endeavors, occupying some of science's best minds over centuries, culminating in the Longitude Prize, offered in 1714 and ultimately won in 1773. The earth rotates one nautical mile at the equator every 4 seconds, so even one second of error in time contributes significant error in position. I have in my possession the 6 volumes of Sight Reduction Tables published by the US Defense Mapping Agency. 6 volumes of tables of numbers for accurate calculation of spherical trigonometry with detailed attention to accuracy, carefully described procedures for calculation, down the the model of computer (IBM 1401) used to perform the calculations. And yes, I used to use them. When your personal safety, and of your crew, depends on accurate time, it gives you a different perspective on the matter! Accurate timekeeping is no less important in computer systems, where properly sequencing internal and external events is often critical -- and sometimes involves life safety. Yet generations of programmers and system administrators alike have refused to be bothered with accurate timekeeping. I guess I'll go protest by setting all my clocks to UTC. (I've used exclusively 24-hour time for almost 40 years, and am used to doing the conversion to/from UTC, so it won't bother me!) On Dec 27, 9:12 pm, Steve Allen sla29...@gmail.com wrote: On Dec 26, 11:39 pm, Kostya Vasilyev kmans...@gmail.com wrote: With all due respect, there is a much easier way. Java date/time stamps are internally represented by long values, the value being the number of milliseconds since Jan. 1, 1970 GMT. Keep in mind that the count of milliseconds does not conform to legal nor physical elapsed time for any observer. See here for morehttp://www.ucolick.org/~sla/leapsecs/epochtime.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email
[android-developers] Problem in Browser App
When i try to scroll in webview(say for example YAHOOMAIL inbox page). There are multiple Focus-Ring is visible around the check box in that page. This happen only when i touch the screen and drag it. Regards Yogendra. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: display data from database in proper order
On Tue, Dec 28, 2010 at 3:32 AM, pramod.deore deore.pramo...@gmail.comwrote: After adding android:layout_width=75px in every TextView it looks better. Don't use set pixel values - it will break on different densities and / or resolutions. But still there is any other solution? Try the layout_weight parameter again - but try using different values. Also look at the shrinkable and stretchable properties of the TableLayout. - 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: What changed in Gingerbread as far as the app widgets?
For now, I fixed my widget on 2.3 by going from a monolithic 322px high background drawable to smaller drawables. Of course, I shouldn't have to do that, but whatever... If you place any widgets on 2.3 and compare it to 2.2, you can see that they are spaced differently. On 2.3, they are a lot closer to each other vertically and there is more (unused) room above the phone/ app/browser standard buttons. So it appears that 2.3 has shrunk the physical height of one widget cell. On Dec 29, 4:36 pm, Kostya Vasilyev kmans...@gmail.com wrote: 29.12.2010 5:23, Mark Murphy пишет: On Tue, Dec 28, 2010 at 9:15 PM, Zsolt Vasvarizvasv...@gmail.com wrote: Sorry, what's your point? Those docs haven't been updated since 1.5 and they assume a 320x480 screen. I am fairly certain that document is newer than 1.5, but, never mind. I have an Android 2.3 device. I have tried some third-party app widgets (Ambling, Remember the Milk, Extended Controls). None appear to have 11px cropped off the bottom. Hence, the problem you are experiencing may solely be with the 2.3 emulator. It wouldn't be the first reported problem. My observations match Zsolt's (not regarding 2.3, but rather widget sizing in general). The sizes and artwork templates in the guidelines only work for HVGA devices and for high-res devices in portrait mode (because portrait screen width scales the same way as the device's dpi value). On high-res devices in landscape mode, the templates don't line up (esp. when you consider that 800 and 854 pixel wide hdpi screens use equal scaling but different home screen layouts). On QVGA the templates fail for both portrait and landscape modes. For anyone interested: take standard 4x1 landscape widget width per the above document, 424dp. Scale that to pixels at ldpi resolution - you get 318. The screen is 320 pixels wide, but the app drawer handle takes more than 2 pixels, so widgets actually have smaller width than in the docs. What would really help, IMHO, is if there was a special dimension unit for widgets: one home screen cell. Then one could specify widget layout size as, e.g., 2wc by 1wc (widget cell) and use margins expressed in dp to add space between widgets. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Listview using ArrayAdapter trouble
Hi, I have an app that I mine data with an ArrayList and load to an ArrayAdapter to display as listview. How can I do more than 1 textview item in 1 roll? My code is: ---list.xml--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/selector android:padding=10sp TextView android:id=@+id/listA android:layout_width=wrap_content android:layout_height=wrap_content android:singleLine=true android:gravity=center_vertical|left android:textAppearance=?android:attr/ textAppearanceMediumInverse /TextView /LinearLayout --listadapter.xml--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ListView android:id=@+id/listView android:cacheColorHint=#00 android:layout_width=fill_parent android:layout_height=wrap_content / /LinearLayout --code--- lv1=(ListView)findViewById(R.id.listView); lv1.setAdapter(new ArrayAdapterString(this, R.layout.listadapter, R.id.listA, allTheList2)); all is ok for single line. --- try to do but fail --- Create another TextView such as: TextView android:id=@+id/listB blah blah... then add another: lv1.setAdapter(new ArrayAdapterString(this, R.layout.listadapter, R.id.listB, allTheList2)); But fail. Basically, what I want to do is to mine data DATA_FIELD1, DATA_FIELD2 populate into a listview to display (single roll): DATA_FIELD1 (Larger font) DATA_FIELD2 (Smaller font) I can't find any example to do this, can anyone please advice? Many Thanks, CJ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Does Android's GPS location provider do a built-in optimization?
If you request updates from the NETWORK_PROVIDER you will get location from cell towers or WiFi. If you use GPS_PROVIDER then the GPS will be turned on and you will get a GPS location after some time. This some time depends on many factors and the time of the last fix, first of all. On Dec 29, 12:47 pm, mohammad shankayi mohd...@gmail.com wrote: dianne is right but this ability is only in A-gps devices and as we know all android devices has the ability of positioning with cell towers :) sincerely mohammad shankayi On Wed, Dec 29, 2010 at 12:23, Dianne Hackborn hack...@android.com wrote: That doesn't really make sense. When you ask for location, you will specify how accurate you want the data to be. If you ask for GPS accuracy, it will start using that (if it hasn't already). You keep the request open, so it continuously looks for satellites and tracks movement. Each update it gives you includes the accuracy of the position, which is based on the source of the data (network, GPS, etc), and for GPS the number of satellites. Often when you first ask for GPS data, there will be no GPS fix at all, but you will still be able to get some data based on cell towers. The accuracy information tells you how much you can infer from each report you get. But this is not a one-shot request -- as long as you have asked for position reports, it will continually monitor the location as accurately as it can. There is of course the newer API to get the last location, and of course that is what it says -- the last reported location, whatever that was, without use GPS or cell towers to try to determine the current location. On Wed, Dec 29, 2010 at 10:59 AM, t tomers...@gmail.com wrote: how accurate is the data from Android's GPS location provider? does the device always try to seek a satellite, or does it sometimes return an optimization of the past locations without querying the satellites? if this question is device-specific, i'm asking about HTC Hero, HTC Desire and Google Nexus One. 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.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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: network LocationProvider
If the WiFi service is turned off the you will get position from the cell tower. If you could turn off the cell service and keep WiFi on then you get position from WiFi (however I don't think you can turn off phone service easily) But you can use the location accuracy to differentiate between WiFi and cell-tower based location WiFi will give you position accuracy around 50m, cell tower - more than hundred (from my experience - 200-300m) On Dec 29, 8:20 am, Dan dan.schm...@gmail.com wrote: I have a request to distinguish location sources from the network LocationProvider (is it cell tower based, or ip address based). Is there a safe rule of thumb proxy I can use to determine this e.g. if the phone has a cell signal it uses the cell tower because that is more accurate, otherwise it uses the network? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Content provider persistence
Hi, I'm writing an application where the user needs to choose a timezone so I'm using the search capability of Android. For having the time zone as a recommendation inside the search, I've implemented a Content Provider for the time zone. The problem is that the content provider remains alive after the selection is made... and I want to destroy it. How can I do that? Thanks, PMD -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 update one of views(setText, setImage) in item already added on ListView
On Wed, Dec 29, 2010 at 2:41 AM, Mingchung jaw...@gmail.com wrote: Is that meaning the layout of ListView item is decided when 'getView' method called somewhere? Yes. What you return from getView() is what will show up in the ListView for the given index. - 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: CPU cost of a semi-infinite loop
How accurate is the looping setting on the MediaPlayer? Is it possible to synthesize the click track and then send it to a media player and set it to loop? I'm not sure how accurate that would be, perhaps someone else could offer some insight? kris On Wed, Dec 29, 2010 at 3:23 PM, Kostya Vasilyev kmans...@gmail.com wrote: To elaborate a bit: http://developer.android.com/reference/android/media/AudioTrack.html AudioTrack supports streaming mode of operation, where data can be fed into it on the fly. You'd still need to do some sort of scheduled periodic loop, for feeding data to AudioTrack in chunks, but this way can deal with much larger jitter, which would be reasonable at application level. At some point, you'd need to queue the metronome click, presumably from an audio file packed within the application. This should help with that: http://mindtherobot.com/blog/580/android-audio-play-a-wav-file-on-an-audiotrack/ -- Kostya 29.12.2010 22:40, Frank Weiss пишет: I'd look into Kostya's suggestion. Ideally, you only need the click sample and you can program the audio player to play the sample at precise intervals. Trying to do precise timing with SDK programming is just frought with pitfalls, AFAIK. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] On which list item user click
Hi all, In my application I am displaying list of data from database using SimpleCursorAdapter class. This list contains 6 columns. Now I want to know on which row user had clicked. I want to delete that record on which user had clicked. I had override protected void onListItemClick(ListView l,View v,int position,long id) { super.onListItemClick(l, v, position, id); System.out.println (User click on list item); } method. If I click on ay row then above code execute. But I want to find out value in these columns. If I add removeSwitch = l.getItemAtPosition(position).toString(); then it returns android.database.sqlite.sqlitecur...@43d2a490. So how I came to know which entry from database I want to delete? 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] Denisity dependent resource resolution bug?
I have an integer resource defined. Placed the default value into values/integers.xml and an MDPI override in values-mdpi/integers.xml On my HDPI device, the resource that's picked comes from the MDPI folder and not the default folder. I consider this a bug. I can see it being correct for drawables, as you would want to scale from the closest match, but for anything else, I believe this should absolutely not be the case. PS: I tried to test what would happen on an LDPI screen, but I am no longer able to start a QVGA emulator session. The emulator, running either 2.2 and 2.3 just hangs after the text A N D R O I D boot screen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: On which list item user click
After adding following I got value of list as protected void onListItemClick(ListView l,View v,int position,long id) { cursor = (Cursor) myAdapter.getItem(position); super.onListItemClick(l, v, position, id); System.out.println (User click on list item); String sn = cursor.getString(cursor.getColumnIndex(RoomName)); System.out.println (^^^+sn); } Thanks. On Dec 30, 9:36 am, pramod.deore deore.pramo...@gmail.com wrote: Hi all, In my application I am displaying list of data from database using SimpleCursorAdapter class. This list contains 6 columns. Now I want to know on which row user had clicked. I want to delete that record on which user had clicked. I had override protected void onListItemClick(ListView l,View v,int position,long id) { super.onListItemClick(l, v, position, id); System.out.println (User click on list item); } method. If I click on ay row then above code execute. But I want to find out value in these columns. If I add removeSwitch = l.getItemAtPosition(position).toString(); then it returns android.database.sqlite.sqlitecur...@43d2a490. So how I came to know which entry from database I want to delete? 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