[android-developers] Unable to start activity from WebView using URI (but can start from non-webview email application)
I am having issues starting my application using a URI displayed in a WebView control. My application defines two activities that can be started using specific URIs. I've defined my intent filters as follows: intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.BROWSABLE/ category android:name=android.intent.category.DEFAULT / data android:scheme=myapplication android:host=doAction1/ /intent-filter intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.BROWSABLE/ category android:name=android.intent.category.DEFAULT / data android:scheme=myapplication android:host=doAction2/ /intent-filterIn the G1 built-in email application if the user clicks on a URI of the format myapplication://doaction1?parameters then the activity corresponding to doAction1 is invoked. Similarly, when the URI is of the format myapplication://doaction2?parameters is clicked on then the activity corresponding to doAction2 is invoked. However when I am running the HTC Magic mail application this does not work. HierarchyViewer shows that the renderer for the HTC app is a WebView control. What is even more puzzling is that when that same email application is used with a GMail account then the activity is started correctly. It seems that the WebView may be intercepting the URI and choosing not to start the activity in the Exchange case - however I want to make sure that I'm not doing something wrong. Any pointers are much appreciated. Thanks Lee -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Need an invitation to google Wave?
Please invite me iya...@gmail.com On Nov 3, 2:19 pm, eris23 jdkat...@gmail.com wrote: I could use one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add file .sqlite extension to our project
So you have a pre-populated database that you'd like included with the application upon installation? I'm not sure what the preferred solution is for this, but it might be possible to accomplish this via a raw resource. In general, a raw resource is a file that can be bundled with your application and accessed via: R.raw.* See: http://developer.android.com/guide/topics/resources/resources-i18n.html I assume that you've already gotten SQLite to work in general. If not, I highly suggest the Notepad tutorial, which is a great primer: http://developer.android.com/guide/tutorials/notepad/index.html Hope this helps! -- PJ On Nov 3, 6:55 am, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please 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
Re: [android-developers] Problem RemotableViewMethod while extending TextView
bostwick wrote: The included Chronometer widget doesn't quite have the functionality I wanted, so I copied its code into my own package. The source code to Android is not necessarily designed to be pulled out and used in isolation elsewhere. Some classes will work that way (e.g., I have cloned AsyncTask and MatrixCursor), but others will not because they have dependencies on other open-source-but-not-in-the-SDK classes and methods. Looking through the android source, you can see stock widgets using the RemotableViewMethod all over the place, but for some reason, my code can't. That is probably used by the firmware build process. So, my question is this: What can I do to enable the RemotableViewMethod annotation in my custom widgets? Most likely, you can't. Is there something I should be doing differently in order to code custom widgets? Well, your underlying problem didn't make it into your paste. You are failing on a NullPointerException (line #42 of the paste), and you need to track that down. AFAIK, the RemotableViewMethod annotation will not affect you if you are using a widget in an activity. I know that part of the problem is just my lack of experience with the Android SDK, and I don't fully understand what the RemoteViews class does or why it's needed, and the two sentence description in the API docs doesn't help much there. If someone could explain just the logistics of this class, that would also be helpful. Mostly, in terms of the SDK, RemoteViews is used for app widgets -- those doodads you can put on the home screen. Since the home screen runs as its own process, it can't execute your code. Instead, via RemoteViews, you effectively serialize a bunch of UI operations that get sent from your own process to the home screen for execution. UI widgets (android.widget.*) that work with RemoteViews get the @android.view.RemotableViewMethod to indicate what can and cannot be used in this fashion, AFAICT. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Setting RFCOMM/SPP Bluetooth Baud rate
A better question would be, is there a default baud rate that Android uses or something? On Nov 3, 8:36 pm, Aakash Patel aakashbpa...@gmail.com wrote: Then how are we supposed to initiate communications with a serial Bluetooth device? On Nov 3, 8:16 pm, Nick Pelly npe...@google.com wrote: On Thu, Oct 29, 2009 at 12:23 PM, Aakash Patel aakashbpa...@gmail.com wrote: Hello, I am making an app that utilizes the BlutoothSocket API and am trying to create a serial connection over Bluetooth with RFCOMM/SPP profile. I do not see how I set the baud rate for the connection, how would I set it? You cannot set the SPP baud rate with the current API. Thanks, Aakash Patel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] How to pass large amount of data during startActivityForResult
tomei.ninge...@gmail.com wrote: From one activity, I want to pass a lot of data (about 1MB of Strings). No, you don't. You want 1MB of data to be available to multiple activities. There is a very big difference; you do NOT want to be copying 1MB of Strings. I tried sticking it in Intent.putExtra(ArrayListString), but if I put in too much data, I get FAILED BINDER TRANSACTION. And, among other things, this would be copying 1MB of Strings once or twice. What's the easiest way? I don't want to publish a service, or use the file system. I really want a pipe that can write data from one end and read it from the other end. I can handle the case where the starter Activity dies while the startee activity is trying to read from the pipe. Use a static data member. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010: http://bignerdranch.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 SDK not working on Windows 7
For what it's worth, I had a similar issue. I didn't get any error messages, just a window blink and immediate shutdown with no error messages. The lack of any error message was very frustrating. But then I realized that I had not installed Java since installing Windows 7. So, I installed the Java SDK, and this solved my problem. Hope this helps someone! -- PJ P.S. This discussion thread probably belongs in the android-beginners group. On Nov 3, 7:43 pm, hoss spence bendaka...@gmail.com wrote: Actually I just tried it and it worked. The only thing I can think of was that I rebooted and perhaps that fixed something environmental. I looked more closely and Edo's original problem and realize I had a different issue anyway . Mine was looking for some resource that it couldn't find. My apologies for being misleading. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ProgressDialog went back to the first view called it when dismiss()
No it's not restarted. I even tried to put a third view to test it. The third view will disappear and the Login view will display when dialog dismisses exactly the same way. I am gonna change my codes to AsyncTask and try again. On Nov 3, 6:06 pm, Jason Proctor jason.android.li...@gmail.com wrote: ok i'm just wondering what's causing the view to change after the progress dialog goes away. one crazy theory i had was that you had a rogue onDismiss(). anything funky in the ddms log? is your activity being restarted somehow? Guess I need to move to AsyncTask asap... No I don't have onDismiss handler, I assume when the dialog dismisses what ever was displaying on the screen will not be changed... On Nov 3, 5:58 pm, Jason Proctor jason.android.li...@gmail.com wrote: do you have an onDismiss handler for the progress dialog? i used to use Handlers, now i use AsyncTask. i'd never go back :-) the show() and dismiss() of the dialog, even the new ProgressDialog() are all inside Handler message processing codes. I don't think I need to user AsyncTask here even it is very useful. Basically the Handler receives data, updates the UI and dismisses the dialog. Then Bang! the Login View shows up. On Nov 3, 5:45 pm, Jason Proctor jason.android.li...@gmail.com wrote: what does your code do when the asynchronous operation is complete? do you register an onDismiss() for the ProgressDialog? seriously though i would advise anyone doing anything with threads and progress dialogs to use AsyncTask. this wonderful class decouples the task from the caller and has nice hooks to do things like manage ProgressDialogs. and everything happens in the right thread automagically. adopt AsyncTask, see all problems like this go away. Hi, I have a weird problem on progress dialog: I have 2 views: Login View and say, Display View. In Login View, when I click the 'Login' button, a progress dialog is created (new ProgressDialog(...)), shown and stored in a variable 'mProgressDialog'. After login, the dialog is dismissed and some information are displayed in Display View (Login View hides). Now I want to display another progress dialog when 'Update' button is clicked and when the update is done, dismiss the dialog and display new information. So I use: mProgressDialog = new ProgressDialog(...); to create a new progress dialog with new title and message. Show. Now the weird thing happens when the new dialog dismisses. The program flashes the Display View for a blink and then shows the Login View I tried to change the view etc. but same problem happens over and over again. So I am thinking it might because one activity can only be assigned to ONE progress dialog and no matter how you re-create it you still get the same progress dialog. And the dialog is linked to a certain view which will be shown automatically when the dialog dismisses. Please tell me I am 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 -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Picking up a PhoneBook entry under Android 2.0 !!!
I just published some sample code illustrating this use of both legacy and new Contacts APIs in the same app. See http://code.google.com/p/android-business-card Cheers, - Dmitri On Mon, Nov 2, 2009 at 9:31 AM, Mark Murphy mmur...@commonsware.com wrote: jarkman wrote: int sdkVersion = Integer.parseInt(Build.VERSION.SDK); Note that if you are using API version 4 (1.6 and newer), there is Build.VERSION.SDK_INT, which already converts this to an integer. If you are still using API version 3, you'll need to parse the String as shown above. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.6 Programming 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: Poll Screen On/Off state
Monitor the ACTION_SCREEN_OFF and ACTION_SCREEN_ON Intents, then. If your application starts based on a user action, then you know the screen is on at that point -- you don't need an API for that. That occured to me, but I'm not confident that it would be reliable. I don't like the idea of listening for 2 events, storing a status for later use, and hoping that I never miss an event or start with the screen off. One possible troublesome scenario occurs when the app starts really slow for some reason and before the listener is registered, the user turns the screen off. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] dummy Binder/C++ service
Hi, this question probably belongs on android-porting; it is well outside of the SDK. On Tue, Nov 3, 2009 at 2:56 PM, Michael Richardson mcr+gm...@sandelman.camcr%2bgm...@sandelman.ca wrote: I wrote a dummy HelloWorld service and client. It uses Binder for IPC. For some this is likely duh, but it did take me several days of puzzling to work things out. I think some of the problem is that there is some dead code in IMediaPlayerClient.cpp, which I was using as my guide. I'm convinced that it should be possible to see the services from Java Binder/ServiceManager code, and avoid a layer of JNI (and thus an NDK invocation) between a Java application and a C++ service, but I didn't manage that. The bird droppings in the src/org/credil/...*.java are my attempts, ignore them, or better yet, fix them. Push the three pieces generated: libhelloworldservice.so (to /system/lib), and helloworldservice, and helloworldclient to /data. adb shell cd /data ./helloworldservice ./helloworldclient I hope that this code will help others from scratching their head a lot. https://review.source.android.com/#change,12454 is one suggestion I have to make other writers of code like this easier. Probably I'm posting to the wrong mailing list, sorry. I can not keep up with these mailing lists. My code is at: http://github.com/mcr/Android-HelloWorldService -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Re: how to know if it the emulator or device
On Nov 3, 2:29 pm, Zhihong GUO gzhh...@gmail.com wrote: Hi all, How to know if the application is running on emulator or on a real device? I want to implement a function to detect wifi connection. If the application is running on emulator, just skip the wifi detection, while on real device, the wifi connection check should be done. how to do that? Thank a lot, James Alternatively, you can check the phone model variable: PhoneModel = android.os.Build.MODEL; On my G1 phone, it gives me HTC DREAM For the emulator, it gives sdk. I don't know what method is preferred by google, but it feels more secure to me than using the ANDROID_ID var... Emmanuel http://androidblogger.blogspot.com/ http://www.alocaly.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 SDK not working on Windows 7
Hi, I get my first name back (which is how I log in and appended to \Users\ gives me my real login directory ). That seems valid. Also public static void main(String[] args) { System.getProperties().list(System.out); } comes up with reasonable stuff. I intend to try and debug this over the weekend. Worse comes to worse I can Jad the jar file classes and run it through the Eclipse debugger to see what's going on. On Nov 3, 10:58 am, jotobjects jotobje...@gmail.com wrote: Hoss - what happens if you type echo %USERNAME% and echo %USERPROFILE% in a command window? On Nov 3, 2:08 am, Edo Noordhuizen edo.noordhui...@gmail.com wrote: Hi! I contacted my pc manufacturer about the issue, they weren't any help. I am sure though that the cause of the issue has something to do with preinstalled windows 7 versions! I don't know where the problem really lies, maybe Java reads the wrong registry key or those preinstalled windows 7 versions fill the wrong keys or something I don't know. I finally just installed windows 7 from a retail DVD.. this fixed the problem. Thank you all for your help in figuring this out Hoss, good luck I hope you reach a solution soon, because it is a frustrating problem! With kind regards, Edo Noordhuizen On Mon, Nov 2, 2009 at 4:20 AM, hoss spence bendaka...@gmail.com wrote: I also just upgraded from Vista to Windows7 and have the exact same problem. Please post if you come up with a solution. On Oct 31, 12:05 am, Robert Green rbgrn@gmail.com wrote: I used to run Eclipse 3.4 / Java 1.6 / Android SDK 1.0,1.1,1.5,1.6 on Vista 64 but recently did a clean install of Windows 7. Now I'm running Eclipse 3.4 / Java 32 and 64 1.6 / Android SDK 1.5-2.0 on Windows 7 Professional x64 without any problems. Windows 7 seems to handle everything exactly the same way vista did. It is a derivative of Vista, after all. Edo, I'd say your problem is more with your specific environment or configuration than it is with Windows 7. Consider wiping all of your java installation stuff and environment variables and reinstalling java to get it clean. I didn't set any special environment variables for anything anywhere. In fact, all I did was dump eclipse on, drop the SDK into c: \Android_SDK and install ADT. Everything worked first try - but it was a totally clean installation. On Oct 30, 3:41 pm, Edo Noordhuizen edo.noordhui...@gmail.com wrote: I've ran the line and found the user.home property is set to C:\Users\PARA ... there is no user named PARA on my system. I've quickly searched through the registry, and all I can think of right now is that PARA are the first 4 letters of the computer manufacturer??.. I'll be doing some more searching later tonight.. Thanks a lot for your help! With kind regards, Edo Noordhuizen On Fri, Oct 30, 2009 at 9:20 PM, jotobjects jotobje...@gmail.com wrote: That's weird if Windows 7 does this in a new way. You need to know where the Java system property user.home is because that is the default location for your AVD images. This one line program will list the properties - public static void main(String[] args) { System.getProperties().list(System.out); } On Oct 29, 3:30 pm, Edo Noordhuizen edo.noordhui...@gmail.com wrote: I have ran all apps as administrator, this didn't solve my problem.. My guess is the problem has something to do with the user.home property, but I'm not sure.. Thanks, Edo On Thu, Oct 29, 2009 at 10:56 PM, Wayne Wenthin wa...@fuligin.com wrote: Run it with elevated permissions? It needs to write to the drive so you may need to run any install as administrator. Same with any command prompts. On Thu, Oct 29, 2009 at 12:21 PM, Edo Noordhuizen edo.noordhui...@gmail.com wrote: Hi, I have a problem getting the Android SDK to work on my new Windows 7 computer. The ADT plugin in Eclipse will not open, when I run SDK setup.exe I do get a window, but settings wont get saved, and the app disappears when I click 'New' in the virtual devices pane.. When I run android.bat from a command prompt I get the following error: ---snip--- Error: Unable to read AVDs Error: Unable to get the home directory. Make sure the user.home property is set up Error: Unable to get the home directory. Make sure the user.home property is set up com.android.prefs.AndroidLocation$AndroidLocationException: Unable to get the home directory. Make sure the user.home property is set up ---snip--- I have a dutch install of windows 7 where the users directory is named differently, and already tried to change the HOMEPATH, APPDATA,
[android-developers] Re: Anyone know what happened to Cyrket?
I believe Androidstats got their data by scraping (with an agreement with Jay no doubt) Cyrket, so they went down together. -John Coryat Radar Now! What Zip Code? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Stable contact identity CONTENT_LOOKUP_URI
Hi Richard, Lookup key is unique at any point in time. It's not unique over time. The anatomy of a lookup key is basically this. If an aggregate contact has three raw contacts with server-side IDs A, B and C, the lookup key will effectively be accountA/A.accountB/B.accountC/C We don't attempt to find a contact with that exact lookup key. We actually parse it, find all those three raw contacts and infer the id of the new contact ID, which will be the one containing the most of the original raw contacts. In other words, even though the result is a bit unpredictable, the user shouldn't be surprised by what they see. The original contact had A, B and C - now I am looking at something that has either A or B or C or a couple of those or maybe A,B,C and D. You are right that you should not use lookup keys to compare contact identities to each other. You can use the ContactsContract.Contacts.lookupContact(resolver, lookupUri) method, which will give you the current contact ID for your contact. Be careful though - between the moment you get it and the moment you use it the contact may change. Any kind of background sync could cause this change to happen. I would try to design the software in such a way that either doesn't need to do this type of resolution or uses something even more robust than lookup keys, e.g. raw contact IDs. I hope this helps, - Dmitri On Tue, Nov 3, 2009 at 6:40 AM, jarkman jark...@gmail.com wrote: Oh - one more question: Am I right in thinking that the lookup URI is not itself a unique, stable identifier ? That is, the lookup URI for one contact may be different at different times. Right now, we store some contact row IDs in a table, along with per- contact settings of our own. We use a WHERE clause on the contact ID to pull out the settings for a particular contact. If we store lookup URIs in the table, and want to find some current contact in that table, we cannot do it by comparing lookup URIs directly, because the lookup URI for the target contact may have changed since we wrote the table. If we want to compare two lookup URIs to see if they refer to the same person, we need to look them both up in the contacts table and see if they have the same record ID right now. Is that right ? Thanks, Richard On Nov 2, 5:32 pm, Dmitri Plotnikov dplotni...@google.com wrote: Hi Richard, You are exactly right. If you want a robust persistent reference to a contact, you now need to use the lookup URI. Android itself uses lookup URIs for shortcuts, Quick Contact etc. The main reason contact ID is volatile is that Android 2.0 has contact aggregation, both automatic and manual. Let's say your app stored a long ID of a contact. Then the user goes and manually joins the contact with some other contact. Now we have one contact where we used to have two - the stored long contact ID points nowhere. However, the lookup key is more resilient. It's a string concatenating identities of raw contacts. Using that string, we can still track down a contact as it is joined with others or separated from them. There are two options available to you: you can store just the lookup key, which is a string id of a contact, or you can use both the lookup and the long id of a contact. The latter will give you better performance, but functionally the long id is not required. I would take this approach: if you need to bulk-process contacts, maintain both ids. If your app works with a single contact per user action - you don't need to bother with the long id. I hope this helps, - Dmitri On Mon, Nov 2, 2009 at 9:02 AM, jarkman jark...@gmail.com wrote: In the course of moving to the 2.0 cotnact APIs, I've stumbled across CONTENT_LOOKUP_URI : http://developer.android.com/reference/android/provider/ContactsContr. .. As long as the contact's row ID remains the same, this URI is equivalent to CONTENT_URI. If the contact's row ID changes as a result of a sync or aggregation, this URI will look up the contact using indirect information Currently, we store contact IDs to identify particular contacts. If I read this right, contact IDs will no longer be stable in the world of 2.0, and we will need to store a lookup URI (or at least a LOOKUP_KEY and a row ID) in order to identify a contact in a stable way. That would be a substantial change in our code. So, before I rush off to do it, I'd love to find out if a contact row ID change is going to be a routine thing (say, on every sync), or if it will be a very rare thing (say, when two contacts are manually combined into one, or some even rarer exception). Any clues ? Thanks, Richard -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
Re: [android-developers] Re: Keyboard, detect ALT Locked
vovkab wrote: Any examples on how to detect locked state (shift or alt)? You did not read Ms. Hackborn's response. I'll reprint the relevant passage here: Again, there is no lock state in general -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Rotate Activity screen
help me pls -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 know if it the emulator or device
if (1.equals(android.os.SystemProperties.get(ro.kernel.qemu))) { // Run in Emulator } On Nov 4, 9:21 am, Emmanuel emmanuel.ast...@gmail.com wrote: On Nov 3, 2:29 pm, Zhihong GUO gzhh...@gmail.com wrote: Hi all, How to know if the application is running on emulator or on a real device? I want to implement a function to detect wifi connection. If the application is running on emulator, just skip the wifi detection, while on real device, the wifi connection check should be done. how to do that? Thank a lot, James Alternatively, you can check the phone model variable: PhoneModel = android.os.Build.MODEL; On my G1 phone, it gives me HTC DREAM For the emulator, it gives sdk. I don't know what method is preferred by google, but it feels more secure to me than using the ANDROID_ID var... Emmanuelhttp://androidblogger.blogspot.com/http://www.alocaly.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] ProgressDialog went back to the first view called it when dismiss()
Hi, I have a weird problem on progress dialog: I have 2 views: Login View and say, Display View. In Login View, when I click the 'Login' button, a progress dialog is created (new ProgressDialog(...)), shown and stored in a variable 'mProgressDialog'. After login, the dialog is dismissed and some information are displayed in Display View (Login View hides). Now I want to display another progress dialog when 'Update' button is clicked and when the update is done, dismiss the dialog and display new information. So I use: mProgressDialog = new ProgressDialog(...); to create a new progress dialog with new title and message. Show. Now the weird thing happens when the new dialog dismisses. The program flashes the Display View for a blink and then shows the Login View I tried to change the view etc. but same problem happens over and over again. So I am thinking it might because one activity can only be assigned to ONE progress dialog and no matter how you re-create it you still get the same progress dialog. And the dialog is linked to a certain view which will be shown automatically when the dialog dismisses. Please tell me I am 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: Broken Emulator after new update?
I can actually see that I changed to GSM Speed on the phone but the actual speed is not set on the emulator :( Anyone help? On Nov 2, 9:40 pm, Moto medicalsou...@gmail.com wrote: I've tried the following using an emulator with the 2.0 and 1.6 target and still same results! I'm currently trying to change the Telephony status via eclipse to test how my application behaves on bad network speeds and dropped connections. But after the last updates to the SDK, now this settings are not working! I set Data and or Voice to denied and my application is still downloading content... Why is this? I tried setting the connection to a lower connection type and my app is still downloading very fast no change! I tried making a call to the emulator and that works... I'm getting very frustrated! Could someone help me out? Thanks! -Moto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Timepicker appearances, the disabled state is ugly
My application has a timepicker widget smack dab in the middle of the screen. In certain conditions, the widget must be disabled. Have you seen that? The default disabled timepicker widget is rather unattractive. Has anyone been able to make it look a little better? I could not find any built-in methods that would help. If you have suggestions for dealing with it, please let me know. Regards, Beth -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App name/icon problems on Hero after reboot
This isn't good, fragmentation of the Android platform is already underway. It seems to be a fundamental problem with this build's handling of an application's resource bundle after soft reset. Images, layout XMLs, strings XMLs, etc, all become jumbled up, rendering your application useless. If there is a workaround, it would be nice to know. On Nov 3, 3:01 pm, Justin Giles jtgi...@gmail.com wrote: I got a similar brush off response from HTC just now. Also claiming to not be able to replicate the problem. I forwarded them links to 3 different forums that I have been following where several people have been able to replicate the problem. I don't expect any fix or recognition of a problem from HTC any time soon. My first taste of an HTC phone and I'm already regretting it. On Tue, Nov 3, 2009 at 1:58 PM, gdonald gdon...@gmail.com wrote: On Oct 29, 12:58 pm, Dianne Hackborn hack...@android.com wrote: If this is only happening on Hero, it needs to be reported to HTC, not as a generic platform bug. I reported the issue to HTC and they said they couldn't reproduce it, didn't ask me a firmware version or anything. See their response below. So Diane is saying this is not a generic Android platform bug because it's only on HTC Heros, and then HTC is denying the bug exists even though many people in this very thread say they are experiencing it and can reproduce it. This really pisses me off. Whose bug is this? How is it ever going to get fixed? I guess I'm going back to Apple/iPhone development. If this is how open Android development works, I'm out. Dear Greg Donald, The HTC Customer Service Representative that has been handling your message would like to know if your question has been successfully answered. You can reply to or close your question by visiting: http://ContactUs.htc.com/wFrmMailLogin.aspx Ticket Number : [ 09USCW44ENA001067 ] If you do not respond to or close your question within 15 days, it will be closed automatically. Sincerely, HTC We are unable to receive replies to this email account. Please visit us atwww.htc.comif you have any questions or need further assistance. New Response From [ Alvin (NA Team) ] Greg, Thank you for taking the time to contact HTC America Technical Support via E-Mail with your inquiry about a reported bug on code.google.com. My name is A.J. and I will be happy to assist you today. First, let me apologize for the extreme delay in response to your original inquiry. HTC has recently released a plethora of new devices in several markets as well as software updates for several of our current models. The response to these devices and OS updates has been overwhelming but we are working diligently to provide the best support possible for our customers. Thank you for your patience. I have tested this on 2 of our Sprint HTC Heroes and one European model. I was unable to replicate the issue on any of the device. HTC does not offer any technical assistance for the Android Market or applications downloaded from the market. I suggest you contact the individual vendors for support or Google. I apologize for any inconvenience this may cause you. Greg, if you have any future questions about your device please feel free to visitwww.htc.comand send us another e-mail. You may also enjoywww.htcwiki.com, our customer-based forum, which has a plethora of information on HTC devices. I would also like to invite you to participate in a customer satisfaction survey located at http://survey.htc.com/worldwide/. I hope you have a great day! HTC America Technical Support A.J. Customer Information Name Greg Donald Telephone 615-838-7503 Email Address gdon...@gmail.com Country United States Inquiry Information Inquiry Type Technical Support Inquiry Description Please see the bug report here: http://code.google.com/p/android/issues/detail?id=4419 Issue Date Time 2009/11/04 02:38 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Does DexClassLoader works correctly?
On Nov 1, 3:54 am, mongd mongdl...@gmail.com wrote: So, do you mean if I use a different path for the 2nd parameter, DexClassLoader should work properly, right? How about data/app-private? Is it ok to use that path? I tried the above one, but it didn't work... T^T /data/app-private is: drwxrwx--x system system2009-11-03 10:18 app-private so no, that won't work. You need your application's own data area, e.g. /data/data/com.mything.wahoo/. I believe you can get the directory from the context object. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Documentation deficiencies.
Hi, this has been noted by many people previously, but I thought I'd have a little rant about it. Simply put, the Android SDK documentation is shockingly incomplete. I can't believe Google doesn't have the resources to employ someone full-time to work on it. Here are just a few examples: 1. You need to call ItemizedOverlay.populate() even if you have added no items. This is mentioned no-where, and I've even seen people create crazy work-arounds because they didn't know it. 2. populate() isn't explained at all well. Let's compare a few function descriptions with what *I* would write: ItemizedOverlay intro, current version: A base class for an Overlay which consists of a list of OverlayItems. This handles sorting north-to-south for drawing, creating span bounds, drawing a marker for each point, and maintaining a focused item. It also matches screen-taps to items, and dispatches Focus-change events to an optional listener. My version: ItemizedOverlay is an Overlay that allows you to easily draw small collections of [OverlayItem]s on top of the map. Typically the items will be some kind of pin or marker. A default [Drawable] to use can be passed to the constructor, and individual [OverlayItem]s can have specific [Drawable]s. This class handles sorting the items north-to-south so that the overlap as expected, and drawing a marker for each point. It also maintains a focused item, matches screen-taps to items, and dispatches Focus-change events to an optional listener. Typically it is subclassed and used as described below. See the documentation for populate() and createItem() for further information on how to specify the [OverlayItem]s. then I would give an example of deriving a simple class from ItemizedOverlay, but I'm not paid to write this so meh ItemizedOverlay.populate(), current version: Utility method to perform all processing on a new ItemizedOverlay. Subclasses provide Items through the createItem(int) method. The subclass should call this as soon as it has data [note that this is *wrong*!], before anything else gets called. My version: ItemizedOverlay maintains an internal cache of [OverlayItem]s in order to draw them efficiently. This function must be called in order to populate the internal cache. Note that it must be called before the draw() method is even if you have added no items. When it is called it first uses ItemizedOverlay.size() to determine how many [OverlayItem]s there are to draw. You must override this method in your subclass. Once the number of items has been determined it calls ItemizedOverlay.createItem(int i) for i=0 to size() in order to retrieve each [OverlayItem]. These items are then sorted from north to south to facilitate drawing. Whenever you change the items to be drawn you must call populate() in order to update the cache. Actually I've just noted that that description isn't quite true and has caused a bug in my program - size() is apparently only ever called once. This is pretty stupid but hey, my point stands. 3. At http://developmentality.net/ there is a note about how setMarker() doesn't work unless you set the bounds on the drawable. This should clearly be mentioned in the documentation. 4. fill_parent, wrap_content, gravity and so on aren't adequately explained *at all*. 5. Not a documentation issue, but boundCenterBottom() should be really be public. 6. I strongly encourage you to look at the documentatio for ProgressDialog. It is truly shocking: http://developer.android.com/reference/android/app/ProgressDialog.html#getMax() I know there are a lot of classes, but *really*. 7. There are so many classes where the documentation is the type that I would write *to myself* as I was writing the code. e.g. Bundle is described as A mapping from String values to various Parcelable types.. That's it. Helpful. This mailing list is clearly too high volume for anyone from Google to read, but I feel better for having ranted. Back me up here people. :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Poll Screen On/Off state
You can't poll screen on/off state. The best you can do is to register a BroadcastReceiver, and wait for an Intent to come along. Until that first Intent is received, you'll have no idea what the screen state is. On Nov 3, 6:28 pm, Mark Murphy mmur...@commonsware.com wrote: gudujarlson wrote: I have an app that runs in the background indefinitely provided there is work to be done. I want the app to go to sleep if there is no work to be done and the user is idle. What does the user being idle have to do with anything here? If there is no work to be done, there is no work to be done, so stop your service and wake it up after some time to see if there is new work to be done. What am I to do? Don't worry about user idleness. Just stop your service and get it out of RAM when you have no work to do. Restart the service after a period of time, or based on some other event trigger, to see if there is new work to do. In general, I find the lack of support for polling system state properties (e.g. screen state, power state, signal strength) in Android to be annoying. It's cool that one can listen for changes in system state rather than constantly polling for them, but one still needs to know the current state of the property at the time the listener is registered. Am I missing something fundamental? Power is available on demand via a sticky Intent. WiFi signal strength is available on demand via WifiManager. GSM/CDMA signal strength is available on demand from TelephonyManager. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010:http://bignerdranch.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: App upgrade (with zipalign) causes force closes/disappearing of app icon
On Nov 3, 11:44 am, Rafael Sanches ra...@users.sourceforge.net wrote: what happens with my app is that when a update or a install occurs I see the icon. When i restart my htc hero the app icon disappears. But it happens only after the restart. Does this happen on anything other than the HTC Hero? The emulator or any other device? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: java.lang.OutOfMemoryError after orientation changed
On Oct 30, 12:23 pm, Sekar shake...@yahoo.com wrote: 10-30 14:59:50.841: INFO/dalvikvm-heap(23490): Forcing collection of SoftReferences for 134217760-byte allocation Curiously, 134217760 is 0x0820. Something went wrong in here. The original poster's allocation was 0x0A24, also suspiciously round. Is this easily repeatable? If so, can you file a bug on b.android.com and attach the APK to the bug report? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add file .sqlite extension to our project
(I'm reposting this response because I think I accidentally replied only to the original author.) Archana, So you have a pre-populated database that you'd like included with the application upon installation? I'm not sure what the preferred solution is for this, but it might be possible to accomplish this via a raw resource. In general, a raw resource is a file that can be bundled with your application and accessed via: R.raw.* See: http://developer.android.com/guide/topics/resources/resources-i18n.html I assume that you've already gotten SQLite to work in general. If not, I highly suggest the Notepad tutorial, which is a great primer: http://developer.android.com/guide/tutorials/notepad/index.html Hope this helps! -- PJ On Nov 3, 6:55 am, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please help. On Nov 3, 6:55 am, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please 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] Poll Screen On/Off state
I have an app that runs in the background indefinitely provided there is work to be done. I want the app to go to sleep if there is no work to be done and the user is idle. The second part has me stumped. On Windows Mobile I was able to poll the power state to determine user idleness. On BlackBerry I was able to poll the device idle time. However, there does not appear to be a way to determine user idleness on Android. Instead of polling for user idleness directly, I thought I might be able to use the on/off state of the screen. There are 2 intents ACTION_SCREEN_OFF and ACTION_SCREEN_ON and I was able to setup a listener for these (BroadcastReceiver). The problem is that I do not know how to determine the current state of the screen at the time I register the listener, therefore I have to wait until the next screen on/off change to know anything. The docs speak of some intents that are sticky and thus will allow the current state to be determined, but the screen events do not appear to have that property. What am I to do? In general, I find the lack of support for polling system state properties (e.g. screen state, power state, signal strength) in Android to be annoying. It's cool that one can listen for changes in system state rather than constantly polling for them, but one still needs to know the current state of the property at the time the listener is registered. Am I missing something fundamental? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Using MediaPlayer best practices?
What is the best way to use the MediaPlayer when needed multiple times? Reuse the instantiated MediaPlayer throughout the session? Or constantly stop() release() and instantiate a new MediaPlayer() ? If I reuse I'm afraid the player could be in a bad state? What about performance wise? what's better? reuse or renew? Note: This is for using as a music player so one audio be present at one given time... Thank! -Moto! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: native camera access
On Nov 3, 8:58 am, Girish htgir...@gmail.com wrote: In my application i want to pass the camera data to native layer. what is the best possible approach for doing the same. I know it can be done 2 ways. 1.start the camera in application and pass the preview data to native layer. But i feel this may consume lot of resources. This is the only 'supported' way. Apparently there is a bug with the camera callback that creates a new massive object for every frame. Since java is shite and garbage collected this slows this way down even before you copy all the data through JNI. 2.Start the camera directly in native layer and use it. So JNI will come less into picture. and not much resource loading also.But dont want to take any risk by using the lower layer code which may change in future. Yeah this would be ideal, but not supported yet, if ever. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Poll Screen On/Off state
gudujarlson wrote: What I want to prevent is draining the user's battery when they go inside where there is no GPS signal and forget to turn off the app. Monitor the ACTION_SCREEN_OFF and ACTION_SCREEN_ON Intents, then. If your application starts based on a user action, then you know the screen is on at that point -- you don't need an API for that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ProgressDialog went back to the first view called it when dismiss()
Guess I need to move to AsyncTask asap... No I don't have onDismiss handler, I assume when the dialog dismisses what ever was displaying on the screen will not be changed... On Nov 3, 5:58 pm, Jason Proctor jason.android.li...@gmail.com wrote: do you have an onDismiss handler for the progress dialog? i used to use Handlers, now i use AsyncTask. i'd never go back :-) the show() and dismiss() of the dialog, even the new ProgressDialog() are all inside Handler message processing codes. I don't think I need to user AsyncTask here even it is very useful. Basically the Handler receives data, updates the UI and dismisses the dialog. Then Bang! the Login View shows up. On Nov 3, 5:45 pm, Jason Proctor jason.android.li...@gmail.com wrote: what does your code do when the asynchronous operation is complete? do you register an onDismiss() for the ProgressDialog? seriously though i would advise anyone doing anything with threads and progress dialogs to use AsyncTask. this wonderful class decouples the task from the caller and has nice hooks to do things like manage ProgressDialogs. and everything happens in the right thread automagically. adopt AsyncTask, see all problems like this go away. Hi, I have a weird problem on progress dialog: I have 2 views: Login View and say, Display View. In Login View, when I click the 'Login' button, a progress dialog is created (new ProgressDialog(...)), shown and stored in a variable 'mProgressDialog'. After login, the dialog is dismissed and some information are displayed in Display View (Login View hides). Now I want to display another progress dialog when 'Update' button is clicked and when the update is done, dismiss the dialog and display new information. So I use: mProgressDialog = new ProgressDialog(...); to create a new progress dialog with new title and message. Show. Now the weird thing happens when the new dialog dismisses. The program flashes the Display View for a blink and then shows the Login View I tried to change the view etc. but same problem happens over and over again. So I am thinking it might because one activity can only be assigned to ONE progress dialog and no matter how you re-create it you still get the same progress dialog. And the dialog is linked to a certain view which will be shown automatically when the dialog dismisses. Please tell me I am 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 -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Documentation deficiencies.
On Tue, Nov 3, 2009 at 4:20 PM, Tim Hutt tdh...@gmail.com wrote: Hi, this has been noted by many people previously, but I thought I'd have a little rant about it. Simply put, the Android SDK documentation is shockingly incomplete. I agree, the Android API docs are horribly inadequate. Why aren't there examples _with the docs_? I don't want to go digging through some random apps hoping to find an example of what I need. I want to see practical examples on the same page with the docs. With their 30% take on all our app sales, you'd think they would want us to be able to figure stuff out easier. Last night I wasted two hours beating my head against the wall trying to figure out why a market:// url wouldn't work in the emulator. I finally figured it out when I tried it on my phone and it worked. That's when I realized the emulator doesn't have a marketplace app and obviously doesn't understand market:// urls. -- Greg Donald http://destiney.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] dummy Binder/C++ service
I wrote a dummy HelloWorld service and client. It uses Binder for IPC. For some this is likely duh, but it did take me several days of puzzling to work things out. I think some of the problem is that there is some dead code in IMediaPlayerClient.cpp, which I was using as my guide. I'm convinced that it should be possible to see the services from Java Binder/ServiceManager code, and avoid a layer of JNI (and thus an NDK invocation) between a Java application and a C++ service, but I didn't manage that. The bird droppings in the src/org/credil/...*.java are my attempts, ignore them, or better yet, fix them. Push the three pieces generated: libhelloworldservice.so (to /system/lib), and helloworldservice, and helloworldclient to /data. adb shell cd /data ./helloworldservice ./helloworldclient I hope that this code will help others from scratching their head a lot. https://review.source.android.com/#change,12454 is one suggestion I have to make other writers of code like this easier. Probably I'm posting to the wrong mailing list, sorry. I can not keep up with these mailing lists. My code is at: http://github.com/mcr/Android-HelloWorldService -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 know if it the emulator or device
Furthermore the API call (WifiManager)mContext.getSystemService(mWifiService); gives you an exception on the Emulator which is an indication that Wifi radio is not supported. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Nov 3, 5:40 am, sham shamcs shamc...@gmail.com wrote: In Linux ,use *adb devices* command to see which one is running. On Tue, Nov 3, 2009 at 6:59 PM, Zhihong GUO gzhh...@gmail.com wrote: Hi all, How to know if the application is running on emulator or on a real device? I want to implement a function to detect wifi connection. If the application is running on emulator, just skip the wifi detection, while on real device, the wifi connection check should be done. how to do that? Thank a lot, James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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: Advice Needed on Application Approach
I'm not sure it is published in the SDK. There was a round of simplication of the telephony APIs right before release to have what was published in a state that could be maintained, and I think that may have involved hiding the way these updates are sent. On Tue, Nov 3, 2009 at 11:03 AM, Mark Murphy mmur...@commonsware.comwrote: Dianne Hackborn wrote: It is a sticky broadcast so you receive the last published value. It is? What's the Intent action for this? I'd really rather steer people to use Intents for call state monitoring, but I don't know how that's done. Any pointers? Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.6 Programming 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: [Android-developers] Display APIs in Android?
You can directly draw onto surface bound with canvas passed in in your draw handler. You don't have to always first draw into bitmap then copy from bitmap to surface. In fact, no matter what strategy you use you have not really drawn onto screen framebuffer directly, the last action is composing done by surfaceflinger service which sit in native layer but it only export limited method you can access. I think directly accessing /dev/ graphics/fb0 is not recommand by android platform. On Nov 4, 12:35 am, Latha Shivanna latha...@gmail.com wrote: I need some 2D apis. can anybody suggest something? Are there any ways to display a buffer on screen in native layer? I am aware of using some ioctl calls on /dev/graphics/fb0.(But it needs root access) Please do advise. -Latha On Tue, Nov 3, 2009 at 7:12 PM, sham shamcs shamc...@gmail.com wrote: you can use opengl also On Tue, Nov 3, 2009 at 5:54 PM, Latha Shivanna latha...@gmail.com wrote: Hii All Can anybody please tell me how can we display a buffer on screen? Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap(). Is there any other way of doing this in Java layer? Please do share your thoughts. thanks in advance Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Documentation deficiencies.
Greg Donald wrote: With their 30% take on all our app sales, you'd think they would want us to be able to figure stuff out easier. Google does not get a 30% take on all our app sales -- that goes to the carriers. http://android-developers.blogspot.com/2008/10/android-market-now-available-for-users.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010: http://bignerdranch.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: java.lang.OutOfMemoryError after orientation changed
When an orientation occurs, your activity is being destroyed, and a new instance is created. The problem is that some references are still kept in memory. Some useful resources to read: Avoiding memory leaks (http://android- developers.blogspot.com/2009/01/avoiding-memory-leaks.html) and Faster screen orientation change (http://android- developers.blogspot.com/2009/02/faster-screen-orientation- change.html). I had similar issues when loading bitmaps, and screen orientation changes would through an out of memory error almost every time at some point. The above links helped in solving the issue. Mihai Fonoage On Nov 3, 4:45 pm, fadden fad...@android.com wrote: On Oct 30, 12:23 pm, Sekar shake...@yahoo.com wrote: 10-30 14:59:50.841: INFO/dalvikvm-heap(23490): Forcing collection of SoftReferences for 134217760-byte allocation Curiously, 134217760 is 0x0820. Something went wrong in here. The original poster's allocation was 0x0A24, also suspiciously round. Is this easily repeatable? If so, can you file a bug on b.android.com and attach the APK to the bug report? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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-developers] Display APIs in Android?
You can directly draw onto surface bound with canvas passed in in your draw handler. You don't have to always first draw into bitmap then copy from bitmap to surface. In fact, no matter what strategy you use you have not really drawn onto screen framebuffer directly, the last action is composing done by surfaceflinger service which sit in native layer but it only export limited method you can access. I think directly accessing /dev/ graphics/fb0 is not recommand by android platform. On Nov 4, 12:35 am, Latha Shivanna latha...@gmail.com wrote: I need some 2D apis. can anybody suggest something? Are there any ways to display a buffer on screen in native layer? I am aware of using some ioctl calls on /dev/graphics/fb0.(But it needs root access) Please do advise. -Latha On Tue, Nov 3, 2009 at 7:12 PM, sham shamcs shamc...@gmail.com wrote: you can use opengl also On Tue, Nov 3, 2009 at 5:54 PM, Latha Shivanna latha...@gmail.com wrote: Hii All Can anybody please tell me how can we display a buffer on screen? Currently I create a bitmap using Bitmap's CreateBitmap() and render it on screen using canvas' drawBitmap(). Is there any other way of doing this in Java layer? Please do share your thoughts. thanks in advance Latha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ListActivity and SQLiteDB problem - can't refresh list
Well, you get 100 cool points for knowing that you should use AsyncTask, to let the query run in the background. It seems odd that the list populating makes the UI stuck for a while. Can you give us an estimate of how many rows and columns are in your list, and how long the UI is stuck while it's being populated? -- PJ On Oct 29, 4:11 am, Hilly hi...@labpixies.com wrote: Hi, It will be great if someone here will know how to help me with the issue bellow. What is the best way to display a database queries results on the screen using ListActivity? I need the db queries to run in the background and I also need to be able to make different queries and refresh the screen according to the query result. I am using the ListActivity class with a SimpleCursorAdapter in order to display the db queries result on the screen. At the moment, I am doing the db queries at the background using AsyncTask, when getting the results I want the list to be updated immediately, but I can't find a good way to do it. It worked only when I used the changeCursor(cursor) function to set the adapter to a new cursor with the new results. But I don't think this is a good solution since it seems to stuck the UI for a while. I also found some posts about notifyDataSetChanged() but I am not sure if/how/when I should be using it with a SimpleCursorAdapter to make the view refresh. Can anyone tell what I am doing wrong? Or give a code example or link to something like this that works? Thanks! Hilly -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Advice Needed on Application Approach
Dianne Hackborn wrote: It is a sticky broadcast so you receive the last published value. It is? What's the Intent action for this? I'd really rather steer people to use Intents for call state monitoring, but I don't know how that's done. Any pointers? Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.6 Programming 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] Re: Advice Needed on Application Approach
Dianne Hackborn wrote: I'm not sure it is published in the SDK. There was a round of simplication of the telephony APIs right before release to have what was published in a state that could be maintained, and I think that may have involved hiding the way these updates are sent. Dagnabbit. I had hopes for getting rid of another reason for people to try creating everlasting services. Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.6 Programming 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] Problem running a compiled/packaged-with-v1.6 application on v1.5
Hi Guys, I have an application which is based Android 1.5 but for enabling different screen types support I have to compile and package it with v1.6. When I install and run the resulted APK on my 1.5 emulator, everything works fine except that Preferences activity crashes every time I launch it! When I revert back my API dependency to 1.5 and remove a few 1.6 specific config blocks from AndroidManifest.xml and compile/package it with 1.5, everything works just fine!! Below is the exception I get when it crashes. I will highly appreciate any help on this: D/AndroidRuntime( 985): Shutting down VM W/dalvikvm( 985): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) E/AndroidRuntime( 985): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 985): java.lang.RuntimeException: Binary XML file line #18: You must supply a layout_width attribute. E/AndroidRuntime( 985):at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:438) E/AndroidRuntime( 985):at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3319) E/AndroidRuntime( 985):at android.view.ViewGroup$LayoutParams.init(ViewGroup.java:3274) E/AndroidRuntime( 985):at android.widget.AbsListView$LayoutParams.init(AbsListView.java:3242) E/AndroidRuntime( 985):at android.widget.AbsListView.generateLayoutParams(AbsListView.java:3123) E/AndroidRuntime( 985):at android.widget.AbsListView.generateLayoutParams(AbsListView.java:69) E/AndroidRuntime( 985):at android.view.LayoutInflater.inflate(LayoutInflater.java:395) E/AndroidRuntime( 985):at android.view.LayoutInflater.inflate(LayoutInflater.java:320) E/AndroidRuntime( 985):at android.preference.Preference.onCreateView(Preference.java:412) E/AndroidRuntime( 985):at android.preference.Preference.getView(Preference.java:389) E/AndroidRuntime( 985):at android.preference.PreferenceGroupAdapter.getView(PreferenceGroupAdapter.jav a:187) E/AndroidRuntime( 985):at android.widget.AbsListView.obtainView(AbsListView.java:1269) E/AndroidRuntime( 985):at android.widget.ListView.makeAndAddView(ListView.java:1623) E/AndroidRuntime( 985):at android.widget.ListView.fillDown(ListView.java:607) E/AndroidRuntime( 985):at android.widget.ListView.fillFromTop(ListView.java:664) E/AndroidRuntime( 985):at android.widget.ListView.layoutChildren(ListView.java:1481) E/AndroidRuntime( 985):at android.widget.AbsListView.onLayout(AbsListView.java:1113) E/AndroidRuntime( 985):at android.view.View.layout(View.java:6133) E/AndroidRuntime( 985):at android.widget.FrameLayout.onLayout(FrameLayout.java:333) E/AndroidRuntime( 985):at android.view.View.layout(View.java:6133) E/AndroidRuntime( 985):at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) E/AndroidRuntime( 985):at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998) E/AndroidRuntime( 985):at android.widget.LinearLayout.onLayout(LinearLayout.java:918) E/AndroidRuntime( 985):at android.view.View.layout(View.java:6133) E/AndroidRuntime( 985):at android.widget.FrameLayout.onLayout(FrameLayout.java:333) E/AndroidRuntime( 985):at android.view.View.layout(View.java:6133) E/AndroidRuntime( 985):at android.view.ViewRoot.performTraversals(ViewRoot.java:929) E/AndroidRuntime( 985):at android.view.ViewRoot.handleMessage(ViewRoot.java:1482) E/AndroidRuntime( 985):at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 985):at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 985):at android.app.ActivityThread.main(ActivityThread.java:3948) E/AndroidRuntime( 985):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 985):at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 985):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:7 82) E/AndroidRuntime( 985):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) E/AndroidRuntime( 985):at dalvik.system.NativeStart.main(Native Method) Best Regards, Armond -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] AVD with a custom resolution
I created a new AVD in Eclipse for Eclair with a custom skin resolution or 1024x600 (called BigEclair). When I run apps on it the AVD crashes. [2009-11-03 11:54:47 - Timer]Android Launch! [2009-11-03 11:54:47 - Timer]adb is running normally. [2009-11-03 11:54:47 - Timer]Performing com.icd.timer.TimerActivity activity launch [2009-11-03 11:54:47 - Timer]Automatic Target Mode: Preferred AVD 'BigEclair' is available on emulator 'emulator-5554' [2009-11-03 11:54:47 - Timer]Uploading Timer.apk onto device 'emulator-5554' [2009-11-03 11:54:47 - Timer]Failed to upload Timer.apk on device 'emulator-5554' [2009-11-03 11:54:47 - Timer]java.io.IOException: Unable to open sync connection! [2009-11-03 11:54:47 - Timer]Launch canceled! The app runs fine in the built-in resolutions. I there something else that I need to do to make an emulator with a custom resolution? 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] Question regarding com.google.android.photostream.GridLayout
Hi, I have tried to extend the GridLayout class (http://code.google.com/p/ apps-for-android/source/browse/trunk/Photostream/src/com/google/ android/photostream/GridLayout.java) so as to make it scrollable, but with no success. In this regard, I tried initializing the scrollbars inside the GridLayout constructor but I get an unsupported operation exception saying Can't convert to dimension: type=0x10. In addition, in the xml layout file that uses the GridLayout class, I tried placing the FrameLayout (which has the GridLayout) inside a ScrollView but that causes the GridLayout cannot have UNSPECIFIED dimensions error message to be shown. I initially was using a GridView with an adapter, but I never got it to work 'smoothly'. When I changed the code and tried to use the addView(View view) method, the method is not supported, since it is encouraged the use of an adapter. Has anybody used the GridLayout class successfully with scrolling capabilities, or know how to implement them? Many thanks, Mihai Fonoage -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Setting RFCOMM/SPP Bluetooth Baud rate
On Thu, Oct 29, 2009 at 12:23 PM, Aakash Patel aakashbpa...@gmail.com wrote: Hello, I am making an app that utilizes the BlutoothSocket API and am trying to create a serial connection over Bluetooth with RFCOMM/SPP profile. I do not see how I set the baud rate for the connection, how would I set it? You cannot set the SPP baud rate with the current API. Thanks, Aakash Patel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~--- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is Orientation Sensor a Phyiscal Sensor Different from the Accelerometer?
On second though it probably takes into account whether they keyboard is open on phones that have them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Eclipse Layout Editor Not Showing
This happened to me too. Thanks! On Oct 29, 6:40 pm, Open ldonel...@gmail.com wrote: Figured it out myself. I had to specify the Android Layout Editor as the default for Android XML files under Preferences - General- Editors-File Associations. On Oct 29, 7:33 pm, Open ldonel...@gmail.com wrote: Relative noob working with Eclipse and Android. I just switched from Windows XP to Mac (Snow Leopard) and I'm having a little trouble getting Eclipse up and running the way I like it. I installed the Android Mac SDK, but my layout editor isn't showing me a preview of the activity layout, it's just showing me the XML tree, even when I'm on thedesigntab. Is there something I need to do to enable the layout editor in eclipse? Here's a screen grab:http://bit.ly/3PRzYA Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to get the size of folder/directory?
why not use busybox du and get the result? it not need the root privilege. On Nov 3, 1:08 am, Sharjeel Ahmed shar...@gmail.com wrote: I'm storing data on SDCard and want to get the size/length in bytes of all the files in my main folder and sub folders. How can I calculate the length? Is there any other way to calculate other than open every file and get File.length(). length function returns 0 on directories. - Sharjeel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Provide a database packaged with the .APK file or host it separately on a website?
I've seen 3-4 different people ask some variation of this question in these forums. It seems like a very common question/need. I'd like to see this specific topic addressed in part of the Dev Guide, with various uses cases and proper solutions. Pankaj, regarding your specific application: Approach 2 sounds more sensible because the application is decoupled from the data. You could change the data without affecting the application, and vice versa. You could even take this modular approach a step further and allow installation of pluggable, multiple databases. For example, maybe db1 has Bible verses, db2 has Chinese fortunes, db3 has funny movie quotes, etc. People could choose to install only the database(s) that they care about. (With approach 1, you would have to include all databases in the apk file, which could become cumbersome.) My two cents. :) -- PJ On Oct 29, 1:34 am, Pankaj Godbole [Andruid] panka...@gmail.com wrote: Here is some background about my app: I am developing an Android app that will display a random quote or verse to the user. For this I am using an SQLite database. The size of the DB would be approximately 5K to 10K records, possibly increasing to upto 1M in later versions as new quotes and verses are added. Thus the user would need to update the DB as and when newer versions are of the app or DB are released. After reading through some forums online, there seem to be two feasible ways I could provide the DB: 1. Bundle it along with the .APK file of the app, or 2. Upload it to my app's website from where users will have to download it I want to know which method would be better (if there is yet another approach other than these, please do let me know). After pondering this problem for some time, I have these thoughts regarding the above approaches: Approach 1: Users will obtain the DB along with the app, and won't have to download it separately. Installation would thereby be easier. But, users will have to reinstall the app every time there is a new version of the DB. Also, if the DB is large, it will make the installable too cumbersome. Approach 2: Users will have to download the full DB from the website (although I can provide a small, sample version of the DB via Approach 1). But, the installer will be simpler and smaller in size. Also, I would be able to provide future versions of the DB easily for those who might not want newer versions of the app. Could you please tell me from a technical and an administrative standpoint which approach would be the better one and why? If there is a third or fourth approach better than either of these, please let me know. Thank you! Pankaj Godbole Andruid -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Booting Android on Samsung Star
Yes please, lets try to find something to help us here, I'm also planning to try the android on a 10K phone with large touch screen, android phones releasing in india are way too costly. there are posts on the net of doing this in htc windows mobile phones, not sure how that will help here. Also anyidea what processor and internal memory star has. On Oct 20, 3:10 pm, Simon Paton simon.paton...@gmail.com wrote: And me too. Hopefully getting my Star this week and would like to give Andriod a go in the future- if it's possible. On Oct 13, 8:55 pm, Kashish Dhanjani kashi...@gmail.com wrote: Sounds awesome, please let me know if you meet with success. On Oct 4, 9:13 am, pushkal sharma pushkalsharm...@gmail.com wrote: I reacently boughtSamsungStar.I am planning to boot Android on SamsungStar.I wanted to know is it possible to boot Android on SamsungStar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Poll Screen On/Off state
What does the user being idle have to do with anything here? If there is no work to be done, there is no work to be done, so stop your service and wake it up after some time to see if there is new work to be done. Well, I simplified the situation in an attempt to make my post succinct. The app runs in the background and records information including the device's location, but it also has a user interface. What I want to prevent is draining the user's battery when they go inside where there is no GPS signal and forget to turn off the app. There is no point in running when there is no GPS fix and the user is not watching the display. However, if the user is interacting with the app, I want it to continue to run regardless of the lack of a GPS fix, because useful information is still displayed and that information requires continuous background processing. Power is available on demand via a sticky Intent. The power state information that would be useful is not available as far as I know. Windows Mobile has different power states such as ON, OFF, and USERIDLE. I have not found the equivalent in Android. WiFi signal strength is available on demand via WifiManager. I don't need this currently. GSM/CDMA signal strength is available on demand from TelephonyManager. As far as I know, you cannot poll for signal strength and the event is only triggered when the signal strength changes by quite a large amount. Additionally. the event stops being raised when the screen turns off. There is a poll function in the service (I looked through the source), but it is not exposed in the SDK. There is a open feature request related to 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] Re: native camera access
Tim wrote: On Nov 3, 8:58 am, Girish htgir...@gmail.com wrote: In my application i want to pass the camera data to native layer. what is the best possible approach for doing the same. I know it can be done 2 ways. 1.start the camera in application and pass the preview data to native layer. But i feel this may consume lot of resources. This is the only 'supported' way. Apparently there is a bug with the camera callback that creates a new massive object for every frame. Since java is shite and garbage collected this slows this way down even before you copy all the data through JNI. Well, it's not a bug, it's just how Java works. It certainly does suck. 2.Start the camera directly in native layer and use it. So JNI will come less into picture. and not much resource loading also.But dont want to take any risk by using the lower layer code which may change in future. Yeah this would be ideal, but not supported yet, if ever. We tried to get opencore to do this for us, and we failed. We never even got opencore's extensive debugging to turn on while trying to figure out how things work, and after some person-weeks of effort, we understood enough about opencore that we can use it as a library, but not via MediaService. We are now writing our own service that opens the camera hardware directly, and runs as a service. I do not think a lot of things will happen to this layer, except that it will not be available anymore. We tried to chmod the camera devices so that it could be a non-root service, but there is more to it than that, so for now, it's a root service. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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:
Try this. Disable your anti-virus application when installing docs. I made it like this. On Oct 27, 5:29 pm, Jim Showalter jamesleeshowal...@gmail.com wrote: Followed the instructions inhttp://developer.android.com/sdk/adding-components.htmlfor adding 2.0 as components to an existing 1.6 SDK, from within Eclipse. It didn't work. Not by a long shot. Instead, it got partway through and then said that C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 couldn't be copied because of a lock, and similarly for PlatformPackage.new01. It said to shut down running programs, but the only program running was Eclipse, which was needed to do the upgrade. The cancel button was disabled, and the close box didn't work. Shutting down Eclipse killed it, but left C:\android-sdk-windows-1.6_r1 in a corrupted state. Restarting Eclipse showed the Android projects with errors, no SDK, and a disabled Android SDK and AVD Manager (which means no ability to rerun the install). Shutting down Eclipse, renaming the corrupted SDK directory, unzipping 1.6 again into C:, and restarting Eclipse made it as if nothing had ever happened, which is good. But it is not possible to complete the install from Eclipse, which is bad. The dialog says: Failed to rename directory C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to C:\android-sdk-windows-1.6_r1\docs -= Warning ! =- A folder failed to be renamed or moved. On Windows this typically means that a program is using that folder (for example Windows Explorer.) Please close all running programs that may be locking the directory 'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again. Failed to rename directory C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01 to C:\android-sdk-windows-1.6_r1\docs -= Warning ! =- A folder failed to be renamed or moved. On Windows this typically means that a program is using that folder (for example Windows Explorer.) Please close all running programs that may be locking the directory 'C:\android-sdk-windows-1.6_r1\temp\DocPackage.new01' and try again. Installed: SDK Platform Android 2.0, API 5 (tools rev: 3) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 delete contact list and email from device
Why in the heck would anyone want an app that deletes all their contacts and e-mails? I hope you realize that when people try to install your app, they're going to get a big fat warning when they install your program, saying that your app will have permissions to delete their contacts. So if you are trying to be malicious, it's not going to work. :) By the way, my response above should give you a hint as to the solution to your question. On Oct 29, 7:40 am, android_freak saifyzeenw...@gmail.com wrote: hi I want to delete contact list and and available emails in the device. how do i do that I have tried this for contact deletion but getting exception context.getContentResolver().delete (Contacts.Phones.CONTENT_URI,null,null); please suggest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App name/icon problems on Hero after reboot
I got a similar brush off response from HTC just now. Also claiming to not be able to replicate the problem. I forwarded them links to 3 different forums that I have been following where several people have been able to replicate the problem. I don't expect any fix or recognition of a problem from HTC any time soon. My first taste of an HTC phone and I'm already regretting it. On Tue, Nov 3, 2009 at 1:58 PM, gdonald gdon...@gmail.com wrote: On Oct 29, 12:58 pm, Dianne Hackborn hack...@android.com wrote: If this is only happening on Hero, it needs to be reported to HTC, not as a generic platform bug. I reported the issue to HTC and they said they couldn't reproduce it, didn't ask me a firmware version or anything. See their response below. So Diane is saying this is not a generic Android platform bug because it's only on HTC Heros, and then HTC is denying the bug exists even though many people in this very thread say they are experiencing it and can reproduce it. This really pisses me off. Whose bug is this? How is it ever going to get fixed? I guess I'm going back to Apple/iPhone development. If this is how open Android development works, I'm out. Dear Greg Donald, The HTC Customer Service Representative that has been handling your message would like to know if your question has been successfully answered. You can reply to or close your question by visiting: http://ContactUs.htc.com/wFrmMailLogin.aspx Ticket Number : [ 09USCW44ENA001067 ] If you do not respond to or close your question within 15 days, it will be closed automatically. Sincerely, HTC We are unable to receive replies to this email account. Please visit us at www.htc.com if you have any questions or need further assistance. New Response From [ Alvin (NA Team) ] Greg, Thank you for taking the time to contact HTC America Technical Support via E-Mail with your inquiry about a reported bug on code.google.com. My name is A.J. and I will be happy to assist you today. First, let me apologize for the extreme delay in response to your original inquiry. HTC has recently released a plethora of new devices in several markets as well as software updates for several of our current models. The response to these devices and OS updates has been overwhelming but we are working diligently to provide the best support possible for our customers. Thank you for your patience. I have tested this on 2 of our Sprint HTC Heroes and one European model. I was unable to replicate the issue on any of the device. HTC does not offer any technical assistance for the Android Market or applications downloaded from the market. I suggest you contact the individual vendors for support or Google. I apologize for any inconvenience this may cause you. Greg, if you have any future questions about your device please feel free to visit www.htc.com and send us another e-mail. You may also enjoy www.htcwiki.com, our customer-based forum, which has a plethora of information on HTC devices. I would also like to invite you to participate in a customer satisfaction survey located at http://survey.htc.com/worldwide/. I hope you have a great day! HTC America Technical Support A.J. Customer Information NameGreg Donald Telephone 615-838-7503 Email Address gdon...@gmail.com Country United States Inquiry Information Inquiry TypeTechnical Support Inquiry Description Please see the bug report here: http://code.google.com/p/android/issues/detail?id=4419 Issue Date Time 2009/11/04 02:38 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: how to know if it the emulator or device
On Tue, Nov 3, 2009 at 11:10 AM, Roman ( T-Mobile USA) roman.baumgaert...@t-mobile.com wrote: Furthermore the API call (WifiManager)mContext.getSystemService(mWifiService); gives you an exception on the Emulator which is an indication that Wifi radio is not supported. That's only because it doesn't happen to currently be implemented in the emulator. This could very well change in the future. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put some image on background of a row of a ListView
For background image, try: android:background=@drawable/my_image http://developer.android.com/reference/android/view/View.html#setBackgroundResource(int) http://developer.android.com/reference/android/view/View.html#setBackgroundDrawable(android.graphics.drawable.Drawable) http://developer.android.com/guide/topics/graphics/2d-graphics.html Don't know if repeating backgrounds is possible or not. (But what's the difference between a repeating 1px image and a solid background color?) On Oct 29, 10:50 am, Gustavo Melo pipoc...@gmail.com wrote: ListView Question ! I know it's possible change the row color, but it's possible to put some imagem on background? And if yes, it's possible to create an imagem 1px and repeat-x or repeat-y like CSS? -- []'s Gustavo Melo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Anyone know what happened to Cyrket?
Well that sucks. Those were two of the most useful Android sites around. I hope it's not permanent. On Nov 3, 9:06 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: I believe Androidstats got their data by scraping (with an agreement with Jay no doubt)Cyrket, so they went down together. -John Coryat Radar Now! What Zip Code? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Creating new Parceables
I am facing the same issue, is the fix available in cupcake 1.5? Or can I get the source code for just fixing this? Thanks Regards, Ash On Mar 4 2008, 10:48 pm, hackbod hack...@gmail.com wrote: It will be fixed, but I'm not sure when it will appear in the SDK. On Mar 4, 4:11 am, gadgets akso...@gmail.com wrote: Any reply to my questions? What is the number of this very critical bug within bug tracker? On 29 фев, 21:41, hackbod hack...@gmail.com wrote: Unfortunately, it is fixed but it looks like there was a little code introduced to the system that prints the Intent from the system process... and as a result tries to access the extras, which means unparceling, and things break. :( This -will- be fixed in a future SDK, but I don't know when. On Feb 29, 7:59 am, gadgets akso...@gmail.com wrote: Is it fixed at current release, m5? I'm still receiving such error. If it is NOT fixed, HOW i should pass my custom data between activities?? On 12 фев, 23:12, hackbod hack...@gmail.com wrote: Hi Stefano, This doesn't work in the current SDK, but should be fixed in the next one. On Feb 12, 6:14 am, Semeria Stefano stefano.seme...@guest.telecomitalia.it wrote: Hi all, We are trying to pass custom objects between activities. We implemented the parcelable interface as described in the documentation to be able to store our object ( called MyParcelable )into a Bundle. When we run our application we got a system crash with the following RuntimeException: D/dalvikvm( 786): Exception java/lang/ClassNotFoundException from PathClassLoader.java:178 not caught locally D/dalvikvm( 786): NOTE: loadClass 'android/MyParcelable' 0x40017d80 threw an exception E/Parcel ( 786): Class not found when unmarshalling: android.MyParcelable, e: java.lang.ClassNotFoundException: android/MyParcelable E/AndroidRuntime( 786): *** EXCEPTION IN SYSTEM PROCESS. System will crash. E/AndroidRuntime( 786): java.lang.RuntimeException: java.lang.ClassNotFoundException: android/MyParcelable E/AndroidRuntime( 786): at android.os.Parcel.readParcelable(Parcel.java:1238) E/AndroidRuntime( 786): at android.os.Parcel.readValue(Parcel.java:1153) E/AndroidRuntime( 786): at android.os.Parcel.readMapInternal(Parcel.java:1315) E/AndroidRuntime( 786): at android.os.Parcel.readBundle(Parcel.java:956) E/AndroidRuntime( 786): at android.os.Bundle$1.createFromParcel(Bundle.java:791) E/AndroidRuntime( 786): at android.os.Bundle$1.createFromParcel(Bundle.java:794) E/AndroidRuntime( 786): at android.os.Parcel.readParcelable(Parcel.java:1260) E/AndroidRuntime( 786): at android.os.Parcel.readValue(Parcel.java:1153) E/AndroidRuntime( 786): at android.os.Parcel.readMapInternal(Parcel.java:1315) E/AndroidRuntime( 786): at android.os.Parcel.readBundle(Parcel.java:956) E/AndroidRuntime( 786): at android.content.Intent.readFromParcel(Intent.java:2277) E/AndroidRuntime( 786): at android.content.Intent.init(Intent.java:2256) E/AndroidRuntime( 786): at android.content.Intent.init(Intent.java:444) E/AndroidRuntime( 786): at android.content.Intent$1.createFromParcel(Intent.java:2248) E/AndroidRuntime( 786): at android.content.Intent$1.createFromParcel(Intent.java:2250) E/AndroidRuntime( 786): at android.app.ActivityManagerNative.doTransact(ActivityManagerNative.java: 118) E/AndroidRuntime( 786): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java: 104) E/AndroidRuntime( 786): at android.os.BinderNative.execTransact(BinderNative.java:194) E/AndroidRuntime( 786): at android.dalvik.NativeStart.run(Native Method) E/AndroidRuntime( 786): Caused by: java.lang.ClassNotFoundException: android/MyParcelable E/AndroidRuntime( 786): at java.lang.Class.classForName(Native Method) E/AndroidRuntime( 786): at java.lang.Class.forName(Class.java:135) E/AndroidRuntime( 786): at java.lang.Class.forName(Class.java:103) E/AndroidRuntime( 786): at android.os.Parcel.readParcelable(Parcel.java:1226) E/AndroidRuntime( 786): ... 18 more E/AndroidRuntime( 786): Caused by: java.lang.NoClassDefFoundError: android/MyParcelable E/AndroidRuntime( 786): ... 22 more E/AndroidRuntime( 786): Caused by: java.lang.ClassNotFoundException: android.MyParcelable in loader java.lang.pathclassloa...@40017d80
[android-developers] Re: How to add file .sqlite extension to our project
My earlier suggestion was incomplete, assuming you want to continue to modify the database afterwards. This question has already been discussed and there's a great answer for it. Please see: http://groups.google.com/group/android-developers/browse_thread/thread/4ffd437aeb35d29e -- PJ On Nov 3, 7:44 am, sham shamcs shamc...@gmail.com wrote: I believe Android supports sqlite. There is a sqlite library in Android. I didnt use it.But normally we will add the file using adb command in Linux On Tue, Nov 3, 2009 at 6:25 PM, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Intents and navigating the GUI
Don't create a new intent for the main GUI. Just call finish() instead. Also, if you want your main menu Activity to detect this event and do anything special when it comes back to it, it can override onActivityResult(). I'm leaving out some details such as howto return a result (RESULT_OK), how to pass a Bundle on info back to the main menu if desired, etc. But if you do the Notepad tutorial, it teaches this concept well: http://developer.android.com/guide/tutorials/notepad/index.html Hope this helps! -- PJ On Nov 2, 11:36 am, chippie d4046...@tees.ac.uk wrote: Hey guys I've got an application that displays a list to the user ... I've also programmed a menu and when the user clicks on something in the menu this launches a new intent that in turn displays a new GUI. My problem is that I can't understand how I get navigate back to the main menu. So far in my new selected GUI i create a new intent for the main GUI, but this looses all saved settings Sure this isn't the right way of doing it? Kind Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Viewing logs on native android
Hi All, As we see emulator's logs in logcat of eclipse. What is similar on native android to view these logs ? Thanks in advance -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Viewing logs on native android
You can use the header file android/log.h in NDK, and link to /system/lib/liblog.so. And you can find the details in the document of NDK ($NDK_ROOT)/docs/STABLE-APIS.TXT). 2009/11/4 swapnil kamble swap.kam...@gmail.com Hi All, As we see emulator's logs in logcat of eclipse. What is similar on native android to view these logs ? Thanks in advance -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Multitouch support in Android 2.0
A huge thank-you, Diane, for giving us this information. :D On Oct 27, 5:18 pm, RichardC richard.crit...@googlemail.com wrote: You missed the ;) in my reply - sorry was not ment as a serious response. On Oct 27, 10:00 pm, niko20 nikolatesl...@yahoo.com wrote: Wait, if I use two mice, they both control the same pointer. There isn't a way to have multiple pointers. At least on windows - maybe on Linux you can do so more easily? -niko On Oct 27, 3:33 pm, RichardC richard.crit...@googlemail.com wrote: niko20 wrote: Now, if only there was a great trick to do multitouch on the emulator ! just use 2 mice ;) On Oct 27, 8:27 pm, CraigsRace craig...@gmail.com wrote: Does anyone know if every phone will support multi-touch (I remember talk about the G1's hardware might not support multi-touch)? On Oct 28, 5:08 am, niko20 nikolatesl...@yahoo.com wrote: Dianne, Thanks for the great info. Yep looks like you just get the count of pointers and walk through that. Now, if only there was a great trick to do multitouch on the emulator ! (I should be getting an actual phone soon though) -niko On Oct 27, 11:45 am, Dianne Hackborn hack...@android.com wrote: It's basically just some new APIs on MotionEvent: http://developer.android.com/reference/android/view/MotionEvent.html http://developer.android.com/reference/android/view/MotionEvent.htmlHmmm and I'm not sure why, but in the doc all of those new APIs are in gray, so they should be easy to see. :) Or here is the API diff report: http://developer.android.com/sdk/api_diff/5/changes.html http://developer.android.com/sdk/api_diff/5/changes.htmlI see that I didn't get around to writing documentation in MotionEvent on the way multi-touchworks; sorry about that. Basically there are new actions that tell you when additional fingers go down and up, and each MotionEvent you receive allows you to query for the number of pointers in the event as well as the x, y, size, and pressure of each of those points (and the historical data for all those points as well if you want to collect all data since the last motion event you received). So it should be pretty straight-forward. The main thing to watch out for is the difference between the index in the current event for a pointer's data vs. the pointer ID for that pointer: http://developer.android.com/reference/android/view/MotionEvent.html#... http://developer.android.com/reference/android/view/MotionEvent.html#...The pointer ID allows you to keep track of the individual fingers across multiple motion events. For example, if the user touches finger 1, then finger 2, then releases 1, then touches 1 again, you would see: Finger 1 down: MotionEvent ACTION_DOWN with one pointer, whose ID is 0. Finger 2 down: MotionEvent ACTION_POINTER_2_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 1 down: MotionEvent ACTION_POINTER_1_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 2 up: MotionEvent ACTION_UP with one pointer, whose ID is 1. (And inspite of what the update documentation says, the API allows for an arbitrary number of fingers, not just 3. I just happened to define convenience constants for the first 3 finger down/up actions, but given their weird naming as seen above and the finger ID mask is actually 255, it is perhaps best just to ignore those constants. :p) On Tue, Oct 27, 2009 at 9:29 AM, Streets Of Boston flyingdutc...@gmail.comwrote: Kind-a burried inside the blog-post on developer.android.com (http:// developer.android.com/sdk/android-2.0-highlights.html), i saw that multi-touchis now supported: Android virtual keyboard •An improved keyboard layout to makes it easier to hit the correct characters and improve typing speed. •The ***framework'smulti-touchsupport*** ensures that key presses aren't missed while typing rapidly with two fingers. •A smarter dictionary learns from word usage and automatically includes contact names as suggestions. I'm really curious howmulti-touchis supported in the API. -- 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,
[android-developers] Trap in TabHost when AsyncTask delays setContentView at activity startup
I've got a tab host activity started from a home screen shortcut. When my application starts it downloads information from a server using an AsyncTask. In the onPostExecute method of the AsyncTask I call setContentView to display the TabHost. When I start the homescreen shortcut by tapping on the shortcut using my finger everything works as expected, I download the information from the server and display the TabHost with the information in the tabs. However starting the application by navigating to the shortcut with the mouse wheel and then clicking on the shortcut with the mouse wheel leads to a trap in the framework code as soon as my application starts. The stack trace is below: 11-04 15:45:40.113: ERROR/AndroidRuntime(3360): Uncaught handler: thread main exiting due to uncaught exception 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): java.lang.NullPointerException 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.widget.TabHost.onTouchModeChanged(TabHost.java:179) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.view.ViewTreeObserver.dispatchOnTouchModeChanged(ViewTreeObserver.java:591) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.view.ViewRoot.ensureTouchModeLocally(ViewRoot.java:1877) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.view.ViewRoot.performTraversals(ViewRoot.java:715) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.view.ViewRoot.handleMessage(ViewRoot.java:1613) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.os.Handler.dispatchMessage(Handler.java:99) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.os.Looper.loop(Looper.java:123) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at android.app.ActivityThread.main(ActivityThread.java:4203) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at java.lang.reflect.Method.invokeNative(Native Method) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at java.lang.reflect.Method.invoke(Method.java:521) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 11-04 15:45:40.213: ERROR/AndroidRuntime(3360): at dalvik.system.NativeStart.main(Native Method) Looking at the code for the TabHost class I see the following code at the point where the trap occurs public void onTouchModeChanged(boolean isInTouchMode) { if (!isInTouchMode) { // leaving touch mode.. if nothing has focus, let's give it to // the indicator of the current tab TRAP ON THIS LINE if (!mCurrentView.hasFocus() || mCurrentView.isFocused()) { mTabWidget.getChildTabViewAt(mCurrentTab).requestFocus(); } } } This looks like a simple fix since mCurrentView is null at the time that this method is called - can this issue be addressed? Does anyone know of any workarounds? Thanks Lee -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App upgrade (with zipalign) causes force closes/disappearing of app icon
Hi, what happens with my app is that when a update or a install occurs I see the icon. When i restart my htc hero the app icon disappears. But it happens only after the restart. any ideas? thanks rafael On Oct 2, 12:56 am, SCMSoft scms...@gmail.com wrote: Now we think about it more, this release was also the first release for which we switched on the copy protection bit. Can it be that there is something broken in upgrading from a non-protected APK to a protected one? We haven't been able to reproduce it ourselves, but yesterday alone got another 5 emails from users to which the same happened, and in all cases a full uninstall + reinstall fixed it. On Oct 1, 6:58 pm, Dianne Hackborn hack...@android.com wrote: zipalign should have no impact on the running of your app at all, except for making some ways the system accesses it faster and lighter since it doesn't need to copy data out of your app. All applications built in to the system have always had zipalign run on them. On Thu, Oct 1, 2009 at 12:52 AM, SCMSoft scms...@gmail.com wrote: Hi, Almost all our users complain that after upgrading to the newest version of our Camera Pro app, either the app crashes or the icon is not showing up anymore in the home screen. The problem seems to be gone after deinstalling and reinstalling the app. How can it be possible that the icon is gone? This is the first version we used zipalign on, can this have something to do with it? Thanks, Swiss Codemonkey team -- 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] Viewing logs on native android
Thanks for your reply. Then I will have to always use NDK just for logging. Can't I do logging purely in Android App just like for Emulator using logcat ? On Wed, Nov 4, 2009 at 10:11 AM, Blue Zheng blue.zh...@gmail.com wrote: You can use the header file android/log.h in NDK, and link to /system/lib/liblog.so. And you can find the details in the document of NDK ($NDK_ROOT)/docs/STABLE-APIS.TXT). 2009/11/4 swapnil kamble swap.kam...@gmail.com Hi All, As we see emulator's logs in logcat of eclipse. What is similar on native android to view these logs ? Thanks in advance -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Is it possible to display the ExpandableListView indicator in right side?
Hi Is it possible to display the ExpandableListView indicator in right side? Thanks Gopu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Start app from browser
I believe you'll want to register a URI pattern that your application handles. You can look for content provider samples for that. Then on your own page display a link that matches that URI pattern. You still depend on the user clicking the link. You can google for how people link to their market listing to get an example of what people put on their webpages to load an applicaiton. On Nov 2, 1:36 pm, Peter Rytter peterryt...@gmail.com wrote: Hey there I need to start an app from the browser on my android-phone (on my own webpage) Is that posible (what to do)? Peter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add file .sqlite extension to our project
Thanks Everybody... This information are really helpful for me.. On Nov 4, 4:29 am, PJ pjbar...@gmail.com wrote: My earlier suggestion was incomplete, assuming you want to continue to modify the database afterwards. This question has already been discussed and there's a great answer for it. Please see:http://groups.google.com/group/android-developers/browse_thread/threa... -- PJ On Nov 3, 7:44 am, sham shamcs shamc...@gmail.com wrote: I believe Android supports sqlite. There is a sqlite library in Android. I didnt use it.But normally we will add the file using adb command in Linux On Tue, Nov 3, 2009 at 6:25 PM, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Provide a database packaged with the .APK file or host it separately on a website?
Have a look at ColorDict for a third approach (the middle path!). On Oct 29, 3:34 pm, Pankaj Godbole [Andruid] panka...@gmail.com wrote: Here is some background about my app: I am developing an Android app that will display a random quote or verse to the user. For this I am using an SQLite database. The size of the DB would be approximately 5K to 10K records, possibly increasing to upto 1M in later versions as new quotes and verses are added. Thus the user would need to update the DB as and when newer versions are of the app or DB are released. After reading through some forums online, there seem to be two feasible ways I could provide the DB: 1. Bundle it along with the .APK file of the app, or 2. Upload it to my app's website from where users will have to download it I want to know which method would be better (if there is yet another approach other than these, please do let me know). After pondering this problem for some time, I have these thoughts regarding the above approaches: Approach 1: Users will obtain the DB along with the app, and won't have to download it separately. Installation would thereby be easier. But, users will have to reinstall the app every time there is a new version of the DB. Also, if the DB is large, it will make the installable too cumbersome. Approach 2: Users will have to download the full DB from the website (although I can provide a small, sample version of the DB via Approach 1). But, the installer will be simpler and smaller in size. Also, I would be able to provide future versions of the DB easily for those who might not want newer versions of the app. Could you please tell me from a technical and an administrative standpoint which approach would be the better one and why? If there is a third or fourth approach better than either of these, please let me know. Thank you! Pankaj Godbole Andruid -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add file .sqlite extension to our project
But I am facing one more problem...This sqlite file size is 147 mb. So when i am running it showing error message like No space left on device.Is their any solution for this? On Nov 4, 10:04 am, Archana archana.14n...@gmail.com wrote: Thanks Everybody... This information are really helpful for me.. On Nov 4, 4:29 am, PJ pjbar...@gmail.com wrote: My earlier suggestion was incomplete, assuming you want to continue to modify the database afterwards. This question has already been discussed and there's a great answer for it. Please see:http://groups.google.com/group/android-developers/browse_thread/threa... -- PJ On Nov 3, 7:44 am, sham shamcs shamc...@gmail.com wrote: I believe Android supports sqlite. There is a sqlite library in Android. I didnt use it.But normally we will add the file using adb command in Linux On Tue, Nov 3, 2009 at 6:25 PM, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hidequoted 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] Set selected ringtone as device's default ringtone
I want to set selected ringtone as device's default ringtone. As per my findings, we can use ContentUris.withAppendedId (MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,id) method to append the selected ringtone id to content uri and then saving it in database through ContentValues and System settings. But i can't figure out what id to append.The id seems to be the id of elements in hash table as MediaStore saves the audio in such form. Is it so..?..How can i get the Id of hash table elements? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Verify musical instrument app idea: microphone, simultaneous record and play, elevation, multi-touch
I have a great idea for an app and wanted to get everyone's input on 4 different technical aspects of it. Some of you might be familiar with the iPhone musical app where you can play it like a flute/ocarina. You blow into the mic and use multi-touch to press a combination of holes to play different sounds. I'm thinking about writing a *similar* app for Android, except it's a *trumpet* instead of a flute. My idea is: * The screen shows three circles in a line, which represent the three trumpet valves. * Touching a circle represents holding down a valve. * Blowing into the mic represents blowing into the trumpet. * Note: On a real trumpet, the note pitch depends not only on the valve combination, but also on the lip vibrations. (Otherwise there would only be 7-8 possible notes.) * I'm thinking that the angle (elevation) of the phone could represent different pitches. So, if you elevate the phone up, you'll play a higher note, for example. The 4 technical aspects that I'd like to verify are: 1. What is the most sensible way to detect blowing into the microphone? My current plan is to do AudioRecord.read() and manually examine the audio buffer data to check for sufficiently high amplitude (volume). I think this will be pretty easy, but just wanted to check whether there's another better way to do this. 2. Is it possible to record and play at the same time? I need to record blowing into the mic and playing sound at the same time. 3. For checking elevation angle, I assume I should use SensorManager. I assume that I want to use getInclination(), but I think I might also need getRotationMatrix() or getOrientation(). Seems pretty easy, but does anyone know of any examples I could look at? 4. For detecting which valves are pressed down, I assume that it's feasible to use the multi-touch feature. However, I have a G1 phone. Is it possible to get multi-touch to work with the G1 phone somehow? (This question probably deserves its own thread!) I'm not going to ask about how to program multi-touch because there's a good discussion of the technical features at: http://groups.google.com/group/android-developers/browse_thread/thread/962b1a27a31e450d Anyway, your input is highly welcome, as well as any other suggestions you might have for this app. (By the way, I might do other instruments too, besides, trumpet, but I figure that if I can get trumpet to work, I can get any other instrument to 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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to know if it the emulator or device
Hi lianwei, what's the means of ro.kernel.qemu? 2009/11/4 lianwei lianwei.w...@gmail.com if (1.equals(android.os.SystemProperties.get(ro.kernel.qemu))) { // Run in Emulator } On Nov 4, 9:21 am, Emmanuel emmanuel.ast...@gmail.com wrote: On Nov 3, 2:29 pm, Zhihong GUO gzhh...@gmail.com wrote: Hi all, How to know if the application is running on emulator or on a real device? I want to implement a function to detect wifi connection. If the application is running on emulator, just skip the wifi detection, while on real device, the wifi connection check should be done. how to do that? Thank a lot, James Alternatively, you can check the phone model variable: PhoneModel = android.os.Build.MODEL; On my G1 phone, it gives me HTC DREAM For the emulator, it gives sdk. I don't know what method is preferred by google, but it feels more secure to me than using the ANDROID_ID var... Emmanuelhttp://androidblogger.blogspot.com/http://www.alocaly.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 know if it the emulator or device
It can not work. There is no exception throws and the wifiManager returned can be used as wifiManager.isEnabled() 2009/11/4 Dianne Hackborn hack...@android.com On Tue, Nov 3, 2009 at 11:10 AM, Roman ( T-Mobile USA) roman.baumgaert...@t-mobile.com wrote: Furthermore the API call (WifiManager)mContext.getSystemService(mWifiService); gives you an exception on the Emulator which is an indication that Wifi radio is not supported. That's only because it doesn't happen to currently be implemented in the emulator. This could very well change in the future. -- 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] What is the Sprint Hero AppWidget problem?
Hello all, I wrote a widget that has been working fine for most folks. However, I started getting bug reports about how the widget would be blank on reboot (not receive an update?), and it seemed that the Sprint Hero continually came up. I thought I was crazy but I'm finding that other people are having the same problems: Searching Google for sprint hero appwidget problems yields: Added warning about the problem on the Sprint Hero device: On the Sprint Hero (HTC ROM v1.29.xxx) the AppWidget API is broken in such a way that it won't ... More specific blog post that mentions it but doesn't explain the problem: http://koxx3.wordpress.com/2009/10/22/htc-hero-sprint-bug/ I found the reason : HTC changed the Android widget management at startup ! I hope they will fix it in a new ROM release, but I’d like to find a solution to bypass this problem. EDIT 28/10/2009 : problem solve for ‘Pure calendar’ with new option. I e-mailed the author in hopes of getting an answer, but I haven't received any response. Does anybody with a Sprint Hero know what the problem is? Thank you, -Brian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: some questions about using gdbserver and JNI libraries
On Nov 2, 9:10 am, Michael Ambrus michael.amb...@gmail.com wrote: gdbclient mediaserver :5039 31 What I get in the end is: gdb: Unable to get location for thread creation breakpoint: requested event is not supported __dl__start () at bionic/linker/arch/arm/begin.S:35 35 mov r0, sp I get that too, if I supply the same arguments. The problem is that the gdbclient shell function isn't doing what you think it's doing. The third argument isn't a pid, it's a process name, which is fed to the pid shell function to determine the process ID. If you instead do: % gdbclient mediaserver :5039 mediaserver you'll have much better results. (It took me a minute to figure that out -- the big clue for me was that when you disconnect gdb the remote end is killed, but in this case the mediaserver process wasn't dying.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Viewing logs on native android
Oh, sure, you still can use logcat to logging for native android device. Just choose your device in DDMS for logging. if you want to logging just for App, the NDK is not necessary. 2009/11/4 swapnil kamble swap.kam...@gmail.com Thanks for your reply. Then I will have to always use NDK just for logging. Can't I do logging purely in Android App just like for Emulator using logcat ? On Wed, Nov 4, 2009 at 10:11 AM, Blue Zheng blue.zh...@gmail.com wrote: You can use the header file android/log.h in NDK, and link to /system/lib/liblog.so. And you can find the details in the document of NDK ($NDK_ROOT)/docs/STABLE-APIS.TXT). 2009/11/4 swapnil kamble swap.kam...@gmail.com Hi All, As we see emulator's logs in logcat of eclipse. What is similar on native android to view these logs ? Thanks in advance -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] ALT key for a virtual keyboard
Basically I want to capture Alt-key combination to provide some customized alternative text input. For example Alt-f would put FOO into the text field. However there doesn't seem to be ALT key on the virtual keyboard in ether portrait or landscape. Is it possible to fake Alt key on the virtual keyboard somehow? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Widget Layout Frustration
Evan, I am also struggling with this same problem. It's mystifying because so many widgets seem to have this look and yet I find it hard to believe that all the developers painstakingly did it by hand. Can you post a screenshot of what you have? In what way is yours just a couple of pixels off? Also, did you make that text_border file yourself? (I assume it is a ninepatch...?) I scanned the SDK for *.9.png and found several ninepatches that were similar but none that looked exactly right. (Here's an example of how mine looks with the Toast ninepatch: http://screencast.com/t/zEyDZr8fnI) It sure seems like if we found the right ninepatch image we'd just have to add the faint shadow to the text and then we'd be home free. On Oct 29, 10:40 pm, Evan Ruff evan.r...@gmail.com wrote: Hey Guys, I was hoping someone could help me with a home screenwidgetI'm trying to layout. Basically, I'm trying to layout mywidgetso it matched a standard home screen application shortcut perfectly. Basically, at this point, I'm about ~2px off and it's driving me crazy! Has anyone gotten this to match up just right? Should I be able to find this layout in the source somewhere? Any clues would be much appreciated. Here's my layout thus far: drawable/text_border.xml - For the black background around thetext: shape xmlns:android=http://schemas.android.com/apk/res/android; solid android:color=#9900/ padding android:left=5dp android:right=5dp android:bottom=1dp android:top=1dp / corners android:radius=7dp / /shape layout/widget.xml - Thewidgetitself: ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_gravity=center LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=center ImageView android:id=@+id/icon android:layout_gravity=center android:src=@drawable/icon_gray android:layout_width=wrap_content android:layout_height=wrap_content android:paddingBottom=5px android:paddingTop=5px / TextView android:id=@+id/message android:layout_width=wrap_content android:layout_height=wrap_content android:background=@drawable/text_border android:textColor=# android:layout_gravity=center android:text=Assistant android:textSize=12px / /LinearLayout /FrameLayout Thanks for any help tuning this badboy. Thanks! Evan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: text animation
i am very sorry for the late reply. here is a sample, (if u guys have not already figured it out). hope it helps: public class MyTextAnimation extends Activity { Animation mAnimation; TextView mTextView; LinearLayout mLayout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mLayout = new LinearLayout(this); mLayout.setGravity(Gravity.CENTER); mTextView = new TextView(this); mTextView.setText(Saurav Mukherjee); mTextView.setGravity(Gravity.CENTER); mAnimation = new TranslateAnimation(100f, -100f, 0.0f, 0.0f); mAnimation.setDuration(2000); mTextView.setAnimation(mAnimation); mLayout.addView(mTextView); setContentView(mLayout); } } Regards, Saurav Mukherjee. On Tue, Nov 3, 2009 at 8:36 PM, Gulfam gulfa...@gmail.com wrote: I want to make same component as mentioned by npak243 any one can help us regarding this. I am trying to use Animation Class but i dont know how to use it. I have also used marquee with text view its work fine but on getting focus but i need to scroll text with in text view if it is ocused or not means in both conditions. Gulfam Hassan On Nov 3, 6:45 pm, sham shamcs shamc...@gmail.com wrote: use animation class in Android. On Tue, Nov 3, 2009 at 2:49 PM, npak...@gmail.com npak...@gmail.com wrote: Hi all, Now i want to write an application to make a certain text to run slowly from right side screen to left side screen and rotate to repeat. How can i do that? Please help me ! Thanks all, NPAK -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] building for 1.5 using 2.0...
i need my app to support 1.5 and above. i noticed that if I create my build.xml file using -- c:\tools\android\2.0r3\tools\android update project --name MyProject -- path C:\MyProject --target 2 it complains about my resource directory names res/drawable-hdpi, res/ drawable-ldpi, etc... res/layout-large, etc... saying invalid resource directory name. If I use 1.6r1 tool set c:\tools\android\1.6r1\tools\android update project --name MyProject -- path C:\MyProject --target 2 Everything works fine. If I use target 3 (1.6 and above) c:\tools\android\2.0r3\tools\android update project --name MyProject -- path C:\MyProject --target 3 Everything works fine. So, do I basically *have* to use 1.6r1 to build for 1.5? And does that mean that those special directory names will only work on 1.6 and above? tia. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: animated splash example ?
The first activity in Balance The Beer plays an intro video. Code here: http://code.google.com/p/skylight1/source/browse/trunk/SkylightGame/src/net/nycjava/skylight1/WelcomeActivity.java Not sure if that counts as a splash screen, though, since you can just pick a difficulty immediately. I guess most apps I've seen just start immediately, I guess, rather than using splash screens. If video is too much, there's an example of simple frame animation here: http://developer.android.com/intl/fr/guide/topics/graphics/2d-graphics.html#frame-animation On Nov 2, 2:43 pm, zw mpc8...@gmail.com wrote: Hi Gurus Are there simple sample codes out there that demonstrate how to createanimatedsplashscreens, similar to Android boot-upscreenbut not at that level. I'm more interested in applicationanimatedsplashscreen. Is there an easy or common approach to this ? Thank you for sharing. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Google think developers are lowest life form?
What purported to be a web company doesn't even let developers see user comments from the so-called Developer Console. Now they shut down Cryket. What the fiick? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Problem RemotableViewMethod while extending TextView
I managed to figure it out. You were right in that it didn't have anything to do with RemoteViews or RemotableViewMethod. Instead, my problem was that in my onClick method for my start button, I was using the variable mChronometer, which was null, and so threw an exception. The bug was located in the onCreate() method of my activity. Specifically, I had: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(TAG, onCreate()); mChronometer = (Chronometer)findViewById(R.id.Chronometer); mStartStop = (Button)findViewById(R.id.StartStopButton); mResetLap = (Button)findViewById(R.id.ResetLapButton); setContentView(R.layout.stopwatch); } But android didn't like this. findViewById() doesn't work correctly unless it's called after setContentView(), so it was returning null for all my fields and giving me the error. Easy fix, just move setContentView() up, like so: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(TAG, onCreate()); setContentView(R.layout.stopwatch); mChronometer = (Chronometer)findViewById(R.id.Chronometer); mStartStop = (Button)findViewById(R.id.StartStopButton); mResetLap = (Button)findViewById(R.id.ResetLapButton); } Thanks for your help! Daniel Bostwick On Nov 3, 6:56 pm, Mark Murphy mmur...@commonsware.com wrote: bostwick wrote: The included Chronometer widget doesn't quite have the functionality I wanted, so I copied its code into my own package. The source code to Android is not necessarily designed to be pulled out and used in isolation elsewhere. Some classes will work that way (e.g., I have cloned AsyncTask and MatrixCursor), but others will not because they have dependencies on other open-source-but-not-in-the-SDK classes and methods. Looking through the android source, you can see stock widgets using theRemotableViewMethodall over the place, but for some reason, my code can't. That is probably used by the firmware build process. So, my question is this: What can I do to enable the RemotableViewMethodannotation in my custom widgets? Most likely, you can't. Is there something I should be doing differently in order to code custom widgets? Well, your underlying problem didn't make it into your paste. You are failing on a NullPointerException (line #42 of the paste), and you need to track that down. AFAIK, theRemotableViewMethodannotation will not affect you if you are using a widget in an activity. I know that part of the problem is just my lack of experience with the Android SDK, and I don't fully understand what the RemoteViews class does or why it's needed, and the two sentence description in the API docs doesn't help much there. If someone could explain just the logistics of this class, that would also be helpful. Mostly, in terms of the SDK, RemoteViews is used for app widgets -- those doodads you can put on the home screen. Since the home screen runs as its own process, it can't execute your code. Instead, via RemoteViews, you effectively serialize a bunch of UI operations that get sent from your own process to the home screen for execution. UI widgets (android.widget.*) that work with RemoteViews get the @android.view.RemotableViewMethodto indicate what can and cannot be used in this fashion, AFAICT. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 align the child in right side in FrameLayout ?
Hi , How to align the child in right side in FrameLayout ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is it possible to display the ExpandableListView indicator in right side?
Default indicator icon is in Left side?Is their any way to display ion right side? On Nov 4, 10:01 am, GPU gopuraj...@gmail.com wrote: Hi Is it possible to display the ExpandableListView indicator in right side? Thanks Gopu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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.com e-mail addresses
If someone has an android.com e-mail address, what does that mean? Can serious app developers get one? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Difference between Linearlayout's Gravity and LayoutGravity ?
Hi , In eclipse layout editor for LinearLayout under LinearLayout one gravity is there and under Misc LayoutGravity is there. What is the difference between these two? How to set the layout gravity of a linear layout from code? Thanks Gopu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Difference between Linearlayout's Gravity and LayoutGravity ?
gravity = setting the gravity of the content of the view layout_gravity = setting the gravity of the view inside its parent On Tue, Nov 3, 2009 at 11:05 PM, GPU gopuraj...@gmail.com wrote: Hi , In eclipse layout editor for LinearLayout under LinearLayout one gravity is there and under Misc LayoutGravity is there. What is the difference between these two? How to set the layout gravity of a linear layout from code? Thanks Gopu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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] How to align the child in right side in FrameLayout ?
android:layout_gravity=right On Tue, Nov 3, 2009 at 10:57 PM, GPU gopuraj...@gmail.com wrote: Hi , How to align the child in right side in FrameLayout ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: text animation
Hi Saurav Mukherjee, Thank a lot for your replying, In your example, you move TextView object from center to left side of screen. It means that when TextView has relative long content , it will look not cool. Do you know marquee property of TextView when we focus on this, don't you? I want my text displayed symbol by symbol from right side screen to left side screen ,and after the some symbols disappear in left side screen, they will appear again at right side screen. For example: At begin time, screen display: S After some miliseconds Sa . Saur . Saura . Saurav . Saurav . Saurav M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Saurav Mukherjee . aurav Mukherjee . urav Mukherjee . rav Mukherjee . av MukherjeeS . v MukherjeeSa . MukherjeeSau Hope you understand clearly my problem and help me to solve that. Can it be solved by animation? Anyway, thank you again! NPAK On Wed, Nov 4, 2009 at 12:47 PM, Saurav to.saurav.mukher...@gmail.comwrote: i am very sorry for the late reply. here is a sample, (if u guys have not already figured it out). hope it helps: public class MyTextAnimation extends Activity { Animation mAnimation; TextView mTextView; LinearLayout mLayout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mLayout = new LinearLayout(this); mLayout.setGravity(Gravity.CENTER); mTextView = new TextView(this); mTextView.setText(Saurav Mukherjee); mTextView.setGravity(Gravity.CENTER); mAnimation = new TranslateAnimation(100f, -100f, 0.0f, 0.0f); mAnimation.setDuration(2000); mTextView.setAnimation(mAnimation); mLayout.addView(mTextView); setContentView(mLayout); } } Regards, Saurav Mukherjee. On Tue, Nov 3, 2009 at 8:36 PM, Gulfam gulfa...@gmail.com wrote: I want to make same component as mentioned by npak243 any one can help us regarding this. I am trying to use Animation Class but i dont know how to use it. I have also used marquee with text view its work fine but on getting focus but i need to scroll text with in text view if it is ocused or not means in both conditions. Gulfam Hassan On Nov 3, 6:45 pm, sham shamcs shamc...@gmail.com wrote: use animation class in Android. On Tue, Nov 3, 2009 at 2:49 PM, npak...@gmail.com npak...@gmail.com wrote: Hi all, Now i want to write an application to make a certain text to run slowly from right side screen to left side screen and rotate to repeat. How can i do that? Please help me ! Thanks all, NPAK -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: How to align the child in right side in FrameLayout ?
from code? On Nov 4, 12:16 pm, Romain Guy romain...@google.com wrote: android:layout_gravity=right On Tue, Nov 3, 2009 at 10:57 PM, GPU gopuraj...@gmail.com wrote: Hi , How to align the child in right side in FrameLayout ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: text animation
On Tue, Nov 3, 2009 at 2:49 PM, npak...@gmail.com npak...@gmail.com wrote: Hi all, Now i want to write an application to make a certain text to run slowly from right side screen to left side screen and rotate to repeat. How can i do that? Please help me ! hi, just extend View and do custom drawing using Handler that runs forever incrementing some xOffset that you will use in your onDraw method. pskink Thanks all, NPAK -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en