[android-developers] Re: How to parse html with saxparser (or other solution)
Now nekohtml is working very fine for me so i probably won't change :) But thank you for the link, it is a goldmine :) I found the documentation miss such snippets. On 2 jan, 23:03, jwei512 jwei...@gmail.com wrote: Another one you could try is HTML Cleaner (http:// htmlcleaner.sourceforge.net/). I've made a few applications already that references this library and it even supports XPATH to parse the HTML source If you'd like to see some code snippets then let me know and I can show you some. - jwei http://thinkandroid.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Conventions about using SD card
Thank you! I didn't know about two cards in Samsung. -- Best regards, Andriy. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: moved Code: managedQuery() / getContentResolver() NullPointerException
Oh, now I see what you meant by passing the parent activity.. no idea, why I didn't understand it first, guess I shouldn't program more than 6h without a break :D However, if anyone comes across the same problem as I did, just pass the activity to the class constructor like this: public class CPAddressbook implements IBasicContextProvider { Activity callingActivity; public CPAddressbook(Activity caller) { callingActivity = caller; } //so you can query like that: Cursor c = callingActivity.managedQuery(contactsURI, projection, where, whereArgs, orderBy); } Thanks a lot for your help Dmitri!! :) On Jan 3, 11:46 am, Flo flo.schw...@gmail.com wrote: Okay, so my suspicion was right! How can I achieve passing the parent activity to it? Does this involve Intents? Or should the CPAddressbook simply extend the parent activity? Thanks for your help so far, Flo. On 3 Jan., 02:17, Dmitri Plotnikov dplotni...@google.com wrote: Actually, no need for a stack trace. You are manually allocating an activity. This should never be done. It would be best to all the work in the activity allocated by the system. Of course you can delegate the work to a helper object like CPAddressbook, but you will need to pass the parent activity to it. Cheers, Dmitri On Saturday, January 2, 2010, Dmitri Plotnikov dplotni...@google.com wrote: Could you post the exception stack trace? Thank you, Dmitri On Saturday, January 2, 2010, Flo flo.schw...@gmail.com wrote: Hey there! I'm currently working on a component that's retrieving contact information and creating an RDF model (FOAF tbe) from the data provided. I started off with the HelloAndroid example and tried some code in there. Everything worked out fine, so I wanted to put everything in a seperate class which can be accessed via an interface. However, now I'm getting a NullPointer Exception when I want to call a managedQuery(). So I tried to create a ContentResolver in order to perform a query(). But as soon as I call the getContentResolver() I'm getting a NullPointer Exception as well. I think this could be a problem concerning the AndroidManifest.xml or lack of knowledge about how to handle Activities and the likes? I've been struggling with that for quite some hours now and think that I won't solve this on my own, so I'd like to get your opinions and ideas! However, here's my code: -- package com.example.helloandroid; import it.polimi.elet.contextaddict.microjena.rdf.model.Model; import it.polimi.elet.contextaddict.microjena.rdf.model.ModelFactory; import it.polimi.elet.contextaddict.microjena.rdf.model.Resource; import it.polimi.elet.contextaddict.microjena.vocabulary.RDF; import android.app.Activity; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract; public class CPAddressbook extends Activity implements IBasicContextProvider { Model contextModel; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); contextModel = ModelFactory.createDefaultModel(); } @Override public void detectContext(Model model) { Uri contactsURI = ContactsContract.Data.CONTENT_URI; String[] projection = new String[] { ContactsContract.Data._ID, ContactsContract.Data.CONTACT_ID, ContactsContract.Data.MIMETYPE, ContactsContract.Data.DATA1, ContactsContract.Data.DATA2, ContactsContract.Data.DATA3, ContactsContract.Data.DATA4, ContactsContract.Data.DATA5, ContactsContract.Data.DATA_VERSION }; String where = ContactsContract.Data.MIMETYPE + = ? OR + ContactsContract.Data.MIMETYPE + = ? OR + ContactsContract.Data.MIMETYPE + = ? OR + ContactsContract.Data.MIMETYPE + = ?; String[] whereArgs = new String[] { ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE, ContactsContr -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Regarding port re-directions on the android emulator.
Hello devs, I had the following query: The IP address of my development machine is 192.168.128.10. This machine is connected to a LAN. I wish to redirect all incoming packets on IP 192.168.128.10 and port 5060 to the emulator instance that runs on 10.0.2.15 For doing so, I have issued the following command: *redir add udp:5060:5060* Is this configuration sufficient ? Thanks in advance Best Regards Indodroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: com.android.camera replaced by com.motorola.camera
Thanks to all for this discussion :) And happy new year ! On 1 jan, 20:23, jotobjects jotobje...@gmail.com wrote: Thanks very much. This best practice outline is worthy of an official Android blog. Otherwise developers are going to come up with their own misunderstandings (like assuming the com.android.camera component will always be there - not a terribly unreasonable assumption although it violated the rule against depending on classes outside android.jar). Two followup questions about intent resolution - It is unclear to me why the browser was chosen (we don't know what URI was actually supplied). The API doc for android.content.Intent says where no explicit type is included in the Intent, instead the scheme of the intent data ... is considered. In this case the type WAS included. So is it correct to say the scheme would NOT be considered in the resolution? Second question: If there is more than on matching intent filter doesn't the platform put up a chooser automatically (seems like I saw that somewhere)? Happy New Year. On Dec 31 2009, 6:45 pm, Mark Murphy mmur...@commonsware.com wrote: jotobjects wrote: On Dec 30, 8:39 am, Mark Murphy mmur...@commonsware.com wrote: Mark Murphy wrote: The intent filter you are trying to match is: intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / data android:mimeType=video/* / /intent-filter Actually, to clarify: that's an intent filter for the built-in video player (out of the Camera app). One hopes that most devices have some app that supports a similar filter. What is the best way to find out how the intent should be configured? Magic 8-Ball. (Do I need an extra on this Intent? Signs point to no) :-) Is going to the source code for the camera app and looking at the manifest the best or only way? It's one starting point, to be certain. In this case, it's using a standard action (ACTION_VIEW) and a reasonable-looking MIME type. One would hope that there will be 1+ applications on the device that support viewing that MIME type. As it turns out, there are 2+ in Android proper, as the OP reported that the Browser handled the request, probably based on scheme. You'll note that ACTION_VIEW of video/mpeg is not documented in the SDK anywhere, at least that I can find. This means that it is possible that a given device may have 0 apps that can support it, if some future Android edition modifies or drops the intent filter, or if some OEM messes around too much. That's the reason for my tell the client there is no default video player answer from earlier today, because, technically, there *isn't* a default video player, at least not one that's part of the SDK contract. Would you still have to test every device to see if it works with the video viewer app on that device. That depends a bit on what you want to do and how you want to do it. Given an Intent, you can use methods on PackageManager to figure out if there is anything that would satisfy that Intent. So, if the feature is optional, you could use that to disable a menu choice or button or something, so the user couldn't attempt to use something that would fail. Similarly, you can use createChooser() to deal with the case of 2+ apps thinking they can handle the Intent (e.g., email or GMail or SMS or Twidroid for an ACTION_SEND of text/plain). If, however, the feature is mandatory (i.e., your app can't run without it), you're better served trying to handle it yourself, at least as a fallback option. For example, the OP could implement a simple video player using VideoView and only resort to using it on devices that fail to offer anything that can ACTION_VIEW a video/mpeg. Where things get icky is if there is some device or app that does support ACTION_VIEW of a video/mpeg URL, but its support is broken somehow. This is not significantly different than a desktop OS video player not necessarily having the right codecs to play back such-and-so video content, and there's no great answer for that case, either. Intents and MIME types are not significantly different concepts from their equivalents in desktop OSes. We think that Android should know how to play video because we see our desktops able to play video from a URL. However, at the same time, those of us who don't use Windows much are used to the notion that certain things can't readily be viewed (e.g., link to a Microsoft Access database), MIME type or not. Just as savvy developers try to make their desktop or Web applications deal with varying end user support for different MIME types, so should Android developers. Now, it would be really cool if Google stepped up and declared a more extensive list of Intent actions and Uri/MIME types that all Android devices should support. That would go a long way towards
Re: [android-developers] Regarding port re-directions on the android emulator.
Yes, that should be enough. Make sure that your doing this redirection on the correct emulator instance when you are running multiple emulator instances. Thanks, Upendra On Mon, Jan 4, 2010 at 2:20 PM, Android Development indodr...@gmail.comwrote: Hello devs, I had the following query: The IP address of my development machine is 192.168.128.10. This machine is connected to a LAN. I wish to redirect all incoming packets on IP 192.168.128.10 and port 5060 to the emulator instance that runs on 10.0.2.15 For doing so, I have issued the following command: *redir add udp:5060:5060* Is this configuration sufficient ? Thanks in advance Best Regards Indodroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Regards, Upendra -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 load compiled kernel into emulator?
Hi all, This is basic kind of question, Can we load our own compiled kernel into the emulator? If there is guide or steps for that please give me those links. Thanks for your help. -- Thanks Regards, Thisara. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Regarding port re-directions on the android emulator.
Thank you Upendra for the prompt reply. I will test this out now. Best Regards On Mon, Jan 4, 2010 at 2:30 PM, Upendra Chintala upendra.chint...@gmail.com wrote: Yes, that should be enough. Make sure that your doing this redirection on the correct emulator instance when you are running multiple emulator instances. Thanks, Upendra On Mon, Jan 4, 2010 at 2:20 PM, Android Development indodr...@gmail.comwrote: Hello devs, I had the following query: The IP address of my development machine is 192.168.128.10. This machine is connected to a LAN. I wish to redirect all incoming packets on IP 192.168.128.10 and port 5060 to the emulator instance that runs on 10.0.2.15 For doing so, I have issued the following command: *redir add udp:5060:5060* Is this configuration sufficient ? Thanks in advance Best Regards Indodroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Regards, Upendra -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Conventions about using SD card
On Sun, Jan 3, 2010 at 11:11 PM, Alessandro Pellizzari a...@amiran.itwrote: Please also consider devices with more than one SD card, like the Samsung Galaxy (/sdcard is the internal 6.5 GB flash, /sdcard/sd is the external removable SD card). In theory, your app should do nothing special about this. There is a public API to get the path the external storage; you should use that, and never hard-code paths. Currently the platform only supports one external storage location, so I would suggest using that and staying blissfully unaware of whatever other stuff Samsung does. Unless they provide their own well-defined API to their own storage paths (via a library your app can link to), or contribute a patch to the platform to support other kinds of external storage, you should treat whatever else they are doing as non-existent: you have no way to know if that will exist in the future in the current form or at all. If you need to store big chunks of data, you could let the user configure the path in which to save them. That's one of the things we really don't want applications doing. :} We try very hard to keep paths out of the UI for users; for some specific kinds of apps it can make sense to expose them (such as file browsers), but users should not be confronted with paths when dealing with normal applications. -- 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] What's the difference between these two urls
Could someone tell the difference between content://sms/inbox and content://sms/conversation? Thanx a lot!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need some advises about what if want to copy messages to sd card
I have read lots of threads about sms, but still have no idear what i should do if i want to copy messages to sd car. Could someone help? Thanks in advance! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to load compiled kernel into emulator?
yes, use the -kernel file option to do that. of course, the custom kernel should match the emulated hardware provided by the emulator (i.e. the virtual ARM platform goldfish). See external/qemu/docs/ANDROID-KERNEL.TXT for details On Mon, Jan 4, 2010 at 1:02 AM, Thisara Rupasinghe thisara...@gmail.comwrote: Hi all, This is basic kind of question, Can we load our own compiled kernel into the emulator? If there is guide or steps for that please give me those links. Thanks for your help. -- Thanks Regards, Thisara. -- You received this message because you are subscribed to the Google Groups android-platform group. To post to this group, send email to android-platf...@googlegroups.com. To unsubscribe from this group, send email to android-platform+unsubscr...@googlegroups.comandroid-platform%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/android-platform?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] Query in Google Map
I'm trying to run some apps using GoogleMaps. When I run app it's showing the message on the LogCat of the Eclipse's DDMS: Failed to find provider info for com.google.settings. I have set the two permissions in AndroidManifest also. 1. android.permission.INTERNET 2. android.permission.ACCESS_FINE_LOCATION Could anybody tell me what is the actual happening here? Thanks in Advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: passing paramters using ksoap2 to .net web service, always passes nulls (empty) values
Hi, Im having the same problem as yours. You have mentioned using http://tempuri.org is wrong. Can you please explain what u did to solve the problem. What is the correct namespace then?? Please help me on this. Im stucked on this. :( Thanx in advance.. On Dec 20 2009, 10:59 pm, fadi wedyan wedi...@gmail.com wrote: Hi, Thanks for your answer, I had solved the problem last night. I agree with that these steps are important. But there is also two other steps on the server side that I was not aware of, I think you had them set correctly (becouse your code is working). Beside following the steps you mentioned, we also need to change the namespace of the web services, usinghttp://tempuri.orgis wrong. Also, there is an option in the IE explorer that needs to be checked. The option allow access data source accros domains needs to be checked. Also, in order to pass data other than strings (float, integers,...), we need to implement a serliziation class for these data types and compile it with the library. Thanks for your kind reply, this was really a big headache! On Sat, Dec 19, 2009 at 7:07 AM, android09 pranav.jaja...@gmail.com wrote: Hi wedyan, I had also the same problem but finally i got the solution. I have some steps for you, just go through it. 1) Remove PropertyInfo from your code and add this like: SoapObject request = new SoapObject(NAMESPACE,METHOD_NAME_TEMP); // if you have 2 params in .net than add property this way. Suppose, sum of two integers instead of PropertyInfo request.addProperty(num, str1); request.addProperty(b, str2); 2) Use HttpTransportSE instead of AndroidHttpTransport. and add androidHttpTransport.setXmlVersionTag(?xml version=\1.0\ encoding= \UTF-8\?); 3) To Display Result: SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse (); System.out.println(resultString); txtView.setText(Result is : +resultString); Now, go through the above steps and also compare your application. I hope you will find the solution. Let's hope. Best Luck -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Obtaining video frames for processing
Hi, Any experienced developers to help me how to decode a video frame-by- frame. Is it possible through the MediaPlayer framework? Regards, Mohan On Dec 31 2009, 1:08 pm, mohan krk.mo...@gmail.com wrote: Hello, I am trying to decode and obtain all frames in a video stream, each of which would be processed by a native signal processing engine and re-encoded back to a MPEG4/MP4 file. I noticed that there was a getFrameAt() function in earlier versions of SDK but its not available in v 1.6 on which I am working. As I am fairly new to Android, I would like to know from more experienced people around here as to how I can extract video frames into a buffer for processing. Thanks Regards,Mohan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] [Solved] SDK and Linux 64 bits
Hi, I have installed Mandriva 2010 32 bits :-) Unfortunately 'adb' still had a problem but, it gave me some error messages this time. (all was OK on Mandriva 2009 !) So, I had to manually setup this file : /etc/udev/rules.d/50- android.rules SUBSYSTEM==usb|usb_device, SYSFS{idVendor}==0bb4, MODE=0660, GROUP=plugdev SUBSYSTEM==usb|usb_device, ATTR{idVendor}==0bb4, ATTR{idProduct} ==0c02, SYMLINK+=android_adb SUBSYSTEM==usb|usb_device, ATTR{idVendor}==0bb4, ATTR{idProduct} ==0c01, SYMLINK+=android_fastboot Mandriva 2010 64 bits and Android SDK are not yet compatibles :-( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] onContextMenuClosed() not called under 2.x?
Hi again, For the record of anyone else running into this, I've found a somewhat useful workaround: Just before calling openContextMenu() I now call closeContextMenu() - this seems to restore sanity. When things work as expected it has no effect at all (as expected), but when the user has pressed Back on a 2.0 device (read Milestone) previously this will ensure onContextMenuClosed() is called - later than expected, but better than nothing and at least the state is sane before the new menu occurs. Further advice appreciated. Maybe my case is somewhat on the edge since the View in question is a single fullscreen one (the map), but even so there should be symmetry IMHO - if onContextItemSelected() works, then so should onContextMenuClosed(), right? Best / Jonas Jonas Petersson wrote: Dear Experts, In one of my applications I programmatically open the context menu when something is clicked in my MapActivity overlay. This works perfectly under 1.x as well as on my 2.0 Milestone. I've used showContextMenuForChild() historically, but openContextMenu() does that same thing. As expected onCreateContextMenu() is called to build the menu and then onContextItemSelected() is called when something is selected. So far all is well. The odd thing is that under 1.x the onContextMenuClosed() method is called when I press the back key, but not so under 2.0. This confuses states for my app since I need to know whether menu is shown or not - or maybe there is a way to know this that I have not (yet) figured out... Is this a deliberate change or should I file it as a bug? Googling comes up pretty dry (stuff that is over a year old). Anyone with a 2.0.1 Droid that would care to test whether this has already been fixed? (The ETA for Milestone 2.0.1 seems hazy still, but it appears that at least one of my reported bugs has been fixed in 2.0.1 event though it isn't flagged as such.) Many thanks in advance / Jonas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: blocking UI thread when Yes/No AlertDialog is displayed
Thanks Dianne for your nice explanation. I have used synchronization point between two threads with a timeout value. Its smoothly working for me. Thanks Romain for pointing me to CounterDownLatch. On Sat, Jan 2, 2010 at 2:14 AM, Dianne Hackborn hack...@android.com wrote: On Thu, Dec 31, 2009 at 2:39 AM, swapnil kamble swap.kam...@gmail.comwrote: Have you used MessageBox.show() API in Windows ? If yes then you can understand it easily what I am saying. This is API is not really blocking the thread -- it is running a nested event loop, until the user responds to the dialog. This kind of behavior is very deliberately not implemented in Android because it results in poor application interaction behavior and edge cases, which is especially problematic in an environment like a cell phone when an application must be interruptible at any time. For example, if your application is sitting there blocking its main thread like this, and the user receives an incoming call or handles a notification, what do you think should happen? If we try to pause the activity while in this state to move on to the next thing, we will end up calling Activity.onPause() and all kinds of other questionable stuff while nested down inside of your app. Or if you have a broadcast receiver for, say, the device going to sleep, this code would end up being called from deep in your blocking method call. In all of these cases, it is unlikely for the application to really expect this to happen. These kinds of nested event loops are just bad news. PalmOS was the king example of the horror they cause, but even Windows suffers from it -- all those apps that get in weird unresponsive states while waiting on a dialog? MessageBox is often to blame. My strong suggestion: re-arrange your code to not do this kind of thing. You have some method that needs to get input from the user to return a response? Make that method async as well, to return its result in a callback, because if it needs to wait for the user then that is truly what it is. -- 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 -- ...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] يسعدنى ويشرفنى ا ن تنضم لأسرة منتدى اجدع اصحاب
يسعدنى ويشرفنى ان تنضم لأسرة منتدى اجدع اصحاب السلام عليكم يسعدنى ويشرفنى ان تنضم لأسرة منتدى اجدع اصحاب لتشارك معنا بالمواضيع والردود والمنتدى به افضل البرامج والألعاب ومواضيع واخرى كثيره منوعه المنتدى انشىء من اجلكم ونتمنى ان تكونوا متفاعلين معنا http://agd3as7ab.eb2a.com/vb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Avoiding String allocation in TextView.setText()
On 12/28/2009 07:09 PM, Olivier Guilyardi wrote: on Android 1.5, using the Allocation Tracker I see that every time I call TextView.setText() with a StringBuilder as first argument, a String gets allocated from the following call stack (first line is last call): java.lang.AbstractStringBuilder toString java.lang.StringBuilder toString android.text.TextUtils stringOrSpannedString android.widget.TextView setText I tried specifying the buffer type with setText(strBuilder, TextView.BufferType.NORMAL) but it doesn't change anything. Is there a way to avoid this allocation ? Answering to myself, for the records: the String allocation can be avoided by using the setText(char[] text, int start, int len) variant. -- Olivier -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Socket is leak when use server socket
Dear all, I create a server to listen request from peer. When client socket is connected, it will be leak after close socket. The fd will increase and finally the process may be killed due to too many fd. Does anyone know how to safely close the socket? The sample code is below. = package com.android.test.serversocket; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import android.app.Activity; import android.content.Context; import android.net.wifi.WifiManager; import android.os.Bundle; import android.util.Log; public class Test extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ServerSocketChannel mainSocket = null; InetAddress serverAddress = null; try { mainSocket = ServerSocketChannel.open(); mainSocket.configureBlocking(false); mainSocket.socket().setReuseAddress(true); mainSocket.socket().setSoTimeout(1000); String wifiIp = getWifiIpAsString(); serverAddress = InetAddress.getByName(wifiIp); mainSocket.socket().bind(new InetSocketAddress (serverAddress, 5002)); } catch (IOException e) { e.printStackTrace(); } while(mainSocket != null) { SocketChannel clientSocket; try { while((clientSocket = mainSocket.accept()) != null) { clientSocket.close(); clientSocket = null; System.gc(); } } catch(IOException e) { e.printStackTrace(); } try { System.gc(); Thread.sleep(1000); } catch(InterruptedException e) { e.printStackTrace(); } } } public int getWifiIpAsInt() { Context myContext = getApplicationContext(); if(myContext == null) { throw new NullPointerException(Global context is null); } WifiManager wifiMgr = (WifiManager)myContext .getSystemService (Context.WIFI_SERVICE); if(isWifiEnabled()) { return wifiMgr.getConnectionInfo().getIpAddress(); } else { return 0; } } public boolean isWifiEnabled() { Context myContext = getApplicationContext(); if(myContext == null) { throw new NullPointerException(Global context is null); } WifiManager wifiMgr = (WifiManager)myContext .getSystemService (Context.WIFI_SERVICE); if(wifiMgr.getWifiState() == WifiManager.WIFI_STATE_ENABLED) { return true; } else { return false; } } public String getWifiIpAsString() { int addr = getWifiIpAsInt(); if(addr != 0) { StringBuffer buf = new StringBuffer(); buf.append(addr 0xff).append('.'). append((addr = 8) 0xff).append('.'). append((addr = 8) 0xff).append('.'). append((addr = 8) 0xff); return buf.toString(); } else { return null; } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] create app that comes with a widget and the program
Hi there! I am trying to find a way to create a widget and the program on the same app so that i can give the user the choice to add to the home screen either the dynamic widget or the normal program, same functionality for both except that the widget would run a service to update every x hours and the program won't. Similar to what bbc news and weather bug have done... I am guessing that something needs to be added to the manifest but i have not found any documentation for it. Can anyone help on this?? Thanks Alberto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Initiating a GPRS connection
Hello, If I wish to initiate a GPRS data connection programatically through a configured access point on the device, how do I go about it ? Any ideas are appreciated. Thanks in advance Indodroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Menu Item Name
Hi, I added 2 menus. menu.add(0, 1, 0, Start); menu.add(0, 2, 0, Stop); public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case 1: if(item.getTitle().equals(Start)) { item.setTitle(Pause); } return true; case 2: return true; } return false; } when i click the stop menu, the start menu name should be changed. How to change that?... -- Thanks Regards Sasikumar.S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] يسعدنى ويشرفنى ا ن تنضم لأسرة منتدى اجدع اصحاب
يسعدنى ويشرفنى ان تنضم لأسرة منتدى اجدع اصحاب السلام عليكم يسعدنى ويشرفنى ان تنضم لأسرة منتدى اجدع اصحاب لتشارك معنا بالمواضيع والردود والمنتدى به افضل البرامج والألعاب ومواضيع واخرى كثيره منوعه المنتدى انشىء من اجلكم ونتمنى ان تكونوا متفاعلين معنا http://agd3as7ab.eb2a.com/vb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] AudioRecord callbacks
Hi, I am trying to develop an app which will consume data from mic. I have used AudioRecord for the same. To read the data from mic I am usingh a separate thread. I want to change this. Is there any way to register the callback to AudioRecord object so as to get notification when data has started coming. I went through setRecordPositionUpdateListener but the docs are not at all helpful and just adds to your frustration. 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] create app that comes with a widget and the program
I am trying to find a way to create a widget and the program on the same app so that i can give the user the choice to add to the home screen either the dynamic widget or the normal program, same functionality for both except that the widget would run a service to update every x hours and the program won't. Similar to what bbc news and weather bug have done... I am guessing that something needs to be added to the manifest but i have not found any documentation for it. Can anyone help on this?? I would hope most APKs with app widgets also have applications as well, or at least an icon in the launcher to allow you to configure the widget. You can see here an example of an app widget that also has an icon in the launcher: http://github.com/commonsguy/cw-advandroid/tree/master/AppWidget/TwitterWidget/ If that does not answer your question, could you be a bit more specific about what problems you are encountering? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Menu Item Name
I added 2 menus. menu.add(0, 1, 0, Start); menu.add(0, 2, 0, Stop); public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case 1: if(item.getTitle().equals(Start)) { item.setTitle(Pause); } return true; case 2: return true; } return false; } when i click the stop menu, the start menu name should be changed. How to change that?... The best answer, IMHO, is to override onPrepareOptionMenu() instead of onCreateOptionMenu(), so you get called every time the user pops up the menu. Then, build the menu with the caption/icons you want. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ERROR: Application requires API version 6. Device API version is 5 (Android 2.0)
I've a similar problem: [2010-01-04 13:44:18 - Tato]ERROR: Application requires API version 4. Device API version is 3 (Android 1.5). [2010-01-04 13:44:18 - Tato]Launch canceled! I started my application with API version 4, but then changed it to API version 3 (via project properties - Android). Eclipse doesn't give me any other errors other than that. Is there anything else where I have to make the change API 4 - 3 other than the project properties? Thanks On Dec 7 2009, 11:54 am, Dexter#39;s Brain coomar@gmail.com wrote: Hi, Your project should be compiled(API Version) with atleast equal to the Device API version. Else, you will not be able to install it. Suppose you have a device with version 4, then an apk to run on this device, it can be 1,2,3,4 but not greater than 4. Just go to your project properties, and change the application API. Thanks, Kumar Bibek http://tech-droid.blogspot.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] get the currently displayed activity's name using service
Hi, Is it possible to have the currently displayed activity's name and to access the resources the activity is using? I am trying to write the service that will display the name of the current activity and the resources it is using. Thanks in advance, Niraj -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: exclusion filter not being respected - resources are being included in apk
I've opened a bug report. guich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Logs from framework.jar
Yes, that did it! Thank you! What(where) sets classes to log to the radio buffer? /MS On Jan 2, 7:28 pm, jotobjects jotobje...@gmail.com wrote: try - logcat -b radio See adb settings here - http://developer.android.com/guide/developing/tools/adb.html#logcat On Jan 2, 10:24 am, jotobjects jotobje...@gmail.com wrote: Can you provide more detail about the scenario - what are you running on the device, what logging are you expecting, and how are you examining logcat? On Jan 2, 10:10 am, Michael Scott gebat.s...@gmail.com wrote: Anyone? On 29 Dec 2009, 19:29, Michael Scott gebat.s...@gmail.com wrote: Hi, Why does no logprints from theframework-code (Telephony) show up in logcat? Is there a setting somewhere I should turn on or something? Thanks, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] [Donut-1.6] Two onCreate (and onDestroy) invocations on orientation chage
Hello. With following simple code (on clean, new android project): public class RotationTest extends Activity { private static final String LOGTAG = RotationTest; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Log.d(LOGTAG, onCreate():); } @Override protected void onDestroy() { super.onDestroy(); Log.d(LOGTAG, onDestroy():); } } the onCreate/onDestroy pair is called twice when rotating from landscape - portrait on Android 1.6 emulator. Here is the snippet of LogCat (doing rotation to landscape and back to portrait): 01-04 14:05:35.895: DEBUG/RotationTest(704): onCreate(): 01-04 14:13:53.514: DEBUG/RotationTest(704): onDestroy(): 01-04 14:13:53.916: DEBUG/RotationTest(704): onCreate(): 01-04 14:14:02.035: DEBUG/RotationTest(704): onDestroy(): 01-04 14:14:02.604: DEBUG/RotationTest(704): onCreate(): 01-04 14:14:02.716: DEBUG/RotationTest(704): onDestroy(): 01-04 14:14:03.015: DEBUG/RotationTest(704): onCreate(): On the other hand, when running the application on the G1 phone, the problem does not occur, when the keyboard is slid (then the rotation changes). I've tried to find an open issue or a similar thread but I am yet unsuccessful. Could anyone give a pointer or a description of this behavior? Has anyone experienced it on Eclair or later(!) ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Blank screen displayed after downloading from Android Browser.
Does anyone have the solution for this? Regards Farida Khan On Wed, Dec 16, 2009 at 8:24 PM, Binu Geevarghese jackgeo...@gmail.comwrote: Hi all, We are developing an application that requires a download of a music file (mp3). We are using the Browser Activity for the same. The Browser Activity is invoked from the application and the download url is passed to it, like: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(downloadurl))); However, after downloading, on the download list page, if we press the Back button, a blank white screen is displayed. Only after we press the Back button a second time on this white screen, the application screen is displayed. This happens because the Browser Activity view is displayed before the actual downloading starts. This is an issue in the application flow. We need to manage the flow in such a way that the 'Back' key press on the download list view will take the control to the application screen instead of the white screen. We are unable to handle this scenario. Any suggestion will be highly helpful. Thanks in anticipation. Binu Geevarghese -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Blank screen displayed after downloading from Android Browser.
Why don't you try to download the music file by yourself? I mean, starting a thread and opening a HTTP connection to the music URL. In this way, your application will take control over the entire operation. Regards, Éderson On Mon, Jan 4, 2010 at 11:44 AM, Farida Khan mailfaridak...@gmail.comwrote: Does anyone have the solution for this? Regards Farida Khan On Wed, Dec 16, 2009 at 8:24 PM, Binu Geevarghese jackgeo...@gmail.comwrote: Hi all, We are developing an application that requires a download of a music file (mp3). We are using the Browser Activity for the same. The Browser Activity is invoked from the application and the download url is passed to it, like: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(downloadurl))); However, after downloading, on the download list page, if we press the Back button, a blank white screen is displayed. Only after we press the Back button a second time on this white screen, the application screen is displayed. This happens because the Browser Activity view is displayed before the actual downloading starts. This is an issue in the application flow. We need to manage the flow in such a way that the 'Back' key press on the download list view will take the control to the application screen instead of the white screen. We are unable to handle this scenario. Any suggestion will be highly helpful. Thanks in anticipation. Binu Geevarghese -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ERROR: Application requires API version 6. Device API version is 5 (Android 2.0)
Is there anything else where I have to make the change API 4 - 3 other than the project properties? Yes, the uses-sdk element in AndroidManifest.xml: http://developer.android.com/intl/zh-TW/guide/topics/manifest/uses-sdk-element.html Changing the build target in the project properties doesn't automatically update this. On Jan 4, 7:47 am, Stefan Klumpp stefan.klu...@gmail.com wrote: I've a similar problem: [2010-01-04 13:44:18 - Tato]ERROR: Application requires API version 4. Device API version is 3 (Android 1.5). [2010-01-04 13:44:18 - Tato]Launch canceled! I started my application with API version 4, but then changed it to API version 3 (via project properties - Android). Eclipse doesn't give me any other errors other than that. Is there anything else where I have to make the change API 4 - 3 other than the project properties? Thanks On Dec 7 2009, 11:54 am, Dexter#39;s Brain coomar@gmail.com wrote: Hi, Your project should be compiled(API Version) with atleast equal to the Device API version. Else, you will not be able to install it. Suppose you have a device with version 4, then an apk to run on this device, it can be 1,2,3,4 but not greater than 4. Just go to your project properties, and change the application API. Thanks, Kumar Bibek http://tech-droid.blogspot.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: Question concerning List view's getCheckedItemPositions() method
I just bumped into this problem myself. Looks like a bug, but maybe it's just undocumented and work as intended. Hopefully someone can clarify this... On Dec 9 2009, 10:23 am, cire pv.ra...@gmail.com wrote: Hi guys, I had the following scenario: -I'm using a list view in multiple choice mode to enable a user to delete several items he/she has checked, at once. -When the user clicks the delete button, i do the following; *get positions of checked items using: myList.getCheckedItemPositions (); *Get the items in this position and put them to a list - toDeleteList. **(QUESTION BASED ON THIS STEP) use myList.setItemChecked(position, false) to uncheck the list item. *Remove the items in the toDeleteList Now, i was forced to manually uncheck the list item because of this - if for example i delete the 1st item (a) of list [a, b, c, d], b will be checked after the delete ie. for list [b, c, d] - b will appear checked. Question is why? Because the SparseBooleanArray returned by myList.getCheckedItemPositions(); is the same before and after deleting from the list. I thought (i could be wrong) that after removing an item from the list via the adapter - the CheckedItemPositions array should also change to reflect the new state of the list eg. - for mylist = [a, b, c, d] - items at position 0 and 3 checked (a d) - the checked item positions (mylist.getCheckedItemPositions()) array has values true for positions 0 and 3 - If i remove a d from the list, therefore, mylist = [b,c], mylist.getCheckedItemPositions() is the same as above - doesn't change - positions 0 and 3 are checked. *I was expecting it not to be checked for positions 0 3 because the items at these positions are no longer in the list. So, i'm i getting something wrong here (or having the wrong expectations :) ) ? someone please clarify this.. Thanks in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Update Tab-Content when clicking Tab
Hi again, nobody has an idea? :( Regards On Jan 3, 4:02 pm, VBMichi michael.ka...@googlemail.com wrote: Hi, I've three Tabs: mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec(tab_1).setIndicator (Name1).setContent(R.id.tab1)); mTabHost.addTab(mTabHost.newTabSpec(tab_2).setIndicator (Name2).setContent(R.id.tab2)); mTabHost.addTab(mTabHost.newTabSpec(tab_3).setIndicator (Name3).setContent(R.id.tab3)); mTabHost.setCurrentTab(0); If the user click on tab_3, i want to call the function test(); . How can i set an onclicklistener on tab_3 or solve the problem on another way? Thanks and Regards, Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Update Tab-Content when clicking Tab
Hi again, nobody has an idea? :( See setOnTabChangedListener() on TabHost. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: New in android developement
On Jan 3, 10:54 pm, Neilz neilhorn...@googlemail.com wrote: Dear Rohit. When you have found your answers, please come back here and post them so we can all share in your new found knowledge. Thanx in advance... ;-) Q. Handler and Looper? Handler The most flexible means of making an Android-friendly background thread is to create an instance of a Handler subclass. You only need one Handler object per activity, and you do not need to manually register it or anything—merely creating the instance is sufficient to register it with the Android threading subsystem. Your background thread can communicate with the Handler, which will do all of its work on the activity’s UI thread. This is important because UI changes, such as updating widgets, should only occur on the activity’s UI thread. You have two options for communicating with the Handler: messages and Runnable objects. Messages To send a Message to a Handler, first invoke obtainMessage() to get the Message object out of the pool. There are a few flavors of obtainMessage(), allowing you to just create empty Message objects, or ones populated with message identifiers and arguments. The more complicated your Handler processing needs to be, the more likely it is you will need to put data into the Message to help the Handler distinguish different events. Then, you send the Message to the Handler via its message queue, using one of the following sendMessage...() family of methods: • sendMessage() puts the message on the queue immediately • sendMessageAtFrontOfQueue() puts the message on the queue immediately, and moreover puts it at the front of the message queue (versus the back, as is the default), so your message takes priority over all others • sendMessageAtTime() puts the message on the queue at the stated time, expressed in the form of milliseconds based on system uptime (SystemClock.uptimeMillis()) • sendMessageDelayed() puts the message on the queue after a delay, expressed in milliseconds. To process these messages, your Handler needs to implement handleMessage(), which will be called with each message that appears on the message queue. There, the handler can update the UI as needed. However, it should still do that work quickly, as other UI work is suspended until the Handler is done. Looper Getting tasks into a separate thread, then getting results back to the main UI thread is where the Handler, and related classes, come into play. When a Handler is created, it is associated with a Looper. A Looper is a class that contains a MessageQueue and processes Message or Runnable objects that are sent via the Handler. In the Handler usage. With this approach, the Handler is automatically associated with the Looper of the current running thread, typically the main UI thread. The main UI thread, which is created by the process of the running application, is an instance of a HandlerThread, which is basically an Android Thread specialization that provides a Looper. Q.. What is a ContentProvider? How to involve it from ContentResolver? Content Providers Any Uri in Android that begins with the content:// scheme represents a resource served up by a content provider. Content providers offer data encapsulation using Uri instances as handles you neither know nor care where the data represented by the Uri comes from, so long as it is available to you when needed. The data could be stored in a SQLite database, or in flat files, or retrieved off a device, or be stored on some far-off server accessed over the Internet. A shareable data store. Content Providers are used to manage and share application databases. Content Providers are the preferred way of sharing data across application boundaries. This means that you can configure your own Content Providers to permit access from other applications and use Content Providers exposed by others to access their stored data. Android devices include several native Content Providers that expose useful databases like contact information. Content Providers are a generic interface mechanism that lets you share data between applications. By abstracting away the underlying data source, Content Providers let you decouple your application layer from the data layer, making your applications data-source agnostic. Content Providers feature full permission control and are accessed using a simple URI model. Shared content can be queried for results as well as supporting write access. As a result, any application with the appropriate permissions can add, remove, and update data from any other applications — including some native Android databases. Many of the native databases have been made available as Content Providers, accessible by third-party applications. This means that your applications can have access to the phone’s Contact Manager, media player, and other native database once they’ve been granted permission. By publishing your own data sources as Content Providers, you make it possible for you (and other
[android-developers] Problem in accessing ConnectionManager.getAllNetworkInfo()
Hi guys, I am writing 1 application which has one service class. This service class uses ConnectionManager.getAllNetworkInfo() api to access network related info. But if I use this api i get error like 01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException: ConnectivityService: Neither user 10023 nor current process has android.permission.ACCESS_NETWORK_STATE. Declaration of Service in manifest is as follows service android:name=com.abc.xyz.MyService intent-filter action android:name=com.abc.xyz.IMyServiceListener / /intent-filter /service Also have included uses-permission android:name=android.permission.ACESS_NETWORK_STATE / in manifest. Tried using same permission tag in service tag but of no use. The way I am starting this service in activity is private void startService() { try { startService(new Intent(this, MyService.class)); bindService(new Intent(IMyServiceListener.class.getName()), mConnection, Context.BIND_AUTO_CREATE); } catch (Throwable th) { } } public IPushServiceListener mService = null; private ServiceConnection mConnection = new ServiceConnection() { //@override public void onServiceConnected(ComponentName className, IBinder service) { mService = IMyServiceListener.Stub.asInterface(service); } //@override public void onServiceDisconnected(ComponentName name) { mService = null; } }; Now the MyService class code where I am accessing ConnectionManager.getAllNetworkInfo() public static void IsConnectable() { ConnectivityManager cm = (ConnectivityManager) _instance.get ().getSystemService(CONNECTIVITY_SERVICE); //I am getting error here NetworkInfo infos[] = cm.getAllNetworkInfo(); for (NetworkInfo info : infos) { //TODO: any action can be taken; } } May be I am missing something here..Anybody knows what I am doing wrong? Or what else needs to add/remove in/from code to make it working? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problem in accessing ConnectionManager.getAllNetworkInfo()
I am writing 1 application which has one service class. This service class uses ConnectionManager.getAllNetworkInfo() api to access network related info. But if I use this api i get error like 01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException: ConnectivityService: Neither user 10023 nor current process has android.permission.ACCESS_NETWORK_STATE. snip Also have included uses-permission android:name=android.permission.ACESS_NETWORK_STATE / in manifest. There are two C's in ACCESS. Try adding the second C in your uses-permission element and see if that helps. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem in accessing ConnectionManager.getAllNetworkInfo()
I am writing 1 application which has one service class. This service class uses ConnectionManager.getAllNetworkInfo() api to access network related info. But if I use this api i get error like 01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException: ConnectivityService: Neither user 10023 nor current process has android.permission.ACCESS_NETWORK_STATE. Declaration of Service in manifest is as follows service android:name=com.abc.xyz.MyService intent-filter action android:name=com.abc.xyz.IMyServiceListener / /intent-filter /service Also have included uses-permission android:name=android.permission.ACESS_NETWORK_STATE / in manifest. Tried using same permission tag in service tag but of no use. The way I am starting this service in activity is private void startService() { try { startService(new Intent(this, MyService.class)); bindService(new Intent(IMyServiceListener.class.getName()), mConnection, Context.BIND_AUTO_CREATE); } catch (Throwable th) { } } public IMyServiceListener mService = null; private ServiceConnection mConnection = new ServiceConnection() { //@override public void onServiceConnected(ComponentName className, IBinder service) { mService = IMyServiceListener.Stub.asInterface(service); } //@override public void onServiceDisconnected(ComponentName name) { mService = null; } }; Now the MyService class code where I am accessing ConnectionManager.getAllNetworkInfo() public static void IsConnectable() { ConnectivityManager cm = (ConnectivityManager) _instance.get ().getSystemService(CONNECTIVITY_SERVICE); //I am getting error here NetworkInfo infos[] = cm.getAllNetworkInfo(); for (NetworkInfo info : infos) { //TODO: any action can be taken; } } May be I am missing something here..Anybody knows what I am doing wrong? Or what else needs to add/remove in/from code to make it working? Thanks in Advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem in accessing ConnectionManager.getAllNetworkInfo()
@Mark, it worked..thanks a lot..it was just a typo which i overlooked.. On Jan 4, 8:07 pm, Namrata puranik.namr...@gmail.com wrote: I am writing 1 application which has one service class. This service class uses ConnectionManager.getAllNetworkInfo() api to access network related info. But if I use this api i get error like 01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException: ConnectivityService: Neither user 10023 nor current process has android.permission.ACCESS_NETWORK_STATE. Declaration of Service in manifest is as follows service android:name=com.abc.xyz.MyService intent-filter action android:name=com.abc.xyz.IMyServiceListener / /intent-filter /service Also have included uses-permission android:name=android.permission.ACESS_NETWORK_STATE / in manifest. Tried using same permission tag in service tag but of no use. The way I am starting this service in activity is private void startService() { try { startService(new Intent(this, MyService.class)); bindService(new Intent(IMyServiceListener.class.getName()), mConnection, Context.BIND_AUTO_CREATE); } catch (Throwable th) { } } public IMyServiceListener mService = null; private ServiceConnection mConnection = new ServiceConnection() { //@override public void onServiceConnected(ComponentName className, IBinder service) { mService = IMyServiceListener.Stub.asInterface(service); } //@override public void onServiceDisconnected(ComponentName name) { mService = null; } }; Now the MyService class code where I am accessing ConnectionManager.getAllNetworkInfo() public static void IsConnectable() { ConnectivityManager cm = (ConnectivityManager) _instance.get ().getSystemService(CONNECTIVITY_SERVICE); //I am getting error here NetworkInfo infos[] = cm.getAllNetworkInfo(); for (NetworkInfo info : infos) { //TODO: any action can be taken; } } May be I am missing something here..Anybody knows what I am doing wrong? Or what else needs to add/remove in/from code to make it working? Thanks in Advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ERROR: Application requires API version 6. Device API version is 5 (Android 2.0)
Thanks. That helped. On Jan 4, 3:07 pm, Lance Nanek lna...@gmail.com wrote: Is there anything else where I have to make the change API 4 - 3 other than the project properties? Yes, the uses-sdk element in AndroidManifest.xml:http://developer.android.com/intl/zh-TW/guide/topics/manifest/uses-sd... Changing the build target in the project properties doesn't automatically update this. On Jan 4, 7:47 am, Stefan Klumpp stefan.klu...@gmail.com wrote: I've a similar problem: [2010-01-04 13:44:18 - Tato]ERROR: Application requires API version 4. Device API version is 3 (Android 1.5). [2010-01-04 13:44:18 - Tato]Launch canceled! I started my application with API version 4, but then changed it to API version 3 (via project properties - Android). Eclipse doesn't give me any other errors other than that. Is there anything else where I have to make the change API 4 - 3 other than the project properties? Thanks On Dec 7 2009, 11:54 am, Dexter#39;s Brain coomar@gmail.com wrote: Hi, Your project should be compiled(API Version) with atleast equal to the Device API version. Else, you will not be able to install it. Suppose you have a device with version 4, then an apk to run on this device, it can be 1,2,3,4 but not greater than 4. Just go to your project properties, and change the application API. Thanks, Kumar Bibek http://tech-droid.blogspot.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 and VOIP
On Jan 3, 10:12 pm, Android Development indodr...@gmail.com wrote: For SIP/VoIP, playing from a static resource on the device is hardly a requirement. Clarification: Static in the sense that it points to only a single provider. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: pass checkbox status between activities
Hi Mark, Can you give me an example? I have been looking for a sample app for better understanding. First Activity: send_to.java Second Activity: contact_list.java Step #1: In send_to.java, on Button Press, Intent newIntent = new Intent(v, contact_list.class); startActivityForResult(newIntent, 0); Step #2: In contact_list.java class, ListView items with checkboxes, and two buttons OK and CANCEL. When OK button is pressed, pass the names of ListView items that are checked, to the first activity (send_to.java) setResult(RESULT_OK, Intent data); How do I bundle the checkbox status to the Intent data? Step #3: Back in the calling activity, send_to.java, I need to override onActivityResult(int requestCode, int resultCode, Intent data). Is this correct? Thanks, Abhi On Jan 3, 8:57 pm, Mark Murphy mmur...@commonsware.com wrote: How can we pass checked box status from one activity to the calling activity? For e.g., I have two activities. The first activity calls the second activity that has a listview with checkboxed items and two buttons, 'OK' and 'CANCEL'. The second activity has to pass the names of list items that are checked to the calling acitivity. I am not able to figure out how to do this efficiently? Step #1: Have the first activity use startActivityForResult() to invoke the second activity Step #2: Have the second activity call setResult() after the user makes her selections, encoding the various bits of information in the Intent supplied to setResult() (e.g., as extras) Step #3: Have the first activity override onActivityResult() to get the Intent created in Step #2. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml
I have a problem using Android SDK Updater (revision 4). For the record I'm under win xp 32-bits, jdk 1.6. I set up the Force https://... sources to be fetched using http:// This seemed to work fine but as I am behing a (corporate) proxy I also filled the proxy server and port settings, however this proxy requires a user/password and I can't find a way to give Android Updater a proxy authentication as no authentication box pops up when I try downloading updates and I have a response code: 407 for URL: http://dl-ssl.google.com/android/repository/repository.xml; when refreshing sources. If someone can help... Teryz. On 4 déc 2009, 09:30, Cédric Berger cedric.berge...@gmail.com wrote: 2009/10/29 Cédric Berger cedric.berge...@gmail.com: 2009/10/29 Cédric Berger cedric.berge...@gmail.com: I can't download through a proxy requiring authentication. I had to select force http, and put user/password for proxy in JVM command line. This way I can get the list of available updates. But when trying to download, it stays stuck (looks like it waits for user/password, but no prompt). Oh in fact it is ok. Through a second proxy (with authentication too) it worked. Looks like the first proxy (a bit more restrictive) blocked the downloading url. (I could not check why since the URL is not shown) What is the download URL ? Because I still have problems with the proxy I use. I can download updates metadata, but when trying to install, it hangs. I suspect the proxy blocks the download URL (but nothttp://dl-ssl.google.com/android/repository/repository.xml)... how can I check what this download url is (so I could ask for correction in the proxy rules) ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: pass checkbox status between activities
Step #2: In contact_list.java class, ListView items with checkboxes, and two buttons OK and CANCEL. When OK button is pressed, pass the names of ListView items that are checked, to the first activity (send_to.java) setResult(RESULT_OK, Intent data); How do I bundle the checkbox status to the Intent data? Try something like: Intent stuffToReturn=new Intent(); stuffToReturn.putExtra(someKey, someValue); stuffToReturn.putExtra(someOtherKey, someOtherValue); // lather, rinse, repeat setResult(RESULT_OK, stuffToReturn); Step #3: Back in the calling activity, send_to.java, I need to override onActivityResult(int requestCode, int resultCode, Intent data). Is this correct? Yes. You can see an example of that here: http://github.com/commonsguy/cw-android/tree/master/Rotation/RotationOne/ -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] regex error with splitting strings
Two things: 1) Not positive, but you might be missing delimiters, which would turn that into .split(/+/), which would still be wrong 2) + is a regex special character, meaning 1 or more, you want to escape it as a literal: .split(/\+/) Again, not sure if you need the delimiters... - Dan On Sun, Jan 3, 2010 at 6:24 PM, Curran thecurra...@googlemail.com wrote: I am currently trying to split a string of a mathematical function, which I am currently respresenting as: 4x2+3x4 (which means 4x^2 + 3x^4) and I need to split it into the individual terms, 4x2 and 3x4. Using a string.split(+) method I get the error: Syntax Error: U_REGEX_RULE_SYNTAX near index 1: + how can I prevent this error occurring? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] No Adobe Flash support for Eclair!?!
Thank you Dianne Thanks for the information on Flash. It gave me the direction I needed and it is good to know where Flash and Android stand. In another year or two who knows right? I been studying the Lunar Lander example as far as the graphics and it looks like a good way to go and I started a new design for my application. Thank you for taking the time to answer my questions. I hope you a good holiday. -Chris On Sun, Jan 3, 2010 at 6:06 PM, Dianne Hackborn hack...@android.com wrote: On Tue, Dec 29, 2009 at 5:42 PM, chris harper ch393...@gmail.com wrote: So what you are saying is that Android development doesn't really want developers building applications that use Flash? Only a few phones have Flash at this point so, no, I would not suggest using it. Longer term... well, it would be problematic for this to become a standard part of the Android SDK. Given that flash is proprietary, that would leave us with the platform becoming dependent on someone else's proprietary code in order to support these apps. This is very counter to a basic philosophy of Android, that the entire platform is open-source and thus you don't need to someone's proprietary code to build an android compatible device. (And to head off the inevitable cries about not really being open-source -- yes there are bits and pieces that are not open source, such as hardware drivers and applications like Market. This is a far cry from baking dependencies on non-open-source code into the standard APIs, though.) But it now sounds like if anyone wants to develop an Android app that uses Flash it'll be more of a gamble and might not work for most devices or at the least be a hassle for the end user to make it work because they would have to install Flash plugins. I can't tell you what devices Flash may or may not be available on, because it is owned by Adobe. Clearly they have a self-interest in getting it as widely spread as possible, but from the perspective of the platform we can't make any guarantees about who can include it on a device, the kinds of hardware it can run on, and how well it would perform. And that is one of the big rubs. It is kind of disappointing because if Android and Adobe can get together and start supporting development of applications that use Flash then that would be an Ace in the hole for making Android apps far better than the IPhone. The first step for having some technology adopted for the standard Android platform is to make it available under an open-source license that is compatible with the rest of the platform. Somehow, I don't see this happening for Flash. :} -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Earnings For u!!! Gifted
Wanted Internet job workers. You can earn $750- $1000 daily. These are genuine Internet jobs. Only serious enquires please. For more details visit : https://time2rich.com/jayavithya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AudioTrack - Clicking Sound
After, repeated effort at sound synthesis I have decided to go back to pre=generated sounds. It's much too computationally expensive. My question is; does AudioTrack use pure pcm of it uses wave. I have this clicking sound and I think it's because I am using wave and the wave is pcm plus same header data. Maybe this header causes the clicking sound. On Dec 15 2009, 6:01 pm, MarkNZ mbutler...@gmail.com wrote: Do you need to use files? I have been generating audio at run time using the java math sine function to create an array of short, then playing it with audio track. Perfomance has been fine, I have been testing on an HTC tattoo. The only problem I have found is when I record the the data being played, write it to SD card and plot it in MATLAB, There is a large DC offset that decays quickly at the start of playback. I'm still trying to figure out the cause of it however this may not bother you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] setFocusableInTouchMode(false) AND Keyboard ??
Hi, I use: webview.setFocusableInTouchMode(false); for my WebView to avoid that Orange Border when I click a Link. But now when I click into a Formfield the virtual Keyboard does not open :( So how can I avoid that Orange Border around Links while clicking on them and at the same Time the Virtual Keyboard appears when clicking into a Form Field? Thx Chris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Create an .apk progamatically
Hi! The problem is this: I make an internet connection to some url and receive an HttpResponse with an app_example.apk. Then I want to create a file (an .apk) in the sdcard with this data so that this downloaded application can be installed later. How can I convert the HttpResponse to an .apk file? Thank you all -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Two onCreate (and onDestroy) invocations on orientation chage
It's not just 1.6. the higher versions do the same. It looks like rotation does more than just updetes the UI. I also failed to find any reference to this problem. On Jan 4, 8:16 am, Pawel Kapala pawel.kap...@googlemail.com wrote: Hello. With following simple code (on clean, new android project): public class RotationTest extends Activity { private static final String LOGTAG = RotationTest; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Log.d(LOGTAG, onCreate():); } @Override protected void onDestroy() { super.onDestroy(); Log.d(LOGTAG, onDestroy():); } } the onCreate/onDestroy pair is called twice when rotating from landscape - portrait on Android 1.6 emulator. Here is the snippet of LogCat (doing rotation to landscape and back to portrait): 01-04 14:05:35.895: DEBUG/RotationTest(704): onCreate(): 01-04 14:13:53.514: DEBUG/RotationTest(704): onDestroy(): 01-04 14:13:53.916: DEBUG/RotationTest(704): onCreate(): 01-04 14:14:02.035: DEBUG/RotationTest(704): onDestroy(): 01-04 14:14:02.604: DEBUG/RotationTest(704): onCreate(): 01-04 14:14:02.716: DEBUG/RotationTest(704): onDestroy(): 01-04 14:14:03.015: DEBUG/RotationTest(704): onCreate(): On the other hand, when running the application on the G1 phone, the problem does not occur, when the keyboard is slid (then the rotation changes). I've tried to find an open issue or a similar thread but I am yet unsuccessful. Could anyone give a pointer or a description of this behavior? Has anyone experienced it on Eclair or later(!) ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: create app that comes with a widget and the program
Thanks Mark for your answer, maybe I didn't make myself very clear, the widget is the application, when added to home screen it launches a configuration activity to let the user set his/her preferences, after that's done it will run a service updating the widget. If you click the widget you will go to the actual app and do stuff with it... The thing is that I also want the user to be able to choose between adding having the widget feature on the home screen(by menu/add/ widgets/theAppAsWidget... ) or just the static app(by menu/add/ shortcut/program/theApp... ), maybe they have enough services running on the backgroung and do not want another as it will use more battery. I have seen this used on many apps and I thing is good to implemented as battery life on these phones is not great. Thanks again Alberto PD: By the way I have read your book(the advance) and is really good, are you publishing a new one soon? :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Loading entire Asset folder
No one has any ideas about this? On Jan 2, 10:50 am, Andrew Huff 702reco...@gmail.com wrote: Also I've been thinking something like ContentProvider or PackageManager would be useful for doing this but I'm not exactly sure the best way to implement this On Jan 2, 10:48 am, Andrew Huff 702reco...@gmail.com wrote: I have been trying to figure this out for some time now. Is there any way to load the entire Assets folder instead of having to code it for every single item? Also, once the images are read, is there a way to have another app (already installed on the device) grab that data? The intent is declared in the manifest and on it's own with the items in the res/ drawable it works fine but to have more then one option I'm using the assets folder with subdirectories. The user choses an option, that directory loads through another app already installed, if that makes sense. Basically, App1 is installed on the phone already. App2 to is downloaded and installed. Info in the assets folder of App2 is read, App1 gets the call to load the info from App2. App1 is already set up for listening so in App2 the intent is there for App1 to hear. The problem I'm having is seemingly getting the info loaded for App1 to use. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can someone with a Motorola Droid call AccountManager.getAccounts() please?
Any update on this one? Does it work again? How do you it fails? I think I am in a similar situation. I get back an auth token, but when using it accessing the Google Reader API it is not accepted. On Jan 4, 12:10 am, polyclefsoftware dja...@gmail.com wrote: I'm about to tear my hair out. The authToken I was getting from AccountManager was working fine before I went away for the holidays. I get back home and start back into development and now the authToken I get from the following code is no longer valid when requesting a cookie: AccountManager mgr = AccountManager.get(this); Account[] accts = mgr.getAccountsByType(com.google); Account acct = accts[0]; AccountManagerFutureBundle accountManagerFuture = mgr.getAuthToken (acct, ah, null, this, null, null); Bundle authTokenBundle = accountManagerFuture.getResult(); String authToken = authTokenBundle.get (AccountManager.KEY_AUTHTOKEN).toString(); When I went back and hard-coded in my Google username and password and got an authToken from https://www.google.com/accounts/ClientLogin;, it worked just fine. So as far as I can tell something happened over the past week that rendered the authToken acquired from an Android phone using the AccountManager API to longer authenticate properly, at least with Google App Engine. Is anyone else actually using the new API for authentication? Is anyone else having problems? Can anyone else confirm this behavior? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Dev Phone with Verizon?
I remember reading a hack somewhere a long time ago to enable the phones on verizon, but honestly if you are going to spend that much money on buying a dev phone, might as well save up an extra 100 bucks and buy yourself a droid if you are going with verizon. On Jan 4, 1:07 pm, to...@webpro.com to...@webpro.com wrote: I know the dev phones are sim unlocked will they also work with non sim carriers like verizon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Android Dev Phone with Verizon?
Ok, how would I be able to install my apps on the non dev phone? Is there a crack kind of like jail breaking and iPhone or would I need to upload it to the android market place and install it that way? Respectfully, Tommy Hartz | DBA WEBPRO the web people ™ Savannah GA. - 912.988.3065 | Charlotte NC. - 704.814.7277 | Toll 888.999.4887 *** CONFIDENTIALITY: The information contained in this email communication, including any attached documents or information, is confidential and may contain proprietary information or legally privileged information. This email communication is intended solely for use of the named addressee. The intended recipient may not use, copy, distribute, forward or otherwise disseminate any part of this email communication except as expressly permitted by WEBPRO International Inc. If the reader of this email communication is not the intended recipient, you are hereby notified that the use, copying, distribution, forwarding or other dissemination of any part of this communication is strictly prohibited. If you have received this email communication in error, please immediately notify us by calling 888-999-4887 or an e-mail message addressed to the following: mailto:le...@webpro.com *** -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of schwiz Sent: Monday, January 04, 2010 2:20 PM To: Android Developers Subject: [android-developers] Re: Android Dev Phone with Verizon? I remember reading a hack somewhere a long time ago to enable the phones on verizon, but honestly if you are going to spend that much money on buying a dev phone, might as well save up an extra 100 bucks and buy yourself a droid if you are going with verizon. On Jan 4, 1:07 pm, to...@webpro.com to...@webpro.com wrote: I know the dev phones are sim unlocked will they also work with non sim carriers like verizon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] how can i save my overlays?
Hello, I have following problem with my application: in my main activity, i listen for gps points and show them on my map. if i want to describe a important point, i open a second activity with a EditText and i can save the description and finish this second activity (to write text, i change to landscape mode). when i return to the main activity, the overlay isnt display any more. My main activity has the android:screenOrientation=portrait attribute. I have implement the onSaveInstanceState()-Method, but how can i save the overlay (list)?? Must I implement a Parcelable Objekt?? Thanks, Stefan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Dev Phone with Verizon?
Any phone can work as a dev phone. It doesn't need to be unlocked or rooted or anything. You just have to enable a few things in the phone settings. There is nothing special about the Google dev phones, they are just phones you can buy directly from Google if you don't feel like buying one from a cell service provider. And as to your original question, a GMS phone (phone that uses a SIM card) can not and will not ever work on Sprint or Verizon. The guy saying there is some hack to make that work is incorrect. On Jan 4, 2:35 pm, Tommy Hartz to...@webpro.com wrote: Ok, how would I be able to install my apps on the non dev phone? Is there a crack kind of like jail breaking and iPhone or would I need to upload it to the android market place and install it that way? Respectfully, Tommy Hartz | DBA WEBPRO the web people ™ Savannah GA. - 912.988.3065 | Charlotte NC. - 704.814.7277 | Toll 888.999.4887 *** CONFIDENTIALITY: The information contained in this email communication, including any attached documents or information, is confidential and may contain proprietary information or legally privileged information. This email communication is intended solely for use of the named addressee. The intended recipient may not use, copy, distribute, forward or otherwise disseminate any part of this email communication except as expressly permitted by WEBPRO International Inc. If the reader of this email communication is not the intended recipient, you are hereby notified that the use, copying, distribution, forwarding or other dissemination of any part of this communication is strictly prohibited. If you have received this email communication in error, please immediately notify us by calling 888-999-4887 or an e-mail message addressed to the following: mailto:le...@webpro.com *** -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of schwiz Sent: Monday, January 04, 2010 2:20 PM To: Android Developers Subject: [android-developers] Re: Android Dev Phone with Verizon? I remember reading a hack somewhere a long time ago to enable the phones on verizon, but honestly if you are going to spend that much money on buying a dev phone, might as well save up an extra 100 bucks and buy yourself a droid if you are going with verizon. On Jan 4, 1:07 pm, to...@webpro.com to...@webpro.com wrote: I know the dev phones are sim unlocked will they also work with non sim carriers like verizon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Dev Phone with Verizon?
You wiil be able to install your apps on non dev phone OTA or over USB without issues. On Jan 4, 9:35 pm, Tommy Hartz to...@webpro.com wrote: Ok, how would I be able to install my apps on the non dev phone? Is there a crack kind of like jail breaking and iPhone or would I need to upload it to the android market place and install it that way? Respectfully, Tommy Hartz | DBA WEBPRO the web people ™ Savannah GA. - 912.988.3065 | Charlotte NC. - 704.814.7277 | Toll 888.999.4887 *** CONFIDENTIALITY: The information contained in this email communication, including any attached documents or information, is confidential and may contain proprietary information or legally privileged information. This email communication is intended solely for use of the named addressee. The intended recipient may not use, copy, distribute, forward or otherwise disseminate any part of this email communication except as expressly permitted by WEBPRO International Inc. If the reader of this email communication is not the intended recipient, you are hereby notified that the use, copying, distribution, forwarding or other dissemination of any part of this communication is strictly prohibited. If you have received this email communication in error, please immediately notify us by calling 888-999-4887 or an e-mail message addressed to the following: mailto:le...@webpro.com *** -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of schwiz Sent: Monday, January 04, 2010 2:20 PM To: Android Developers Subject: [android-developers] Re: Android Dev Phone with Verizon? I remember reading a hack somewhere a long time ago to enable the phones on verizon, but honestly if you are going to spend that much money on buying a dev phone, might as well save up an extra 100 bucks and buy yourself a droid if you are going with verizon. On Jan 4, 1:07 pm, to...@webpro.com to...@webpro.com wrote: I know the dev phones are sim unlocked will they also work with non sim carriers like verizon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Re: Android Dev Phone with Verizon?
Thank you for you advice. I'll just go with Verizon for the company dev phone. Respectfully, Tommy Hartz | DBA WEBPRO the web people ™ Savannah GA. - 912.988.3065 | Charlotte NC. - 704.814.7277 | Toll 888.999.4887 *** CONFIDENTIALITY: The information contained in this email communication, including any attached documents or information, is confidential and may contain proprietary information or legally privileged information. This email communication is intended solely for use of the named addressee. The intended recipient may not use, copy, distribute, forward or otherwise disseminate any part of this email communication except as expressly permitted by WEBPRO International Inc. If the reader of this email communication is not the intended recipient, you are hereby notified that the use, copying, distribution, forwarding or other dissemination of any part of this communication is strictly prohibited. If you have received this email communication in error, please immediately notify us by calling 888-999-4887 or an e-mail message addressed to the following: mailto:le...@webpro.com *** -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Sent: Monday, January 04, 2010 2:45 PM To: Android Developers Subject: [android-developers] Re: Android Dev Phone with Verizon? Any phone can work as a dev phone. It doesn't need to be unlocked or rooted or anything. You just have to enable a few things in the phone settings. There is nothing special about the Google dev phones, they are just phones you can buy directly from Google if you don't feel like buying one from a cell service provider. And as to your original question, a GMS phone (phone that uses a SIM card) can not and will not ever work on Sprint or Verizon. The guy saying there is some hack to make that work is incorrect. On Jan 4, 2:35 pm, Tommy Hartz to...@webpro.com wrote: Ok, how would I be able to install my apps on the non dev phone? Is there a crack kind of like jail breaking and iPhone or would I need to upload it to the android market place and install it that way? Respectfully, Tommy Hartz | DBA WEBPRO the web people ™ Savannah GA. - 912.988.3065 | Charlotte NC. - 704.814.7277 | Toll 888.999.4887 *** CONFIDENTIALITY: The information contained in this email communication, including any attached documents or information, is confidential and may contain proprietary information or legally privileged information. This email communication is intended solely for use of the named addressee. The intended recipient may not use, copy, distribute, forward or otherwise disseminate any part of this email communication except as expressly permitted by WEBPRO International Inc. If the reader of this email communication is not the intended recipient, you are hereby notified that the use, copying, distribution, forwarding or other dissemination of any part of this communication is strictly prohibited. If you have received this email communication in error, please immediately notify us by calling 888-999-4887 or an e-mail message addressed to the following: mailto:le...@webpro.com *** -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of schwiz Sent: Monday, January 04, 2010 2:20 PM To: Android Developers Subject: [android-developers] Re: Android Dev Phone with Verizon? I remember reading a hack somewhere a long time ago to enable the phones on verizon, but honestly if you are going to spend that much money on buying a dev phone, might as well save up an extra 100 bucks and buy yourself a droid if you are going with verizon. On Jan 4, 1:07 pm, to...@webpro.com to...@webpro.com wrote: I know the dev phones are sim unlocked will they also work with non sim carriers like verizon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to
RE: [android-developers] Re: Android Dev Phone with Verizon?
Wonderful, I'll look around in the help files online and figure out settings need to be adjusted. Thanks again for the help Respectfully, Tommy Hartz | DBA WEBPRO the web people ™ Savannah GA. - 912.988.3065 | Charlotte NC. - 704.814.7277 | Toll 888.999.4887 *** CONFIDENTIALITY: The information contained in this email communication, including any attached documents or information, is confidential and may contain proprietary information or legally privileged information. This email communication is intended solely for use of the named addressee. The intended recipient may not use, copy, distribute, forward or otherwise disseminate any part of this email communication except as expressly permitted by WEBPRO International Inc. If the reader of this email communication is not the intended recipient, you are hereby notified that the use, copying, distribution, forwarding or other dissemination of any part of this communication is strictly prohibited. If you have received this email communication in error, please immediately notify us by calling 888-999-4887 or an e-mail message addressed to the following: mailto:le...@webpro.com *** -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Vladimir Sent: Monday, January 04, 2010 2:48 PM To: Android Developers Subject: [android-developers] Re: Android Dev Phone with Verizon? You wiil be able to install your apps on non dev phone OTA or over USB without issues. On Jan 4, 9:35 pm, Tommy Hartz to...@webpro.com wrote: Ok, how would I be able to install my apps on the non dev phone? Is there a crack kind of like jail breaking and iPhone or would I need to upload it to the android market place and install it that way? Respectfully, Tommy Hartz | DBA WEBPRO the web people ™ Savannah GA. - 912.988.3065 | Charlotte NC. - 704.814.7277 | Toll 888.999.4887 *** CONFIDENTIALITY: The information contained in this email communication, including any attached documents or information, is confidential and may contain proprietary information or legally privileged information. This email communication is intended solely for use of the named addressee. The intended recipient may not use, copy, distribute, forward or otherwise disseminate any part of this email communication except as expressly permitted by WEBPRO International Inc. If the reader of this email communication is not the intended recipient, you are hereby notified that the use, copying, distribution, forwarding or other dissemination of any part of this communication is strictly prohibited. If you have received this email communication in error, please immediately notify us by calling 888-999-4887 or an e-mail message addressed to the following: mailto:le...@webpro.com *** -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of schwiz Sent: Monday, January 04, 2010 2:20 PM To: Android Developers Subject: [android-developers] Re: Android Dev Phone with Verizon? I remember reading a hack somewhere a long time ago to enable the phones on verizon, but honestly if you are going to spend that much money on buying a dev phone, might as well save up an extra 100 bucks and buy yourself a droid if you are going with verizon. On Jan 4, 1:07 pm, to...@webpro.com to...@webpro.com wrote: I know the dev phones are sim unlocked will they also work with non sim carriers like verizon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Question about reflection
On Jan 2, 5:02 pm, Frank Weiss fewe...@gmail.com wrote: For your first issue, can you refactor to use singleton Factory instead and make the factory methods non-static? Example: MyFactory factory = MySubclassedFactory.getInstance(); MyWidget = factory.createMyWidget(); This and the Builder pattern suggestion are the right way to think about the design. But you still have to implement a new method to create a subclass of MyWidget and/or cast the return to MySubclassWidget. This is also true with the Builder pattern (if you want to operate on an instance of the subclass of pizza per the Wikipedia example). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] About Monkey Scripting option
Hi I would like to tell every body that it is possible to simulate a sequence of events on emulator using monkey scripting option -f . It is successful on android 2.0 sdk Regards, Pradeep -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Does Android support IPv6 now?
On 31 Des 2009, 05:46, mundou wentaosh...@gmail.com wrote: I don't know if real Android system can support IPv6 protocol stack. I compiled my own kernel with IPv6 configured as build-in and then tested it under the emulator in SDK, and it could not get an IPv6 address. I got No IPv6 router present in dmesg. I think it may be the emulator's fault. Has anyone ever tested IPv6 in a real Android device? Hi, Android supports IPv6 out of the box since Donuts (1.6), IIRC -- you can browse IPv6 sites from the browser, and write applications that connect to IPv6 hosts. No DHCPv6 or RDNS support, though, so nameserver information will still need to come from regular DHCP. /* Steinar */ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use speex or jspeex in android
Hi, please can anybody help me how use speex or jspeex in android? I need stream voice from MIC on server and use this codec. THX Petr -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Emulator error after upgrade to win7
I have the same issue Mark. Did you figure out a solution? On Dec 9 2009, 8:23 pm, mh haye...@gmail.com wrote: After reinstalling Eclipse and the Android development components I am getting the following error upon running the emulator on a virtual device: qemu: fatal: exponent 255 too big R00=0002 R01=e118 R02=fe005000 R03=2209 R04=c594bfa0 R05=c5863e94 R06=c5863e5c R07=c5863e5c R08=c5863e94 R09= R10= R11=c5863e0c R12=0009 R13=c5863df8 R14=c018786c R15=c0187614 PSR=6013 -ZC- A svc32 I suspect that some configuration file in the project is hosed but cannot figure out which. Ideas are ever appreciated. Thanks Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 development with PHP
Is it possible create android applications using PHP? can we port php code in to the android applications? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Audio Playback Error
I've written an app. that uses the MediaPlayer, but every so often I see this error: ERROR/AudioMIO(3733): latency could NOT be set !! set it later When it happens, the audio goes silent and the only way to get the audio back is to stop and restart (release and create a new MediaPlayer instance). This error shows up in the logcat, but is not reported to the onErrorListener handler I've registered with the the MediaPlayer. Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Reliable GPS location
Hi, i know how to get the calculated GPS position via getLastKnownLocation (). As tests show, this function really always returns the last known location, so it doesn't matter if there is a gps fix available. How can i check if the returned location is reliable? I tried it with getAccurracy(), but this function even returns a accurracy although no gps fix is availavle (anymore). Is there a possibility to get gps dop values? Used SDK is 1.6, thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] scrollview resize when childview is scaled with animation
hi android-devs, here what iam trying to do in my android 1.6 app. 1. have a view (e.g. imageview) in a (horizontal)scrollview because my image is big. 2. adapted a zoombuttoncontroller to the scrollview to be able to zoom in and out using the zoomcontrol view capabilities. 3. to zoom the child view in the scrollview i run a scale animation on the childview like scaleup and scaledown, if it not only an imageview all the relatedchildviews will also be affacted which is might be needed. and here what works. 1. the big image can be scrolled fine and the zoomcontrol appears on my implemented touchevent 2. the scale animation happens smooth and simple on zoomcontrol click and stays because of fillAfter=true 3. tried with imageview itself but also with absolutelayout with other overlapping views and works fine but now my problem. the scale of the childview does not affect the scrollview. it stays on its initial size/range. so if i scaledown the scrollview shows me the empty space because of the shrinking. and in case of scaleup the scrollview is not handling the bigger childview and the full content can not be shown. plz help. seems that either the childview is not recognizing the new scaled size or the scrollview is not informed that its childsize has changed. is there a way how the views get updated correctly so that the scrolling only happens in the changed sizes? tried requestLayout() on the views but does not work. how is it possible to say the scrollview that its childsize was update?? thx,n,regards marc -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Debugging the framework
Hi, I did the following: Modified frameworks/base/services/java/com/android/server/ KeyInputQueue.java and flashed it to my G1. Rebuilt Deployed to the G1 Created a demo test app Started debugging the demo app from Eclipse with one breakpoint in a central location in KeyInputQueue.java and another in my main activity in the demo app. The debugger stops at the breakpoint located in the activity but doesn't stop in KeyInputQueue.java although it's executing this row for sure when i touch the touchscreen. Did I do anything wrong ? How can i debug files in the framework like KeyInputQueue.java ? Is it possible ? Thanks a lot, Matan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 using org.apache.commons.net with Android
Hello all. I have been successfully using the org.apache.commons.net.telnet package with my android app, but i have run into a problem. I have an instance of TelnetClient, which works fine, but when i call TelnetClient.disconnect it just hangs and nothing happens at all. A small test case...hangs when disconnect is called. Works fine on my home machine but not on the emulator. Please help as Im not sure whats happening here... Thanks, (code below) private TelnetClient telnet = new TelnetClient(); private InputStream in; private PrintStream out; public class Test{ public Test(){ try { telnet.connect( ipAddress, port ); // Get input and output stream references in = telnet.getInputStream(); out = new PrintStream( telnet.getOutputStream() ); Log.d(TAG, test disconnect); telnet.disconnect(); //HERE Log.d(TAG, test disconnected); } catch (SocketException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Upgrade to 1.0
Have an issue where I've tried to update to the paid version, before removing the beta. Beta pops up asking to update as it has expired but links to a 404 error. Market asks if I want to install 1.0 and does, but beta still shows up with it's Error. I've uninstalled 1.0, had to refund to do it, and now I have no way of removing locale beta as it is not recognized as being installed within market. Please advise. Oliver -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problems with the JavaBinder (!!! FAILED BINDER TRANSACTION!!!)
Hello, I currently have a lot of problems with this error. I programmed a widget and a service that runs in the background. This service is updating the widget on different occasions (position changed, screen turned on, timer based...) with images and text it's loading from a server. After a couple of updates I always get an error from the JavaBinder, at least that's what DDMS says. Reproducing the problem with my app is quite easy but I just can't figure out what's going on there. Can someone please give me some help or hints with that? That'd be really cool! Cheers Moritz -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launch navigation app with an Intent - [DS]
This code will work on any SDK. What matters here is the version of google maps that is on the device. The navigation features were added in google maps version 3.2.1 as far as i know. On Sun, Jan 3, 2010 at 9:28 AM, kautilya imtheno...@gmail.com wrote: Hi Declan , Thanks for your code . it's working very well But only with SDK 2.0.1. Thanks kautilya -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- An engineer's definition of done is the perfect set of code, and left to his own devices, an engineer will endlessly improve the code on the mythic journey to done. -- http://www.randsinrepose.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: Problems with the JavaBinder (!!! FAILED BINDER TRANSACTION!!!)
I forgot to add that after this message, the widget is not updated anymore. It stays the way it looks like in the moment the message appears and even when I force another update, it's not changed anymore. If I remove and add it again, it works for a while, until the message appears again. On Jan 4, 9:41 pm, Moritzz moritz...@googlemail.com wrote: Hello, I currently have a lot of problems with this error. I programmed a widget and a service that runs in the background. This service is updating the widget on different occasions (position changed, screen turned on, timer based...) with images and text it's loading from a server. After a couple of updates I always get an error from the JavaBinder, at least that's what DDMS says. Reproducing the problem with my app is quite easy but I just can't figure out what's going on there. Can someone please give me some help or hints with that? That'd be really cool! Cheers Moritz -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Why is my eclipse up to date with 2.0.1 but no android tools appear in the UI?
I was completely set up with android 2.0 and eclipse. Everything worked fine. Then I tried to upgrade to 2.0.1 and now eclipse wont show any of the android plug in stuff. There is nothing in the IDE relating to android anymore. No AVD, no android projects, nothing. If I go to Help - Install New Software, select Android Eclair - https://dl-ssl.google.com/android/eclipse/; for the Work with, and look under Developer Tools I get these: Android DDMS0.9.5.v200911191123-20404 Android Development Tools 0.9.5.v200911191123-20404 These are the mot current android 2.0.1 tools. It shows that they are already installed (clicking the Hide items that are already installed box removes them). However, eclipse looks like i just installed it vanilla with no plugins at all. Is there something else I need to do? Check for Updates says there is nothing to update. Should I blow away eclipse and reinstall it from scratch? Doesnt that defeat the purpose of the automatic updater? Confused -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Reliable GPS location
You can call Location#getTime to see when the fix returned by LocationManager#getLastKnownLocation was taken. The getLastKnownLocation method doesn't start the GPS, so the fix may be from a long time ago, and not be a good indicator of the current location. The accuracy of the fix refers to the accuracy at the time the fix was taken. I don't see how it could be easily updated to refer to the accuracy with respect to the current location. That would require starting the GPS and taking another fix to find the current location, in which case the new fix would become the last known location and there would be no point. If you want current fixes, use the LocationManager#requestLocationUpdates methods. On Jan 4, 6:07 am, nr1 ti08m...@gmail.com wrote: Hi, i know how to get the calculated GPS position via getLastKnownLocation (). As tests show, this function really always returns the last known location, so it doesn't matter if there is a gps fix available. How can i check if the returned location is reliable? I tried it with getAccurracy(), but this function even returns a accurracy although no gps fix is availavle (anymore). Is there a possibility to get gps dop values? Used SDK is 1.6, thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why is my eclipse up to date with 2.0.1 but no android tools appear in the UI?
I am installing on Windows 7. Window Preferences... Android is not there, even though the tools are installed. Reinstalling Eclipse does not fix the problem. On Jan 4, 1:10 pm, ClarkBattle clarkbat...@gmail.com wrote: I was completely set up with android 2.0 and eclipse. Everything worked fine. Then I tried to upgrade to 2.0.1 and now eclipse wont show any of the android plug in stuff. There is nothing in the IDE relating to android anymore. No AVD, no android projects, nothing. If I go to Help - Install New Software, select Android Eclair -https://dl-ssl.google.com/android/eclipse/; for the Work with, and look under Developer Tools I get these: Android DDMS 0.9.5.v200911191123-20404 Android Development Tools 0.9.5.v200911191123-20404 These are the mot current android 2.0.1 tools. It shows that they are already installed (clicking the Hide items that are already installed box removes them). However, eclipse looks like i just installed it vanilla with no plugins at all. Is there something else I need to do? Check for Updates says there is nothing to update. Should I blow away eclipse and reinstall it from scratch? Doesnt that defeat the purpose of the automatic updater? Confused -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Dev Phone with Verizon?
On Jan 4, 11:44 am, Mark mark.r.ba...@gmail.com wrote: Any phone can work as a dev phone. Some are better suited than others however. There's a least one consumer level device (I cannot remember which) that didn't dump logs. Then there might be driver issues. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Update Tab-Content when clicking Tab
Thx!! On Jan 4, 3:46 pm, Mark Murphy mmur...@commonsware.com wrote: Hi again, nobody has an idea? :( See setOnTabChangedListener() on TabHost. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android development with PHP
You can write an applications backend in php, but why would you want to use php to write for the phone? The main language is java though apps can be written in c/perl/python/lua, but no php yet afaik. On Jan 4, 2010 12:13 PM, androidbeginner sahayamj.m...@gmail.com wrote: Is it possible create android applications using PHP? can we port php code in to the android applications? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Contacts: annot find symbol for getContentResolver().query ???
OK, I know this must be really simple but I must be continually overlooking the obvious. I'm trying to compile the code below and javac keeps saying: [javac] Compiling 3 source files to /usr/home/jim/src/2android/ ExcuseMe/bin/classes [javac] /usr/home/jim/src/2android/ExcuseMe/src/com/jw/ExcuseMe/ NamePhones34.java:66: cannot find symbol [javac] symbol : method getContentResolver() - wha ?? [javac] location: class com.jw.ExcuseMe.NamePhones34 [javac] Cursor curse = getContentResolver().query [javac]^ [javac] /usr/home/jim/src/2android/ExcuseMe/src/com/jw/ExcuseMe/ NamePhones34.java:74: cannot find symbol [javac] symbol : method startManagingCursor (android.database.Cursor) [javac] location: class com.jw.ExcuseMe.NamePhones34 [javac] startManagingCursor(curse); [javac] ^ I've tried importing everything that seems like it would be relevant but the problem persists. Help! This seems like a DUH! problem and I'm will to admit I have a bit of Homer in me :-( Thanks in advance !!! here's the start of the problem source file: import static android.provider.BaseColumns._ID; import android.app.*; import android.content.*; import android.database.*; import android.media.*; import android.net.*; import android.os.*; import android.provider.ContactsContract.*; import android.provider.*; import android.view.*; import android.preference.*; import android.preference.PreferenceActivity; import android.provider.Contacts.People; import android.provider.Contacts.People.Phones; @SuppressWarnings(deprecation) public class NamePhones34 extends NamePhones implements ExcuseMeConstants { private final String TAG = NamePhones34; private int ii, jj; // The Contact info temporarily will be collected in these arrays: private String cNames[]; // Contact names private String cPhones[]; // Contact phone numbers public NamePhones34() {} /** * Return all the Contacts; returns the number of Contacts found. */ public int getNamePhones() { // From http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html final long contactId = SUMMARY_ID_COLUMN_INDEX; Cursor curse = getContentResolver().query (RawContacts.CONTENT_URI, // Uri new String[]{RawContacts._ID}, // Projection (which columns?) RawContacts.CONTACT_ID + =?, // Selection (which tuples?) new String[]{String.valueOf(contactId)}, // Selection Args (vals) null); // sortOrder= // Let the activity manage the cursor lifecycle startManagingCursor(curse); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] URLSpan string problem
... URLSpan([123]); ... - when being displayed in my TextView only changes the color of [123 and only makes [123 clickable. If I retrieve the URL with getURL it returns [123] as expected - why does the defined URLSpan in the TextView not include all of the colors? Is there a way to correct this? Tried \\ and in from of the ] but it did not make a diffrence. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ListActivity not updating on Database update.
Hello, i update a value in my Database in a Listview using a Context Menu. The code so far seems to be ok. But everything i try to make the update visible in the View failed. Anyone can point me whats wrong there ? I use a ViewBinder to map the Layout for each row. Row Layout: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/custom_spotoverview_name android:text=text android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp / LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/custom_spotoverview_activ android:layout_width=wrap_content android:layout_height=wrap_content / View android:layout_width=5dp android:layout_height=5dp / TextView android:id=@+id/custom_spotoverview_wind_details android:text=some default text android:layout_width=wrap_content android:layout_height=wrap_content / View android:layout_width=5dp android:layout_height=5dp / TextView android:id=@+id/custom_spotoverview_detail android:text=some default text android:layout_width=wrap_content android:layout_height=wrap_content / View android:layout_width=5dp android:layout_height=5dp / ImageView android:id=@+id/custom_spotoverview_wind_from android:background=@drawable/icon android:layout_width=wrap_content android:layout_height=wrap_content / View android:layout_width=5dp android:layout_height=5dp / ImageView android:id=@+id/custom_spotoverview_wind_to android:background=@drawable/icon android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout /LinearLayout The ViewBinder: public class SpotOverviewViewBinder implements SimpleCursorAdapter.ViewBinder { private static final int SPOT_NAME = 0; private static final int SPOT_ID = 2; private static final int WIND_TO = 5; private static final int WIND_FROM = 6; private static final int SPOT_ACTIV = 3; /** * Converts integer representing a boolean (0,1) to enabled or disabled icon * resource id. * * @param value * @return */ private final static int convertIntToResourceID(final int value) { return value == 0 ? R.drawable.activ_off : R.drawable.activ_on; } /* * (non-Javadoc) * * @see * android.widget.SimpleCursorAdapter.ViewBinder#setViewValue (android.view * .View, android.database.Cursor, int) */ @Override public boolean setViewValue(final View view, final Cursor cursor, final int columnIndex) { if (columnIndex == SPOT_ACTIV) { final ImageView iv = (ImageView) view; final int resID = convertIntToResourceID(cursor.getInt (columnIndex)); iv.setBackgroundResource(resID); } else if (columnIndex == SPOT_NAME) { final String name = cursor.getString(columnIndex); final TextView tv = (TextView) view; tv.setText(name); } else if (columnIndex == SPOT_ID) { final TextView tv = (TextView) view; tv.setText(cursor.getString(columnIndex)); } else if (columnIndex == WIND_FROM) { final ImageView tv = (ImageView) view; final String id = cursor.getString(columnIndex); final int index = IdentityUtil.indexOf(id, WindDirection.values()); final int resID =
[android-developers] ServiceConnectionLeaked warning
I'm getting a ServiceConnectionLeaked message that I don't understand. There are 3 activities and a remote service, all the activities use the same remote service. The main window, activity 1, starts up, auto-starts the service and binds to it. The user then starts activity 2 to do something. The user now wants activity 3, so the code in activity 2 puts some data in an intent and starts activity 1 via startActivity (). When activity 1 is started, it reads the data in the intent and starts activity 3. This all works as expected except that while activity 3 is starting I get the ServiceConnectionLeaked warning. This is odd because the code that unbinds from the service has never been called and the service connection continues to operate just fine. If the user backs out of the main window the service is unbound and everything shuts down correctly. Because the UI design doesn't want activity 2 to stack on top of 3, or 3 on top of 2 I use a FLAG_ACTIVITY_CLEAR_TOP flag when starting activity 1. (I tested with this flag removed and the leak warning goes away but I wind up with extra activities/windows in the stack). To make it even a bit weirder, if I run through the same scenario again, e.g. close activity 3 to get back to activity 1, open 2, switch to 3 there is no leakage the second and successive times, only the first time (near as I can tell). any hints, thoughts? tia, mike I could pare it all down to an example if that is required/helpful. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Contacts: annot find symbol for getContentResolver().query ???
Which class are you expecting to have implemented the getContentResolver method? On Mon, Jan 4, 2010 at 4:01 PM, James tc4...@gmail.com wrote: OK, I know this must be really simple but I must be continually overlooking the obvious. I'm trying to compile the code below and javac keeps saying: [javac] Compiling 3 source files to /usr/home/jim/src/2android/ ExcuseMe/bin/classes [javac] /usr/home/jim/src/2android/ExcuseMe/src/com/jw/ExcuseMe/ NamePhones34.java:66: cannot find symbol [javac] symbol : method getContentResolver() - wha ?? [javac] location: class com.jw.ExcuseMe.NamePhones34 [javac] Cursor curse = getContentResolver().query [javac]^ [javac] /usr/home/jim/src/2android/ExcuseMe/src/com/jw/ExcuseMe/ NamePhones34.java:74: cannot find symbol [javac] symbol : method startManagingCursor (android.database.Cursor) [javac] location: class com.jw.ExcuseMe.NamePhones34 [javac] startManagingCursor(curse); [javac] ^ I've tried importing everything that seems like it would be relevant but the problem persists. Help! This seems like a DUH! problem and I'm will to admit I have a bit of Homer in me :-( Thanks in advance !!! here's the start of the problem source file: import static android.provider.BaseColumns._ID; import android.app.*; import android.content.*; import android.database.*; import android.media.*; import android.net.*; import android.os.*; import android.provider.ContactsContract.*; import android.provider.*; import android.view.*; import android.preference.*; import android.preference.PreferenceActivity; import android.provider.Contacts.People; import android.provider.Contacts.People.Phones; @SuppressWarnings(deprecation) public class NamePhones34 extends NamePhones implements ExcuseMeConstants { private final String TAG = NamePhones34; private int ii, jj; // The Contact info temporarily will be collected in these arrays: private String cNames[]; // Contact names private String cPhones[]; // Contact phone numbers public NamePhones34() {} /** * Return all the Contacts; returns the number of Contacts found. */ public int getNamePhones() { // From http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html final long contactId = SUMMARY_ID_COLUMN_INDEX; Cursor curse = getContentResolver().query (RawContacts.CONTENT_URI, // Uri new String[]{RawContacts._ID}, // Projection (which columns?) RawContacts.CONTACT_ID + =?, // Selection (which tuples?) new String[]{String.valueOf(contactId)}, // Selection Args (vals) null); // sortOrder= // Let the activity manage the cursor lifecycle startManagingCursor(curse); -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Android Dev Phone with Verizon?
The Droid, and HTC's main line being G1 MyTouch and Hero are all popular handsets that work fine as dev phones. It doesn't seem like the other Android handsets are seeing much usage right now, based on the analytics I've seen. But I would choose carefully in picking which phones to develop on, and for. The hero is still firmware 1.5, the G1 and My Touch as 1.6, and the Droid is 2.0.1 (unless I missed an update over the holidays). Anyway there are real differences between the different API levels. On Jan 4, 3:04 pm, JP joachim.pfeif...@gmail.com wrote: On Jan 4, 11:44 am, Mark mark.r.ba...@gmail.com wrote: Any phone can work as a dev phone. Some are better suited than others however. There's a least one consumer level device (I cannot remember which) that didn't dump logs. Then there might be driver issues. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: URLSpan string problem
--got it, my code error in start, end of setSpan... On Jan 4, 7:23 pm, SimV01 lr...@cox.net wrote: ... URLSpan([123]); ... - when being displayed in my TextView only changes the color of [123 and only makes [123 clickable. If I retrieve the URL with getURL it returns [123] as expected - why does the defined URLSpan in the TextView not include all of the colors? Is there a way to correct this? Tried \\ and in from of the ] but it did not make a diffrence. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 perform the animation in viewgroup
Hi all I am trying to perform the animation on widget in my program. (Use Layout A) My widget has at least one viewgroup(Layout B) and imageview (View C). --- Layout B Layout A ---| (Layout A = Widget (Layout B , ImageView)) --- ImageView I call the LayoutAnimationController this function in LayoutA, but LayoutB and View C don’t perform animation. Is it possible to call animation in A (set animation in A ) and all child views of A will perform animation? I want all widgets on Layout A that do some animations in my program, but I don’t want to set animation in every views. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: EditText hint shows extra spaces when inputType=textpassword
I am seeing the same behavior, did you find any fix for this? On Dec 23 2009, 7:22 am, GDroid baron...@gmail.com wrote: Hi, Just wondered, am I the only one to encounter this strange behavior. When placing an EditText inside my activity and setting its inputType=textPassword as follow: EditText android:text= android:id=@+id/EditText01 android:hint=This is a hint android:inputType=textPassword android:layout_width=wrap_content android:layout_height=wrap_content/EditText The hint is displayed with bigger/double spaces between the words. If I remove the inputType attribute it all goes back to normal. I couldn't find a known issue regarding this behavior. BTW- If you wonder why this is important (it isn't that much) try putting two EditText widgets one below the other and set the inputType of one of them to textpassword it doesn't look good. Any comments? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] can't write to sdcard anymore
I've been developing this one app for a few months now with eclipse. I've had no problem writing to the sdcard in the past. Now it just creates an empty file when the following code is used: try { FileWriter fw = new FileWriter(/sdcard/shootme.txt); BufferedWriter out = new BufferedWriter(fw); out.write(help! I'm going crazy); out.close(); } catch (IOException e) { Toast.makeText(cntx, WriteFailed!, Toast.LENGTH_SHORT).show(); } Toast.makeText(cntx, Written! , Toast.LENGTH_SHORT).show(); It runs fine and the last toast pops up like everything is fine... but no... it's an empty file that got created! I was just making code changes on what was written and all of a sudden this happens. I did notice that when using WinImage to manage the sdcard, the attributes were changed to Archive. I deleted the avd and sdcard I was using and created a new one just in case and it still happens. I checked and all my other apps do the same thing... a different computer did the same thing. An app with just the code above doesn't work either. I tried SuperCSV.jar and it just writes an empty file. 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] can't write to sdcard anymore
I've been developing this one app for a few months now with eclipse. I've had no problem writing to the sdcard in the past. Now it just creates an empty file when the following code is used: try { FileWriter fw = new FileWriter(/sdcard/shootme.txt); BufferedWriter out = new BufferedWriter(fw); out.write(help! I'm going crazy); out.close(); } catch (IOException e) { Toast.makeText(cntx, WriteFailed!, Toast.LENGTH_SHORT).show(); } Toast.makeText(cntx, Written! , Toast.LENGTH_SHORT).show(); It runs fine and the last toast pops up like everything is fine... but no... it's an empty file that got created! I was just making code changes on what was written and all of a sudden this happens. I did notice that when using WinImage to manage the sdcard, the attributes were changed to Archive. I deleted the avd and sdcard I was using and created a new one just in case and it still happens. I checked and all my other apps do the same thing... a different computer did the same thing. An app with just the code above doesn't work either. I tried SuperCSV.jar and it just writes an empty file. 1. Please use Environment.getExternalStorageDirectory(), rather than assuming that /sdcard is the correct path. It is not the correct path on some Android devices. 2. Do you have the WRITE_EXTERNAL_STORAGE permission? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: can't write to sdcard anymore
1. I've seen that and will try it. But everything was fine until one day, it just stopped working 2. yes, i have the propper permissions. 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] adp1 seeing adhoc networks
I'm trying to set up my adp1 to see a device on an adhoc network. I'm largely using the procedure outlined in: http://forum.xda-developers.com/showthread.php?t=444004page=2 The problem is that not only is the phone not connecting to the adhoc network, it appears to not even see it. When looking for wifi networks, the phone can see several networks from my neighbors, regardless of how they are set up, but it can't see an adhoc network set up from my PC sitting next to the phone. Is there something about the phone that makes it deal with a router just fine, but not a PC or 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