[android-developers] Re: Parser XML return table
What will the XML file look like, and what will the resulting table of strings contain? Generally speaking, to use a SAX parser, you might create a class that extends org.xml.sax.helpers.DefaultHandler. Then, you execute the parser passing an instance of your handler class -- the parser reads the file and notifies your class whenever certain things are encountered (like, a start element like trk, an end element like /trk, character data, white space, etc). The code to execute the parser might look something like this if you've stored the URL of the KML file in a string called url: import java.io.InputStream; import java.net.URL; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.Attributes; import org.xml.sax.helpers.DefaultHandler; SAXParserFactory spf = SAXParserFactory.newInstance(); YourSpecialHandler yourhandler = new YourSpecialHandler(); SAXParser sp = spf.newSAXParser(); InputStream s = new URL(url).openStream(); sp.parse(s, yourhandler); result = yourhandler.getResult(); public class YourSpecialParser extends DefaultHandler { public void startDocument() { } public void startElement(String uri, String localName, String qName, Attributes attributes) { } //etc; see documentation for DefaultHandler } --Ben On Sep 16, 5:04 am, sweet brou...@gmail.com wrote: Hello I'm new to android dev and I'd like to make a Parser xml which return a table of string, i've try to find a tuto in the net but without success. I know i should use SAX parser but i don't understand his working if anybody can explain to me it will be very nice or if anybody know a tutorial about this. Thanks a lot Sweet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there any way to get paticular vertion of android source code?
Thanks ralf. Just wonder if ther is any qiuck way to switch to some tag, you know repo init takes at least 3 hours on my network. On 9月17日, 下午1时50分, Raphael r...@android.com wrote: On Wed, Sep 16, 2009 at 10:35 PM, William Hua krypto...@gmail.com wrote: I've synced my android repository just after android sdk 1.6 announced, but found some problem to install my apps with native code (so built by NDK 1.5_r1) then. I tried to build NDK with the latest souce code, bu unfortunately, faile again :( . So is there any way to get paticular vertion of android source code? for example the android-1.5r3 tag. Would be great if some command like svn switch /foo/bar/1.5r3 is available. If you want to check out sources, repo init ... -b tag will do what you want. But please follow-up on the repo-discuss group rather than the developer group. If you want the SDK and/or NDK the previous archives are always available on the android.com web site. R/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] java.lang.StackOverflowError for sdk1_5r3
Hello everybody Some serious error I am using custom listadapter for ListActivity, but half adapter is getting built and then throws java.lang.StackOverflowError. When I ran the same code on sdk1_1r1 it works perfect. When do i try to run on sdk1_5r3, gives this error. Generally java.lang.StackOverflowError when happens if the some function caught in infinite recursion, but if this is case then why does it working on sdk1.1r1 perfectly. I tested the appl on sdk1_5r3 both emulators default AVD(96 RAM) and custom AVD(523 RAM). For all try it gives the same error. Any suggestion will great help. Log Cat: 09-17 11:51:22.437: INFO/dalvikvm(880): Stack overflow, expanding (0x41048200 to 0x41048000) 09-17 11:51:22.447: INFO/dalvikvm(880): Shrank stack (to 0x41048200, curFrame is 0x41049cd8) 09-17 11:51:22.507: DEBUG/AndroidRuntime(880): Shutting down VM 09-17 11:51:22.548: WARN/dalvikvm(880): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-17 11:03:54.488: ERROR/AndroidRuntime(769): Uncaught handler: thread main exiting due to uncaught exception 09-17 11:03:54.597: ERROR/AndroidRuntime(769): java.lang.StackOverflowError 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Styled.measureText(Styled.java:371) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.measureText(Layout.java:1600) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.getLineMax(Layout.java:654) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.draw(Layout.java:310) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.BoringLayout.draw(BoringLayout.java:356) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.TextView.onDraw(TextView.java:3921) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5838) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1319) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.ListView.dispatchDraw(ListView.java:2820) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5944) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.draw(AbsListView.java:2121) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5841) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.FrameLayout.draw(FrameLayout.java:352) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at
[android-developers] Re: java.lang.StackOverflowError for sdk1_5r3
You have (way) too many views. Remove a few. Your app will load faster, layout faster, draw faster and won't crash. On Wed, Sep 16, 2009 at 11:38 PM, jagtap.jj jagtap...@gmail.com wrote: Hello everybody Some serious error I am using custom listadapter for ListActivity, but half adapter is getting built and then throws java.lang.StackOverflowError. When I ran the same code on sdk1_1r1 it works perfect. When do i try to run on sdk1_5r3, gives this error. Generally java.lang.StackOverflowError when happens if the some function caught in infinite recursion, but if this is case then why does it working on sdk1.1r1 perfectly. I tested the appl on sdk1_5r3 both emulators default AVD(96 RAM) and custom AVD(523 RAM). For all try it gives the same error. Any suggestion will great help. Log Cat: 09-17 11:51:22.437: INFO/dalvikvm(880): Stack overflow, expanding (0x41048200 to 0x41048000) 09-17 11:51:22.447: INFO/dalvikvm(880): Shrank stack (to 0x41048200, curFrame is 0x41049cd8) 09-17 11:51:22.507: DEBUG/AndroidRuntime(880): Shutting down VM 09-17 11:51:22.548: WARN/dalvikvm(880): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-17 11:03:54.488: ERROR/AndroidRuntime(769): Uncaught handler: thread main exiting due to uncaught exception 09-17 11:03:54.597: ERROR/AndroidRuntime(769): java.lang.StackOverflowError 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Styled.measureText(Styled.java:371) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.measureText(Layout.java:1600) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.getLineMax(Layout.java:654) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.draw(Layout.java:310) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.BoringLayout.draw(BoringLayout.java:356) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.TextView.onDraw(TextView.java:3921) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5838) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1319) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.ListView.dispatchDraw(ListView.java:2820) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5944) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.draw(AbsListView.java:2121) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5841) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.FrameLayout.draw(FrameLayout.java:352) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17
[android-developers] InstantiationException while starting Service
Hi All, I have developed an application which listens for the incoming message. When the message arrives, I am reading that message then invoking the service to delete that message. But when invoking the service I get an error as unhandled exception InstantiationException: Cannot instantiate the service. Can anyone let me know what may be the problem? Below is the manifest file application android:icon=@drawable/icon android:label=@string/ app_name receiver android:name=.SMSIntentReceiver android:enabled=true intent-filter action android:name = android.provider.Telephony.SMS_RECEIVED / /intent-filter /receiver service android:name=.utils.SMSEraser intent-filter action android:name=com.utils.utils.SMSEraser/ /intent-filter /service /application The code that calls the service is as under : //Start the Service. con is Context object Intent intent = new Intent(); intent.setAction(com.satloc.utils.SMSEraser); con.startService(intent); Hope to get a reply soon. Thanks Regards Sunil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: HTTP Connections?
Yea i mean this is my first actual applications and im really confused do i have to make a xml layout to read the open stream? On Sep 16, 11:58 pm, BJP bjpcalt...@gmail.com wrote: To read a file from a standard internet connection protocol, just create a new java.net.URL and access its openStream() method: import java.io.InputStream; import java.net.URL; String url = http://www.yoursite.com/filename.html;; InputStream s = new URL(url).openStream(); ...then just read it like a normal IO stream (one of the read() methods) How to do the search is a much more complicated, general question probably not suitable specifically to the Android forums -- do you have more specifics about how the search will work? --Ben On Sep 16, 8:22 pm, MarQuel Middleton droidhea...@gmail.com wrote: Hello im trying to make a application where you can search for something and download load it for example i want it to be connected to my website and you can type one of my ROM names and it will show a list view of all my ROMs or themes then i can select one and download it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: java.lang.StackOverflowError for sdk1_5r3
Thanks for quick reply In list item having four views[2 text views, and 2 buttons]. Is there any another way, I want to keep 4 views for single list item. Actually In app I do have another Tab also it also having custom list adapter and list item also having 4 views(2 TextView and 2 ImageButtons), that Tab works fine. Why does the same list item gets work perfectly on sdk1.1r1 On Sep 17, 11:41 am, Romain Guy romain...@google.com wrote: You have (way) too many views. Remove a few. Your app will load faster, layout faster, draw faster and won't crash. On Wed, Sep 16, 2009 at 11:38 PM, jagtap.jj jagtap...@gmail.com wrote: Hello everybody Some serious error I am using custom listadapter for ListActivity, but half adapter is getting built and then throws java.lang.StackOverflowError. When I ran the same code on sdk1_1r1 it works perfect. When do i try to run on sdk1_5r3, gives this error. Generally java.lang.StackOverflowError when happens if the some function caught in infinite recursion, but if this is case then why does it working on sdk1.1r1 perfectly. I tested the appl on sdk1_5r3 both emulators default AVD(96 RAM) and custom AVD(523 RAM). For all try it gives the same error. Any suggestion will great help. Log Cat: 09-17 11:51:22.437: INFO/dalvikvm(880): Stack overflow, expanding (0x41048200 to 0x41048000) 09-17 11:51:22.447: INFO/dalvikvm(880): Shrank stack (to 0x41048200, curFrame is 0x41049cd8) 09-17 11:51:22.507: DEBUG/AndroidRuntime(880): Shutting down VM 09-17 11:51:22.548: WARN/dalvikvm(880): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-17 11:03:54.488: ERROR/AndroidRuntime(769): Uncaught handler: thread main exiting due to uncaught exception 09-17 11:03:54.597: ERROR/AndroidRuntime(769): java.lang.StackOverflowError 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Styled.measureText(Styled.java:371) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.measureText(Layout.java:1600) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.getLineMax(Layout.java:654) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.draw(Layout.java:310) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.BoringLayout.draw(BoringLayout.java:356) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.TextView.onDraw(TextView.java:3921) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5838) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1319) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.ListView.dispatchDraw(ListView.java:2820) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5944) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.draw(AbsListView.java:2121) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5841) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.FrameLayout.draw(FrameLayout.java:352) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597:
[android-developers] after launch Gallery, file pushed to sdcard has length 0
hello world i use latest android sdk 1.6_r1 i launch the emulator(with the avd comes with sdcard ) then using adb push to push some videos and pictures onto sdcard because i cannot insert/eject sdcard on emulator so i reboot it after reboot, Gallery can find my videos and pictures just inserted now i want to push more pictures to sdcard so i reboot it after pushing files to sdcard but now Gallery cannot find the newer files after i check with adb i found the files i pushed in 2nd time all of them are of length 0 , so i think Gallery cannot read these files so my problem is Why the files i push to sdcard have zero size after i launch Gallery??? 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] Invitation to connect on Linkedin.
Hello, An invitation to connect on linked in. Feel free. http://www.linkedin.com/in/abhatnagar19 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: java.lang.StackOverflowError for sdk1_5r3
The problem is the number of parents you have. On Wed, Sep 16, 2009 at 11:52 PM, jagtap.jj jagtap...@gmail.com wrote: Thanks for quick reply In list item having four views[2 text views, and 2 buttons]. Is there any another way, I want to keep 4 views for single list item. Actually In app I do have another Tab also it also having custom list adapter and list item also having 4 views(2 TextView and 2 ImageButtons), that Tab works fine. Why does the same list item gets work perfectly on sdk1.1r1 On Sep 17, 11:41 am, Romain Guy romain...@google.com wrote: You have (way) too many views. Remove a few. Your app will load faster, layout faster, draw faster and won't crash. On Wed, Sep 16, 2009 at 11:38 PM, jagtap.jj jagtap...@gmail.com wrote: Hello everybody Some serious error I am using custom listadapter for ListActivity, but half adapter is getting built and then throws java.lang.StackOverflowError. When I ran the same code on sdk1_1r1 it works perfect. When do i try to run on sdk1_5r3, gives this error. Generally java.lang.StackOverflowError when happens if the some function caught in infinite recursion, but if this is case then why does it working on sdk1.1r1 perfectly. I tested the appl on sdk1_5r3 both emulators default AVD(96 RAM) and custom AVD(523 RAM). For all try it gives the same error. Any suggestion will great help. Log Cat: 09-17 11:51:22.437: INFO/dalvikvm(880): Stack overflow, expanding (0x41048200 to 0x41048000) 09-17 11:51:22.447: INFO/dalvikvm(880): Shrank stack (to 0x41048200, curFrame is 0x41049cd8) 09-17 11:51:22.507: DEBUG/AndroidRuntime(880): Shutting down VM 09-17 11:51:22.548: WARN/dalvikvm(880): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-17 11:03:54.488: ERROR/AndroidRuntime(769): Uncaught handler: thread main exiting due to uncaught exception 09-17 11:03:54.597: ERROR/AndroidRuntime(769): java.lang.StackOverflowError 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Styled.measureText(Styled.java:371) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.measureText(Layout.java:1600) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.getLineMax(Layout.java:654) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.draw(Layout.java:310) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.BoringLayout.draw(BoringLayout.java:356) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.TextView.onDraw(TextView.java:3921) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5838) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1319) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.ListView.dispatchDraw(ListView.java:2820) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5944) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.draw(AbsListView.java:2121) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5841) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.FrameLayout.draw(FrameLayout.java:352) 09-17 11:03:54.597:
[android-developers] Re: HTTP Connections?
Android is probably not the ideal language to learn how to program generally ~ there are many other languages better suited to that. I personally recommend VB.NET -- it's free and easy and structured very similar to Java, so most general knowledge acquired there will transfer easily back to Java. If you still want to try Android first, it would help to describe exactly what you want your program to do. --Ben On Sep 16, 11:44 pm, MarQuel Middleton droidhea...@gmail.com wrote: Yea i mean this is my first actual applications and im really confused do i have to make a xml layout to read the open stream? On Sep 16, 11:58 pm, BJP bjpcalt...@gmail.com wrote: To read a file from a standard internet connection protocol, just create a new java.net.URL and access its openStream() method: import java.io.InputStream; import java.net.URL; String url = http://www.yoursite.com/filename.html;; InputStream s = new URL(url).openStream(); ...then just read it like a normal IO stream (one of the read() methods) How to do the search is a much more complicated, general question probably not suitable specifically to the Android forums -- do you have more specifics about how the search will work? --Ben On Sep 16, 8:22 pm, MarQuel Middleton droidhea...@gmail.com wrote: Hello im trying to make a application where you can search for something and download load it for example i want it to be connected to my website and you can type one of my ROM names and it will show a list view of all my ROMs or themes then i can select one and download it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Why does media scanner not list the audio file suffixed with .aac.
I push a audio file named music.aac into SD card, and then execute Media Scanner application or re-start the device. I found that media scanner didn't process .aac file, so the music.aac file doesn't exist in music player. But Android supports AAC/AAC+/eAAC format. So who know the reason that the .aac file doesn't be processed by media scanner. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Unable to write text file to sdcard on physical G1 device
WRITE_EXTERNAL_STORAGE is there in 1.6 what abt 1.5 ??? On Sep 10, 12:30 am, androiduser mobile androiduser.mob...@gmail.com wrote: I got it working with a permission change in the manifest file. I added WRITE_EXTERNAL_STORAGE and it worked like a gem :)). On Sep 9, 12:13 pm, Chris Stratton cs07...@gmail.com wrote: On Jul 17, 6:24 pm, doubleminus doublemi...@gmail.com wrote: Is it a permissions issue? Trying to touch thesdcardvia adb shell gives me a permission denied message... FYI there's no touch command in the shell or /system/bin and the shell apparently considers permission denied to be a good substitute for [command] not found but you can cat /sdcard/testfile and then ^D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Unable to write text file to sdcard on physical G1 device
Applications targeted for 1.0, 1.1 and 1.5 will be able to write to the external storage without any permissions. They will continue to work just like they have till today. http://developer.android.com/sdk/android-1.6.html#api-changes WRITE_EXTERNAL_STORAGE: Allows an application to write to external storage. Applications using API Level 3 and lower will be implicitly granted this permission (and this will be visible to the user); Applications using API Level 4 or higher must explicitly request this permission. Tauno On Thu, Sep 17, 2009 at 10:25 AM, Shrenik Vikam shre...@ruby-solutions.com wrote: WRITE_EXTERNAL_STORAGE is there in 1.6 what abt 1.5 ??? On Sep 10, 12:30 am, androiduser mobile androiduser.mob...@gmail.com wrote: I got it working with a permission change in the manifest file. I added WRITE_EXTERNAL_STORAGE and it worked like a gem :)). On Sep 9, 12:13 pm, Chris Stratton cs07...@gmail.com wrote: On Jul 17, 6:24 pm, doubleminus doublemi...@gmail.com wrote: Is it a permissions issue? Trying to touch thesdcardvia adb shell gives me a permission denied message... FYI there's no touch command in the shell or /system/bin and the shell apparently considers permission denied to be a good substitute for [command] not found but you can cat /sdcard/testfile and then ^D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Displaying a panoramic image
On 16 sep, 19:18, Yusuf Saib (T-Mobile USA) yusuf.s...@t- Mobile.com wrote: - is there any Android component for this around ? No[t to my knowledge]. - may I encounter performances problems doing image computation in pure Java when scrolling, etc..? It might be slow and/or occasionally pause for G, but not necessarily worse than the J2ME version. I looked at the J2ME code, it uses some 3D layer (!= opengl). Actually, it seems to be a matter of putting the 6 photos from the qtvr file on the faces of a cube. I didn't get that at first, doing graphics transformations with opengl should be quite smooth I guess. -- og --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] connect to Google maps API or app to trace routes ...
Hello, i'm trying to trace routes thanks to the Google maps API. I'm disappointed because i haven't found any informations in docs. An alternative would be for me to launch the Google maps app embedded in the system, with the route. I succesfully launch the application, but i haven't found how i coul'd specify route parameters. bgrds, Philippe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 use root permission
Yeah, with adb remount my program works correctly. But If I want set root permission at my simple application (File Browser), How can I do? Thanks... 2009/9/16 cs_post...@hotmail.com cs_post...@hotmail.com Running the mount command from a shell will likely show that /system is mounted read-only as per default android setup, unless you've changed that in the process of rooting the phone. The exact syntax of the (somewhat non-standard?) mount command to use for remounting it read/write is not something I recall at the moment, but you'll find it with some web searching. On Sep 16, 6:32 am, Francesco Pace paxa...@gmail.com wrote: I use Superuser.apk for execute su command. My program write file test.txt in /system but statement Log.v(TEST], String.valueOf(list.length)); return value 0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: singleTask really always at the root of activity stack?
Thanks for your response. I've browsed this group and it seems the launchMode settings have caused a little confusion at times. This is also valid for me, I'm afraid... Anyway, I have pasted an excerpt from the output of adb shell dumpsys activity (sorry for the mass of text) for the situation where I have one application with two activities; SplashScreen (launchMode normal) and mainActivity (launchMode singleTask). I have started the application from the launcher which starts the SplashScreen activity. From there the mainActivity is started with: Intent intent = new Intent(SplashScreen.this, com.rick.myApp.MainActivity.class); SplashScreen.this.startActivity(intent); To me, the dump indicates that Task11 contains two activities where SplashScreen is at the front of the task (root?) and MainActivity is not at the top of the stack. When we know that MainActivity has launchMode=singleTask, doesn't the dump contradict the documentation in the sense that it is not at the root? Thanks for helping me understand this. /Rickard DUMP OF SERVICE activity: Activities in Current Activity Manager State: Task{11 com.rick} clearOnBackground=false numActivities=2 rootWasReset=false affinity=com.rick intent=Intent { flags=0x1000 comp={com.rick/ com.rick.ui.activity.SplashScreen} } affinityIntent=null origActivity=null lastActiveTime=68582390 (inactive for 9s) History #5: HistoryRecord{4360d2d0 {com.rick/com.rick.myapp.MainActivity}} packageName=com.rick processName=com.rick launchedFromUid=10018 app=ProcessRecord{437381f0 1106:com.rick/ 10018} Intent { comp={com.rick/com.rick.myapp.MainActivity} } frontOfTask=false task=Task{11 com.rick} taskAffinity=com.rick realActivity=ComponentInfo{com.rick/ com.rick.myapp.MainActivity} dir=/data/app/com.rick.apk res=/data/app/com.rick.apk data=/ data/data/com.rick labelRes=0x7f080005 icon=0x7f020004 theme=0x1030006 stateNotNeeded=false componentSpecified=true isHomeActivity=false configuration={ scale=1.0 imsi=310/260 locale=en_US touch=3 key=2/1/2 nav=3 orien=1 } resultTo=null resultWho=null resultCode=-1 results=null pendingResults=null readUriPermissions=null writeUriPermissions=null launchFailed=false haveState=false icicle=null state=RESUMED stopped=false finishing=false keysPaused=false inHistory=true persistent=false launchMode=2 fullscreen=true visible=true frozenBeforeDestroy=false thumbnailNeeded=false idle=true waitingVisible=false nowVisible=true configDestroy=false configChangeFlags=0 connections=null History #4: HistoryRecord{435db2f0 {com.rick/ com.rick.ui.activity.SplashScreen}} packageName=com.rick processName=com.rick launchedFromUid=-1 app=ProcessRecord{437381f0 1106:com.rick/ 10018} Intent { flags=0x1000 comp={com.rick/ com.rick.ui.activity.SplashScreen} } frontOfTask=true task=Task{11 com.rick} taskAffinity=com.rick realActivity=ComponentInfo{com.rick/ com.rick.ui.activity.SplashScreen} dir=/data/app/com.rick.apk res=/data/app/com.rick.apk data=/ data/data/com.rick labelRes=0x7f080005 icon=0x7f020004 theme=0x1030006 stateNotNeeded=false componentSpecified=true isHomeActivity=false configuration={ scale=1.0 imsi=310/260 locale=en_US touch=3 key=2/1/2 nav=3 orien=1 } resultTo=null resultWho=null resultCode=0 results=null pendingResults=null readUriPermissions=null writeUriPermissions=null launchFailed=false haveState=true icicle=Bundle [mParcelledData.dataSize=364] state=STOPPED stopped=true finishing=false keysPaused=false inHistory=true persistent=false launchMode=0 fullscreen=true visible=false frozenBeforeDestroy=false thumbnailNeeded=false idle=true waitingVisible=false nowVisible=false configDestroy=false configChangeFlags=0 connections=null Task{2 com.android.launcher} On 16 Sep, 18:41, Dianne Hackborn hack...@android.com wrote: Very much by definition, a single ask activity is always at the root of a stack. Anyone who launches that activity is forced to launch a new task, so the activity can't be anything but the start of a new task. I don't know enough about what you are doing or seeing to help any more, but there really should be no way to have such an activity embedded inside of a task. On Wed, Sep 16, 2009 at 12:53 AM, RickardF rickard.fahlqu...@gmail.comwrote: Hi all, In the documentation (http://developer.android.com/guide/topics/ manifest/activity-element.html#lmode) it is stated that an activity with launchMode=singleTask is always at the root of the sctivity stack. However, when I run my singleTask activity for a
[android-developers] avoiding Activity stack overflow...
I have the following situation. I have a task with the following activity stack -- A - B - C I have a menu item that allows me to start activity D; so my activity stack looks like this -- A - B - C - D Then I could select a menu item that allows me to start an activity C, which would cause my activity stack to look like this: A - B - C - D - C Then I could go back (via the menu item) to activity D, making my activity stack look like this: A - B - C - D - C - D Doing this a few more times, it would wind up looking like this -- A - B - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D This seems kinda stupid to me. I'd like it to simply re-use an activity, or pop the activity below to be on top (which goes against the nature of a stack). So, what I mean is if I had this activity stack: A - B - C - D And I started activity C (from the menu), I would get: A - B - D - C And if I then started activity D (from the menu), I would get: A - B - C - D Is there a way to do this without keeping some global list of activities and doing gross things to them to reorder them? tia. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to create an app which will install other .apk
OK ! Thank you. I will try this solution. It should work ! On 16 sep, 19:32, Jack Ha jack...@t-mobile.com wrote: One way you can do is to first save the .apk file in /sdcard and then install it with the following code: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(/sdcard/ app1.apk)), application/vnd.android.package-archive); startActivity(intent); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 16, 10:05 am, DaminouU dam.le...@gmail.com wrote: Hi, I want to create an application which will be able to install another one. Actually a server will send me the .apk file. Then I want my application installing this .apk file and running it. This activity will be a kind of 'script' for installing and running a new apk file... Is it possible? How can I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 1.6 SDK is here!
For me GEO searches (geo:0,0?q=somelocation) aren't working any more, is it just me or is it happening to others too? The message says that there's no activity to handle this intent... On Sep 17, 7:20 am, gjs garyjamessi...@gmail.com wrote: Hi Xavier, Thanks for the details. I downloaded 'newer' sdk and the code sample I provided previously now works OK, without alteration. Thanks Regards Gary On Sep 17, 1:28 am, Xavier Ducrohet x...@android.com wrote: I've replaced the files athttp://developer.android.com/sdk/1.6_r1/index.html (By the way, the size/checksum indicated on this page were always the one of the proper files, so if anyone had checked they should have realized the archives where wrong). To make sure you are running the system image that contains theTTS language packs: From Home, go to Settings, then Speech Synthesis. In there the first item 'listen to an example' should be enabled. click on it to be sure (it'll take a couple sec the first time) I do not know if there are any sample forTTScurrently, sorry. I think we have a blog post coming soon, though. Xav On Wed, Sep 16, 2009 at 8:19 AM, gjs garyjamessi...@gmail.com wrote: Hi, Could you please explain this a bit more - Does that mean thatTTSwon't work with the SDK files here - http://developer.android.com/sdk/1.6_r1/index.html Platform Package Size MD5 Checksum Windows android-sdk-windows-1.6_r1.zip 260529085 bytes 2bcbacbc7af0363058ca1cac6abad848 Mac OS X (intel) android-sdk-mac_x86-1.6_r1.zip 247412515 bytes eb13cc79602d492e89103efcf48ac1f6 Linux (i386) android-sdk-linux_x86-1.6_r1.tgz 238224860 bytes b4bf0e610ff6db2fb6fb09c49cba1e79 And that you will post new SDK 1.6 versions with correctTTSfiles again somewhere ? Or you mention ..I've just uploaded the correct archives... - of the correct SDK files that we should download, if so where ? I v'e been trying to getTTSto say something in OSX and getting errors ( no audio ) - 09-17 00:44:35.914: INFO/TtsService(746): TtsService.onCreate() 09-17 00:44:35.914: ERROR/TTSis loading(746): /system/lib/ libttspico.so 09-17 00:44:35.914: VERBOSE/SynthProxy(746): AudioTrack started 09-17 00:44:35.924: VERBOSE/TtsService(746): TtsService.setLanguage (eng, USA, ) 09-17 00:44:35.924: ERROR/SVOX Pico Engine(746): Failed to load textana resource for en-US [-40] 09-17 00:44:35.924: INFO/SynthProxy(746): setting speech rate to 100 09-17 00:44:36.013: INFO/TTSreceived:(738): hello, world 09-17 00:44:36.013: VERBOSE/TtsService(746):TTSservice received hello, world 09-17 00:44:36.013: INFO/TtsService(746): Stopping 09-17 00:44:36.013: INFO/TtsService(746): Stopped 09-17 00:44:36.013: INFO/TtsService(746):TTSprocessing: hello, world 09-17 00:44:36.013: VERBOSE/TtsService(746): TtsService.setLanguage (eng, USA, ) 09-17 00:44:36.013: ERROR/SVOX Pico Engine(746): Failed to load textana resource for en-US [-40] 09-17 00:44:36.013: INFO/SynthProxy(746): setting speech rate to 100 09-17 00:44:36.023: ERROR/SVOX Pico Engine(746): Error synthesizing string 'hello, world': [-101] with code like - package com.text2Speech; import android.app.Activity; import android.os.Bundle; import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech.OnInitListener; import android.speech.tts.TextToSpeech.OnUtteranceCompletedListener; public class text2Speech extends Activity implements OnInitListener, OnUtteranceCompletedListener { TextToSpeechtts= null; /** Called when the activity is first created. */ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); tts= new TextToSpeech( this, this ); tts.setOnUtteranceCompletedListener(this); setContentView(R.layout.main); } public void onInit(int status) { tts.speak(hello, world, 0, null ); // also tried - nbg - android.speech.tts.TextToSpeech.QUEUE_ADD, null ); } public void onUtteranceCompleted(String utteranceId) { // TODO Auto-generated method stub } public void onDestroy() { super.onDestroy(); tts.shutdown(); } } I can't locate an example/sample code forTTSin the sdk 1.6 samples, could you please provide a link or some working example. And perhaps some notes on how to configure a suitable emulator for TTS, I tried with -sdcard etc thinking it might still need to download the sound files as per previousttsimplementation but unsure. Thanks for any help Regards On Sep 16, 12:18 pm, Xavier Ducrohet x...@android.com wrote: Alastminutemix-uphadusuploadthewrongSDKpackages:( The only difference is the lack ofTTSlanguage
[android-developers] Re: avoiding Activity stack overflow...
Hi, I guess that's exactly what you are looking for: http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT If set in an Intent passed to Context.startActivity(), this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running. For example, consider a task consisting of four activities: A, B, C, D. If D calls startActivity() with an Intent that resolves to the component of activity B, then B will be brought to the front of the history stack, with this resulting order: A, C, D, B. This flag will be ignored if FLAG_ACTIVITY_CLEAR_TOP is also specified. Tauno On Thu, Sep 17, 2009 at 11:31 AM, sdphil phil.pellouch...@gmail.com wrote: I have the following situation. I have a task with the following activity stack -- A - B - C I have a menu item that allows me to start activity D; so my activity stack looks like this -- A - B - C - D Then I could select a menu item that allows me to start an activity C, which would cause my activity stack to look like this: A - B - C - D - C Then I could go back (via the menu item) to activity D, making my activity stack look like this: A - B - C - D - C - D Doing this a few more times, it would wind up looking like this -- A - B - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D This seems kinda stupid to me. I'd like it to simply re-use an activity, or pop the activity below to be on top (which goes against the nature of a stack). So, what I mean is if I had this activity stack: A - B - C - D And I started activity C (from the menu), I would get: A - B - D - C And if I then started activity D (from the menu), I would get: A - B - C - D Is there a way to do this without keeping some global list of activities and doing gross things to them to reorder them? tia. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Starting an Activity (with the dialog theme) from the onCreate() of another Activity results in a black screen.
I've had this problem in a few different apps now and I can't seem to find a solution. If, in the onCreate() of an Activity, I start a new activity that uses the dialog theme (via android:theme=@android:style/Theme.Dialog in the manifest) it doesn't draw anything to screen... the whole screen stays black. All the views are there (e.g., I can tap where an EditText should be and it'll give me the keyboard), they're just not visible. Anyone have any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: avoiding Activity stack overflow...
perfect, thx! On Sep 17, 1:40 am, tauntz tau...@gmail.com wrote: Hi, I guess that's exactly what you are looking for:http://developer.android.com/reference/android/content/Intent.html#FL... If set in an Intent passed to Context.startActivity(), this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running. For example, consider a task consisting of four activities: A, B, C, D. If D calls startActivity() with an Intent that resolves to the component of activity B, then B will be brought to the front of the history stack, with this resulting order: A, C, D, B. This flag will be ignored if FLAG_ACTIVITY_CLEAR_TOP is also specified. Tauno On Thu, Sep 17, 2009 at 11:31 AM, sdphil phil.pellouch...@gmail.com wrote: I have the following situation. I have a task with the following activity stack -- A - B - C I have a menu item that allows me to start activity D; so my activity stack looks like this -- A - B - C - D Then I could select a menu item that allows me to start an activity C, which would cause my activity stack to look like this: A - B - C - D - C Then I could go back (via the menu item) to activity D, making my activity stack look like this: A - B - C - D - C - D Doing this a few more times, it would wind up looking like this -- A - B - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D - C - D This seems kinda stupid to me. I'd like it to simply re-use an activity, or pop the activity below to be on top (which goes against the nature of a stack). So, what I mean is if I had this activity stack: A - B - C - D And I started activity C (from the menu), I would get: A - B - D - C And if I then started activity D (from the menu), I would get: A - B - C - D Is there a way to do this without keeping some global list of activities and doing gross things to them to reorder them? tia. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: connect to Google maps API or app to trace routes ...
You'll have to draw your route manually (in a MapView) with an overlay. Thy the example here: http://developer.android.com/guide/tutorials/views/hello-mapview.html On Sep 17, 1:02 am, LEMESLE Philippe philippe.leme...@alyotech.fr wrote: Hello, i'm trying to trace routes thanks to the Google maps API. I'm disappointed because i haven't found any informations in docs. An alternative would be for me to launch the Google maps app embedded in the system, with the route. I succesfully launch the application, but i haven't found how i coul'd specify route parameters. bgrds, Philippe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Proxy support not working in Android 1.6 emulator
After upgrading to SDK 1.6 the emulator seems to be unable the Internet through a proxy (-http-proxy option). The same is working in SDK 1.5R3. Can anyone confirm? Did I miss something? Thanks Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to set default date fromat
Hi I m trying to set defauut date format but unable to set as by default android is reading from string ro.com.android.dateformat please let me know where i can find this string and how i can change. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Best practice for implementing watchdog
I'm writing an application where real-time knowledge of the GPS state is critical to convey to the user. I request GPS updates at 1000 ms intervals -- when I haven't received another update 1500 ms past the most recent update, I want to display a yellow icon, and 5000 ms after the most recent update I want to display a red icon. Currently, I'm doing it like this: private CountDownTimer gpstimeout; public void onLocationChanged(Location location) { if (gpstimeout != null) gpstimeout.cancel(); gpstimeout = new CountDownTimer(5000, 1500) { public void onTick(long m) { setYellow(); } public void onFinish() { setRed(); } }; gpstimeout.start(); } This works well (except that onTick appears to be called immediately on creation of the new CountDownTimer), but it seems like creating and destroying a new thread every second wouldn't be the best way to do things. Is there a better approach to this? Thanks, Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: connect to Google maps API or app to trace routes ...
thank you for your answer ... but i have already integrated a map in my app with points on overlays Why com.google.googlenav is deprecated ? Google don't want us to show routes on maps ? -Message d'origine- De : android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] De la part de Jeremy Logan Envoyé : jeudi 17 septembre 2009 10:57 À : Android Developers Objet : [android-developers] Re: connect to Google maps API or app to trace routes ... You'll have to draw your route manually (in a MapView) with an overlay. Thy the example here: http://developer.android.com/guide/tutorials/views/hello-mapview.html On Sep 17, 1:02 am, LEMESLE Philippe philippe.leme...@alyotech.fr wrote: Hello, i'm trying to trace routes thanks to the Google maps API. I'm disappointed because i haven't found any informations in docs. An alternative would be for me to launch the Google maps app embedded in the system, with the route. I succesfully launch the application, but i haven't found how i coul'd specify route parameters. bgrds, Philippe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Problem
HI, I am Creating one Application and in this application i am using TouchEvent and ScrollView .In ScrollView i put one AbsoluteLayout and inside the AbsoluteLayout i am adding Row Dynamically. for That Row i am Using TouchEvent to drag the item. my Problem is whenever i am trying to Drag row below the physicalScreen . row is not moving below the PhysicalScreen or ScrollView is not moving up i dont undestand what i want to do? My Requirements is when user trying to drag the row below the physical screen the screen will go up automatically. PlZ HElP ME. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Signing apps
Hi all. Just trying to get my head around this signing principle. The dev guide says: The Android system will not install or run an application that is not signed appropriately. But I haven't signed the app I'm developing, and it runs fine on both the emulator and my device. Ok, so it's being signed with the eclipse debug key? But how come that still runs on the device. And if it runs on my device, what is there to stop me sending it out to friends to install on theirs? Is this possible, and is it technically allowed to do so? Thanks for your advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Signing apps
Yes you can send your apps signed by the debug key to your friends but they need to make sure Uknown sources is checked under the Application settings. Also, Android Market will not accept your APK if it is signed by the debug key. -Marc On Thu, Sep 17, 2009 at 5:42 PM, Neilz neilhorn...@googlemail.com wrote: Hi all. Just trying to get my head around this signing principle. The dev guide says: The Android system will not install or run an application that is not signed appropriately. But I haven't signed the app I'm developing, and it runs fine on both the emulator and my device. Ok, so it's being signed with the eclipse debug key? But how come that still runs on the device. And if it runs on my device, what is there to stop me sending it out to friends to install on theirs? Is this possible, and is it technically allowed to do so? Thanks for your advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Hello
Hi Suzanne Welcome to this group you can help others by your posts here. gulfam On Sep 17, 4:06 am, Don Tran arro...@gmail.com wrote: so tell us when will the motorola sholes be ready? On Sep 16, 1:07 pm, Mark Murphy mmur...@commonsware.com wrote: suzanne.alexandra wrote: I'm Suzanne Alexandra, and I work with Android at Motorola. I'm a real human and will be posting here from time to time. Hi, Suzanne! Welcome to the funhouse! -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy 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: multicast permission of dalvik and how to attach to dalvik env?
For solution of issue 2: We must provide JNI_OnLoad interface and save a global ref of jvm class for callback in it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: question about the conference
Romain and Mark - thanks a lot for the pointers! Daniel On Sep 16, 10:56 pm, Mark Murphy mmur...@commonsware.com wrote: Daniel Drozdzewski wrote: Hello Androiders! Quick question: - are there any Android related conferences happening in the near future? I googled but have been unsuccessful. Any pointers appreciated! Motorola is hosting a one-day MOTODEV Summit, October 6th, in San Diego (CA, USA). This will be all about their Android environment -- handsets, tools, etc. You'll even see a Commons Guy giving a presentation on Android Development at 50,000 Feet. Also, be sure to stop by their Technology Lab during the event, so you can get all your Android development questions answered (possibly even by a Commons Guy), along with learning more details about the CLIQ, the MOTODEV Studio for Android, the MOTODEV App Accelerator Program, and so on. http://developer.motorola.com/eventstraining/summit/ Sprint is hosting their Open Developer Conference in Santa Clara (CA, USA) October 26-28. This event covers all of their handset platforms; Palm (WebOS) and HTC (Android) are Premiere Sponsors. http://developer.sprint.com/site/global/news/conferences/p_2009devcon... CTIA is holding their Wireless IT and Entertainment 2009 conference in San Diego, immediately following the MOTODEV Summit. This is for all sorts of wireless stuff, and there is likely to be some amount of Android material. Depending on his schedule, you might see a Commons Guy wandering the exhibit hall on Wednesday before his return flight. http://www.wirelessit.com/ GSMA will hold their Mobile World Congress (MWC) in Barcelona 15-18 Feburary 2010. There will hopefully be more Android content next year than there was at the 2009 conference. This Commons Guy would love to lead an Android app developer session there, if anyone involved in MWC actually follows this list... http://www.mobileworldcongress.com And, of course, I am looking forward to Google I/O 2010, so I can pick up more LEGO bricks. ;-) -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy 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 I keep a broadcast receiver process alive by creating a service that stays around?
Satya Komatineni wrote: The app widget documentation indicates that the widget provider being a receiver of a broadcast service may not exist (the process) beyond the completion of the call. If I want to maintain state between two broadcast events, such as say widgetProvider.onUpdate(), can I start a local service and leave it hanging there until my widgets are disabled? If I didn't explicitly stop that service will it be loaded again and resumed when the device wakes up. Oh, please don't. There should be no need to keep a service in memory just to maintain some state. Since the app widget itself does not reside in your process, the widget framework allows you to keep your widget up to date without consuming much memory. Just persist whatever state you want to a file, SharedPreferences, database, etc. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Signing apps
Ok thanks, and as far as Google and Android are concerned there is nothing wrong with someone doing this? On Sep 17, 10:48 am, Marc Lester Tan mail...@gmail.com wrote: Yes you can send your apps signed by the debug key to your friends but they need to make sure Uknown sources is checked under the Application settings. Also, Android Market will not accept your APK if it is signed by the debug key. -Marc On Thu, Sep 17, 2009 at 5:42 PM, Neilz neilhorn...@googlemail.com wrote: Hi all. Just trying to get my head around this signing principle. The dev guide says: The Android system will not install or run an application that is not signed appropriately. But I haven't signed the app I'm developing, and it runs fine on both the emulator and my device. Ok, so it's being signed with the eclipse debug key? But how come that still runs on the device. And if it runs on my device, what is there to stop me sending it out to friends to install on theirs? Is this possible, and is it technically allowed to do so? Thanks for your advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: will the device wake up if there is a widget instance on the homepage but the widget provider or receiver is disabled?
Satya Komatineni wrote: Diane, Perhaps I got my question wrong. But the following url http://developer.android.com/guide/topics/appwidgets/index.html indicates that Note: If the device is asleep when it is time for an update (as defined by updatePeriodMillis), then the device will wake up in order to perform the update. This is based on 1.5. I also seem to recall Jeff Sharkey saying that the updatePeriodMillis does use a WAKEKUP flavor of alarm in the AlarmManager. People implementing app widgets are welcome to set updatePeriodMillis to be some ridiculously high value (or 0 might work...I forget) and handle their own updates with their own alarms. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Best practice for implementing watchdog
BJP wrote: I'm writing an application where real-time knowledge of the GPS state is critical to convey to the user. I request GPS updates at 1000 ms intervals -- when I haven't received another update 1500 ms past the most recent update, I want to display a yellow icon, and 5000 ms after the most recent update I want to display a red icon. Currently, I'm doing it like this: private CountDownTimer gpstimeout; public void onLocationChanged(Location location) { if (gpstimeout != null) gpstimeout.cancel(); gpstimeout = new CountDownTimer(5000, 1500) { public void onTick(long m) { setYellow(); } public void onFinish() { setRed(); } }; gpstimeout.start(); } This works well (except that onTick appears to be called immediately on creation of the new CountDownTimer), but it seems like creating and destroying a new thread every second wouldn't be the best way to do things. Is there a better approach to this? Here is how I would approach it, FWIW: Step #1: Have a private long data member named lastFix in your activity. Step #2: Update lastFix to be the current time in onLocationChanged(). Step #3: Use postDelayed() on View to set up a periodic quasi-loop (i.e., the Runnable to postDelayed() calls postDelayed() to reschedule the same Runnable after your desired period) Step #4: The Runnable from Step #3 can then look at lastFix and update your UI as needed if your fix gets stale I would not go *too* tight on this quasi-loop. I have used a one-second loop this way with no ill effects, but I would be nervous about it being, say, every 100ms. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Menu buttons in bottom part of layout
Hello, Thanks. I don't know if this is a hack (it looks like at least for me), but it's cool. I would ask you if this is how you really build you layout on android ? using scrollview for stretching views on different screen sizes, or is there some official guidelines to follow. Is there some kind of way to create custom layouts for different screen sizes(qvga, hvga), just like layout and layout-land folders ? Thanks again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Route Audio Output to Mic?
Hi guys, I'm trying to play a music (using MediaPlayer) during a call and want the caller to hear the music I'm playing. Unluckly it doens't seem work at all, the caller hear nothing even I set the music volumn to MAX ( of course, the speaker and the mic on Android are far away from each other). Is there any ways to route Android's audio output to its Mic? Or something like Stereo Mix in Windows? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android application enable handset
HI, http://en.wikipedia.org/wiki/Android_%28operating_system%29#Hardware_products_running_Android Regards! Imtiaz Ali Shah On Wed, Sep 16, 2009 at 5:49 PM, Zeeshan Muhammad genx...@gmail.com wrote: i am also looking for the answer. On Wed, Sep 16, 2009 at 11:11 AM, Ajaz Ahmed ajazahme...@gmail.comwrote: Hi, Can any one send me the list of android application enable handset, where i can install my android application? want to know about company,model ?? Regards! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: connect to Google maps API or app to trace routes ...
launch the Google maps app embedded in the system, with the route. If you just have a source and destination, you can get the Maps app to show its own route between them with something like this: Uri uri = Uri.parse(http://maps.google.com/maps? saddr=42.35892,-71.05781daddr=40.756054,-73.986951); Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri); startActivity(intent); That pops up a dialog asking the user if they want to complete the action with the Browser or Maps app, though. You can start the Maps app directly with a geo URI intent, but that only seems to support a single location or query. I tried sending it a from/to query that worked against the browser version of maps once, but that didn't work. Too bad we don't have a more powerful way to start the Maps app. Would be great if there were a way to send areas, multiple locations, relative locations, etc.. Then you could ask it to show a square mile one mile to the East, all gas stations 1 mile ahead, a map showing how 5 different locations are positioned w.r.t. each other... Why com.google.googlenav is deprecated ? Google don't want us to show routes on maps ? I don't know any public equivalent to the com.google.googlenav classes, or the com.google.android.location.GmmGeocoder class for business searches, either. The official API doesn't seem to support anything near as powerful: http://code.google.com/android/add-ons/google-apis/reference/index.html I'm stuck calling the web API and parsing the results to replace those lately, myself. Looks like some other devs are trying to replace Google Maps completely: http://code.google.com/p/osmdroid/ Or trying to talk to an embedded web version with JavaScript: http://code.google.com/p/map-for-osp/ I'll have to look into those options for my own maps related apps next, I guess. On Sep 17, 5:15 am, LEMESLE Philippe philippe.leme...@alyotech.fr wrote: thank you for your answer ... but i have already integrated a map in my app with points on overlays Why com.google.googlenav is deprecated ? Google don't want us to show routes on maps ? -Message d'origine- De : android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] De la part de Jeremy Logan Envoyé : jeudi 17 septembre 2009 10:57 À : Android Developers Objet : [android-developers] Re: connect to Google maps API or app to trace routes ... You'll have to draw your route manually (in a MapView) with an overlay. Thy the example here:http://developer.android.com/guide/tutorials/views/hello-mapview.html On Sep 17, 1:02 am, LEMESLE Philippe philippe.leme...@alyotech.fr wrote: Hello, i'm trying to trace routes thanks to the Google maps API. I'm disappointed because i haven't found any informations in docs. An alternative would be for me to launch the Google maps app embedded in the system, with the route. I succesfully launch the application, but i haven't found how i coul'd specify route parameters. bgrds, Philippe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: java.lang.StackOverflowError for sdk1_5r3
Marvelous! I just reduced one hierarchy of view group, and its working fine. Thanks for valuable guide. The hierarchy for list item layout was LinearLayout-TableLayout- TableRow-LinearLayout-Button Now just I removed the last layer of hierarchy LinearLayout- TableLayout-TableRow-Button and now its working fine. In Android, what Is max view hierarchy level normally can be allowable? Once again thanks for help. On Sep 17, 12:08 pm, Romain Guy romain...@google.com wrote: The problem is the number of parents you have. On Wed, Sep 16, 2009 at 11:52 PM, jagtap.jj jagtap...@gmail.com wrote: Thanks for quick reply In list item having four views[2 text views, and 2 buttons]. Is there any another way, I want to keep 4 views for single list item. Actually In app I do have another Tab also it also having custom list adapter and list item also having 4 views(2 TextView and 2 ImageButtons), that Tab works fine. Why does the same list item gets work perfectly on sdk1.1r1 On Sep 17, 11:41 am, Romain Guy romain...@google.com wrote: You have (way) too many views. Remove a few. Your app will load faster, layout faster, draw faster and won't crash. On Wed, Sep 16, 2009 at 11:38 PM, jagtap.jj jagtap...@gmail.com wrote: Hello everybody Some serious error I am using custom listadapter for ListActivity, but half adapter is getting built and then throws java.lang.StackOverflowError. When I ran the same code on sdk1_1r1 it works perfect. When do i try to run on sdk1_5r3, gives this error. Generally java.lang.StackOverflowError when happens if the some function caught in infinite recursion, but if this is case then why does it working on sdk1.1r1 perfectly. I tested the appl on sdk1_5r3 both emulators default AVD(96 RAM) and custom AVD(523 RAM). For all try it gives the same error. Any suggestion will great help. Log Cat: 09-17 11:51:22.437: INFO/dalvikvm(880): Stack overflow, expanding (0x41048200 to 0x41048000) 09-17 11:51:22.447: INFO/dalvikvm(880): Shrank stack (to 0x41048200, curFrame is 0x41049cd8) 09-17 11:51:22.507: DEBUG/AndroidRuntime(880): Shutting down VM 09-17 11:51:22.548: WARN/dalvikvm(880): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-17 11:03:54.488: ERROR/AndroidRuntime(769): Uncaught handler: thread main exiting due to uncaught exception 09-17 11:03:54.597: ERROR/AndroidRuntime(769): java.lang.StackOverflowError 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Styled.measureText(Styled.java:371) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.measureText(Layout.java:1600) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.getLineMax(Layout.java:654) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.Layout.draw(Layout.java:310) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.text.BoringLayout.draw(BoringLayout.java:356) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.TextView.onDraw(TextView.java:3921) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5838) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1484) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1319) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.ListView.dispatchDraw(ListView.java:2820) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.View.draw(View.java:5944) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.widget.AbsListView.draw(AbsListView.java:2121) 09-17 11:03:54.597: ERROR/AndroidRuntime(769): at android.view.ViewGroup.drawChild(ViewGroup.java:1486) 09-17
[android-developers] Re: java.lang.StackOverflowError for sdk1_5r3
jagtap.jj wrote: In Android, what Is max view hierarchy level normally can be allowable? It varies based on what widgets and containers you are using and how you use them. I get nervous when a hierarchy (as shown by hierarchyviewer) gets much over 10 layers deep. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Terminate call programmatically
Hi, Can any one tell me how can i hangup/terminate call programmatically? With the help of intent. Regards! Imtiaz Ali Shah --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SMS intent does not fill in number
I want to send an SMS from an application, but without needing the SMS permission, using an intent. This way the user can also decide if he/ she really wants to proceed to send the SMS. The code looks as follows: Uri smsToUri = Uri.parse(smsto:123456); Intent sendIntent = new Intent(Intent.ACTION_VIEW, smsToUri); sendIntent.putExtra(sms_body, Hello dear world); sendIntent.setType(vnd.android-dir/mms-sms); startActivity(sendIntent); However, when the SMS screen now shows, the number is not filled in. The SMS body is however filled in. This happens on the emulator and on a phone. What am I doing wrong please? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Drag and Drop from Source View to Target View
Hi All, I have a problem statement, and here it is: My requirement is: There are a number of images shown on the screen. I want to allow the user to drag and drop any of the images to anyother image. Based on which image is dragged and on which is it dropped, I need to do something specific. So, I need to find a way so that I can get my source view and my target view. To understand this in a better way, consider a practical scenario. In the File Explorer of Windows, we can drag and drop items from the left pane showing the directory tree to any of the folders shown in the right pane. If anyone of you ever faced a similar scenario, please let me know because I could not find a direct support to such a thing (Drag and Drop) in the platform, so may be I need to find an innovative solution to it. Thanks Raman. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Drag and Drop from Source View to Target View
Raman wrote: If anyone of you ever faced a similar scenario, please let me know because I could not find a direct support to such a thing (Drag and Drop) in the platform, so may be I need to find an innovative solution to it. The home screen does something similar with widgets, and other home implement the same sort of thing. Look at the Android source code, find the home screen, and see how it pulls off drag-and-drop for its case -- you may be able to adapt the technique for your scenario. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Last modification time for each contact record in People table
Please Suggest me that how can we check the updation of each contact in the Contact.People table? On Sep 16, 9:50 am, Alex Tang tangli1987...@gmail.com wrote: In people table there is none column for last modify time. On Sep 15, 8:38 pm, Girish girishg...@gmail.com wrote: Dear All, I would like to the get the last modification time for each Contact in android.provider.Contacts.People table. I have the following queries, a) Is there any column to notify that this contact record is updated. b) Is any column is available like last modification time or revision time to indicate the changes in each record(Each row in table). Please provide us details. Thanks, Girish --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Orientation : onStop onDestroy called from BACK key or not ?
Hi, Each time I switch the orientation of the device, onStop() and onDestroy() are called. They are also called when I close the Avtivity (dismiss()), and when I press 'back' key. In onStop() or onDestroy() methods : how can I know how I can here ? I'd like to run some code when I close the Activity (back button), but not if I change screen orientation --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] WebView : can we select text in Java ?
Hi, I'd like to use WebView to display some content (from my Java code or local temp file). I need to select some characters (change background color) of the view. Of course I need to change those selected char. using my Java code. How can it be done ? Can you post a short example ? 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] Content on emulator
Hi again. I've written an Intent which selects a photo from the gallery. The idea is that the image chosen is received within the onActivityResult() method. On the emulator, I have no images, and it simply says No media found. How do I assign images which are picked up within the emulator, so that I have something to choose from? 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] How to show search bar with Suggestions
Hi All How I can have search bar with google suggestion as a Autocomplete in the view instead of lauching it as popup? I do not want use search manager UI which is displayed as pop dialog. Could you please point me to some link that show how to implement this? -MyDroid --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Disable WebKit JavaScript security for XMLHttpRequest
Hi, I filed a bug. Please star it and comment: http://code.google.com/p/android/issues/detail?id=3930 On Sep 16, 10:05 pm, AJ ajeet.invinci...@gmail.com wrote: I am also looking the answer for this. Thank, AJ On Sep 16, 1:36 pm,MiguelParazmpa...@gmail.com wrote: Hi, Is there any way to disable the WebKit JavaScript security for XMLHttpRequest? I need an HTML file in the local assets to access remote URLs for AJAX style calls. 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] test is not finished by system, infinite animation
Hi, my activity is to show up with an infinite animation, started/ triggered in onResume(). The animation runs and everything seems to be fine. But in my test framework the ActivityInstrumentationTest for this AnimationActivity is not finished by the system, the test is struck and runs forever. Is this a bug, that i cant start infinite animations during onResume() or onCreate()? When I start the animation from another Thread (started in onResume()) that waits 1000 ms and then starts the infinite animation within runOnUiThread(), everything is fine, the tests too! Cheers, Fabian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] old TTS vs new TTS in 1.6
Was the old TTS approach incorporated into the new SDK? If the old TTS was used for an application, will it have to be changed because of 1.6 update? Please advise. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: old TTS vs new TTS in 1.6
dsurround wrote: Was the old TTS approach incorporated into the new SDK? Android did not have TTS prior to 1.6. You may be thinking of the eyes-free project: http://code.google.com/p/eyes-free/ If the old TTS was used for an application, will it have to be changed because of 1.6 update? Whether eyes-free works on Android 1.6 would be a question better asked in that project's group: http://groups.google.com/group/tts-for-android/ The TTS in Android 1.6 seems very similar, but it has different class and package names. blindfold has already begun discussing helping people move from eyes-free to Android 1.6 TTS over in that project's group: http://groups.google.com/group/tts-for-android/browse_frm/thread/68078edcad8d9073 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can I keep a broadcast receiver process alive by creating a service that stays around?
Mark, thanks for the response. You are right if the state can be kept in a persistent store, it is the way to go. However if you want the widget to be a window to what a service does, can one of the buttons on a widget start the service, stop the service, and also collect some stats from the servcie. In such a case can the widget provider and the service stay in the apk file and can the update messages rely on the static variables that the service keeps around. Thanks Satya On Thu, Sep 17, 2009 at 5:59 AM, Mark Murphy mmur...@commonsware.com wrote: Satya Komatineni wrote: The app widget documentation indicates that the widget provider being a receiver of a broadcast service may not exist (the process) beyond the completion of the call. If I want to maintain state between two broadcast events, such as say widgetProvider.onUpdate(), can I start a local service and leave it hanging there until my widgets are disabled? If I didn't explicitly stop that service will it be loaded again and resumed when the device wakes up. Oh, please don't. There should be no need to keep a service in memory just to maintain some state. Since the app widget itself does not reside in your process, the widget framework allows you to keep your widget up to date without consuming much memory. Just persist whatever state you want to a file, SharedPreferences, database, etc. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ADC2 entries so far...
Productivity: DroidDrop - drop.io client Now in the market, search droiddrop Use drop.io to privately share your files notes in drops. Use DroidDrop to: - Create View Drops - Add Notes, Links, and Photos - It's easy to start with the demo drop - View update in the demo and then create your own drops Feedback and ideas wanted! Error reports, too. Contact via email or twitter http://twitter.com/droiddrop You can see a previous video demo here. http://talkingandroid.com/2009/09/01/droiddrop-preview-drop-io-on-android/ I would expect to add: - video upload - audio upload - performance improvements -- Carmen carmendeles...@gmail.com http://www.twitter.com/CarmenDelessio http://www.talkingandroid.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: Drag and Drop from Source View to Target View
Hi Mark, Thanks for your reply. I saw the behaviour you are talking about. If I am not wrong, you are talking about the ability to drag the application icons on the home screen to different locations. I am also able to achieve that, but, unfortunately, that is not what I want. The feature that you are talking about only involves changing the position of a View, while my requirement is to find out the View over which the movable View is dropped. Please note that on the basis of which target view, it is dropped at, I need to do a particular task. So effectively, this problem is reduced to finding the View from the coordinates to which it is dropped or may be some better solution. Do You have any idea for how to go for this... Thanks. - Raman On Sep 17, 4:43 pm, Mark Murphy mmur...@commonsware.com wrote: The home screen does something similar with widgets, and other home implement the same sort of thing. Look at the Android source code, find the home screen, and see how it pulls off drag-and-drop for its case -- you may be able to adapt the technique for your scenario. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 I keep a broadcast receiver process alive by creating a service that stays around?
Satya Komatineni wrote: However if you want the widget to be a window to what a service does, can one of the buttons on a widget start the service, stop the service, and also collect some stats from the servcie. In such a case can the widget provider and the service stay in the apk file and can the update messages rely on the static variables that the service keeps around. Yes, that is technically possible. However, you really do not want to have a service running all of the time, either: http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/ Starting service via a button in the widget does not need the service to be running, by definition. So, I would still recommend that the widget and the service be as decoupled as much as possible, with the service running as little as possible. You may have design constraints that make such decoupling difficult; conversely, Android may have design constraints that make what you want to do difficult. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coders' Guide to *Advanced* Android Development_ In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Button.setTextColor, how to make it work? Options
Experimenting with some UI ideas I wanted to change the color in a button view some time after it had been initially drawn. So it seemed like calling .setTextColor() should do it. But it does not cause the color of the button text to change. Have even tried calling .invalidate() to force a redraw, no luck. Does anyone know the procedure for changing the color of the text in a button after it has been initially drawn? Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Disable WebKit JavaScript security for XMLHttpRequest
Use JSON instead. No cross domain security with that method. -John Coryat What Zip Code? Radar Now! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Drag and Drop from Source View to Target View
Raman wrote: my requirement is to find out the View over which the movable View is dropped. Please note that on the basis of which target view, it is dropped at, I need to do a particular task. So effectively, this problem is reduced to finding the View from the coordinates to which it is dropped or may be some better solution. Ah. Sorry, I have no idea if that is even possible. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coders' Guide to *Advanced* Android Development_ In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Text Alignment
Hello All, I have to use EditText to show some text and the part of text has to be LEFT aligned and rest RIGHT aligned. Is there any way other then extending EditText? I looked for StringSpan option but could not get the way I want. Is there any pointers? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: tabs iphone style
It is incredibly easy to put tabs at the bottom... Just provide a layout xml file that places the TabWidget at the bottom, you get bottom tabs. You can then specify a view to use for a tab indicator, so you can make it look however you want it to look. On Sep 16, 6:24 am, Wouter wouterg...@gmail.com wrote: Hey, I am using tabs also now because the example didn't worked for me.. You can see my application: http://i29.tinypic.com/254wjtg.png(dont mind the images in the tabs, have to replace them ;) ) But when i click on a item in my list i open an activity FilmDetail but here the tabs are not visible.. So i have to press return button to see my tabs again. How can i open this new activity in this tabcontent so i can see the tabs and the filmdetail Activity? Wouter On 16 sep, 15:17, nEx.Software email.nex.softw...@gmail.com wrote: I have done custom tabs in my application (BarTor) using a modified version of the TabHost and TabActivity that i got from the Android Open Source Project. Granted, I leave the tabs at the top, but there is nothing really stopping me from putting them at the bottom or the the sides... I'd suggest trying that route, if you don't mind a little extra work. Perhaps the example you posted is doing the same, I haven't yet looked at it. On Sep 16, 5:36 am, Wouter wouterg...@gmail.com wrote: I see that there are android apps with this style of tabs: http://www.mobilecrunch.com/wp-content/uploads/2009/02/myspace-androi... It must be possible.. On 16 sep, 14:32, Wouter wouterg...@gmail.com wrote: I have tried this but without success! The example on anddev.org is taken fromhttp://code.google.com/p/undroid/source/browse/trunk/src/com/bitsette... i have tried that example because they also work with different activities per tab, but I got nullpointerexception in my layout file and dont see the footer.. Wouter On 16 sep, 07:03, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI http://www.anddev.org/generalized_file_manager_2_-_gfm20-t397.html see this this may helpful to you... to make likeiphone On Tue, Sep 15, 2009 at 8:54 PM, Mark Murphy mmur...@commonsware.comwrote: How can i make something like this: http://www.appsstore.nl/apps/fml/fmlscreen1.jpg So i mean the tabs at the bottom of the screen. It has to be present on every activity and every tab shows and other activity (listactivity). How can i do this? With a lot of work. There is no BottomTabsLikeIPhoneHas widget. Having a bar of ImageButtons is easy. Giving them the proper transparent background (so a sliver of the underlying ListView, as in your screenshot) is the job of a graphic designer. Having the buttons change the contents of the list could be done any number of ways, though I would start with a ViewFlipper. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Content on emulator
You can either take some pictures with the Camera app or use adb push to upload some pictures to the /sdcard. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 17, 5:43 am, Neilz neilhorn...@googlemail.com wrote: Hi again. I've written an Intent which selects a photo from the gallery. The idea is that the image chosen is received within the onActivityResult() method. On the emulator, I have no images, and it simply says No media found. How do I assign images which are picked up within the emulator, so that I have something to choose from? 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] disabling t9 in password box
Can i disable t9 in input box ie textview control, password box. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: tabs iphone style
HI Take One mor layout and place it where evere u need header or footer ... and place a image tab as a sourece... it worked for me On Thu, Sep 17, 2009 at 8:31 PM, nEx.Software email.nex.softw...@gmail.comwrote: It is incredibly easy to put tabs at the bottom... Just provide a layout xml file that places the TabWidget at the bottom, you get bottom tabs. You can then specify a view to use for a tab indicator, so you can make it look however you want it to look. On Sep 16, 6:24 am, Wouter wouterg...@gmail.com wrote: Hey, I am using tabs also now because the example didn't worked for me.. You can see my application: http://i29.tinypic.com/254wjtg.png(donthttp://i29.tinypic.com/254wjtg.png%28dontmind the images in the tabs, have to replace them ;) ) But when i click on a item in my list i open an activity FilmDetail but here the tabs are not visible.. So i have to press return button to see my tabs again. How can i open this new activity in this tabcontent so i can see the tabs and the filmdetail Activity? Wouter On 16 sep, 15:17, nEx.Software email.nex.softw...@gmail.com wrote: I have done custom tabs in my application (BarTor) using a modified version of the TabHost and TabActivity that i got from the Android Open Source Project. Granted, I leave the tabs at the top, but there is nothing really stopping me from putting them at the bottom or the the sides... I'd suggest trying that route, if you don't mind a little extra work. Perhaps the example you posted is doing the same, I haven't yet looked at it. On Sep 16, 5:36 am, Wouter wouterg...@gmail.com wrote: I see that there are android apps with this style of tabs: http://www.mobilecrunch.com/wp-content/uploads/2009/02/myspace-androi... It must be possible.. On 16 sep, 14:32, Wouter wouterg...@gmail.com wrote: I have tried this but without success! The example on anddev.org is taken fromhttp:// code.google.com/p/undroid/source/browse/trunk/src/com/bitsette... i have tried that example because they also work with different activities per tab, but I got nullpointerexception in my layout file and dont see the footer.. Wouter On 16 sep, 07:03, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI http://www.anddev.org/generalized_file_manager_2_-_gfm20-t397.html see this this may helpful to you... to make likeiphone On Tue, Sep 15, 2009 at 8:54 PM, Mark Murphy mmur...@commonsware.comwrote: How can i make something like this: http://www.appsstore.nl/apps/fml/fmlscreen1.jpg So i mean the tabs at the bottom of the screen. It has to be present on every activity and every tab shows and other activity (listactivity). How can i do this? With a lot of work. There is no BottomTabsLikeIPhoneHas widget. Having a bar of ImageButtons is easy. Giving them the proper transparent background (so a sliver of the underlying ListView, as in your screenshot) is the job of a graphic designer. Having the buttons change the contents of the list could be done any number of ways, though I would start with a ViewFlipper. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: tabs iphone style
Hi see this example like this u custom tab also u can make by minute changes http://www.anddev.org/my_own_titlebar_backbutton_like_on_the_iphone-t4591.html On Thu, Sep 17, 2009 at 8:35 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote: HI Take One mor layout and place it where evere u need header or footer ... and place a image tab as a sourece... it worked for me On Thu, Sep 17, 2009 at 8:31 PM, nEx.Software email.nex.softw...@gmail.com wrote: It is incredibly easy to put tabs at the bottom... Just provide a layout xml file that places the TabWidget at the bottom, you get bottom tabs. You can then specify a view to use for a tab indicator, so you can make it look however you want it to look. On Sep 16, 6:24 am, Wouter wouterg...@gmail.com wrote: Hey, I am using tabs also now because the example didn't worked for me.. You can see my application: http://i29.tinypic.com/254wjtg.png(donthttp://i29.tinypic.com/254wjtg.png%28dontmind the images in the tabs, have to replace them ;) ) But when i click on a item in my list i open an activity FilmDetail but here the tabs are not visible.. So i have to press return button to see my tabs again. How can i open this new activity in this tabcontent so i can see the tabs and the filmdetail Activity? Wouter On 16 sep, 15:17, nEx.Software email.nex.softw...@gmail.com wrote: I have done custom tabs in my application (BarTor) using a modified version of the TabHost and TabActivity that i got from the Android Open Source Project. Granted, I leave the tabs at the top, but there is nothing really stopping me from putting them at the bottom or the the sides... I'd suggest trying that route, if you don't mind a little extra work. Perhaps the example you posted is doing the same, I haven't yet looked at it. On Sep 16, 5:36 am, Wouter wouterg...@gmail.com wrote: I see that there are android apps with this style of tabs: http://www.mobilecrunch.com/wp-content/uploads/2009/02/myspace-androi... It must be possible.. On 16 sep, 14:32, Wouter wouterg...@gmail.com wrote: I have tried this but without success! The example on anddev.org is taken fromhttp:// code.google.com/p/undroid/source/browse/trunk/src/com/bitsette... i have tried that example because they also work with different activities per tab, but I got nullpointerexception in my layout file and dont see the footer.. Wouter On 16 sep, 07:03, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI http://www.anddev.org/generalized_file_manager_2_-_gfm20-t397.html see this this may helpful to you... to make likeiphone On Tue, Sep 15, 2009 at 8:54 PM, Mark Murphy mmur...@commonsware.comwrote: How can i make something like this: http://www.appsstore.nl/apps/fml/fmlscreen1.jpg So i mean the tabs at the bottom of the screen. It has to be present on every activity and every tab shows and other activity (listactivity). How can i do this? With a lot of work. There is no BottomTabsLikeIPhoneHas widget. Having a bar of ImageButtons is easy. Giving them the proper transparent background (so a sliver of the underlying ListView, as in your screenshot) is the job of a graphic designer. Having the buttons change the contents of the list could be done any number of ways, though I would start with a ViewFlipper. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: tabs iphone style
nEx.Software wrote: It is incredibly easy to put tabs at the bottom... Just provide a layout xml file that places the TabWidget at the bottom, you get bottom tabs. You can then specify a view to use for a tab indicator, so you can make it look however you want it to look. *blink, blink* How do you specify a view to use for a tab indicator? Subclass TabWidget and override getChildTabViewAt()? Or is there another trick? Knowing that would be hugely useful, if you'd be willing to share the technique. Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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: Terminate call programmatically
You cannot hangup/terminate call programmatically. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 17, 4:09 am, Ajaz Ahmed ajazahme...@gmail.com wrote: Hi, Can any one tell me how can i hangup/terminate call programmatically? With the help of intent. Regards! Imtiaz Ali Shah --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Resuming a Large File Download
I am trying to implement the functionality to resume a large file download, but have not found how to start downloading from a position that is not at the beginning of an InputStream. I am currently using the InputStream.skip() method to go to the position where I want to resume the download, but have found that this method actually reads all the data over the network and then throws it away. I would appreciate some help in learning the correct way to start reading from the resume offset of the internet file being downloaded, so that I can avoid wasting the phone network bandwidth, and also avoid the extra time delay caused by re-downloading all the data that was already previously downloaded. My current code is as follows: File file = new File(mLocalFileName); URL url = new URL(mInternetFileName); URLConnection connection = url.openConnection(); connection.connect(); mInternetFileSize = connection.getContentLength(); if (!file.exists()) { file.createNewFile(); mLocalFileSize = 0; } else { mLocalFileSize = file.length(); } InputStream inputStream = connection.getInputStream(); if (mLocalFileSize 0) { long amountSkipped = 0; do { amountSkipped += inputStream.skip( mLocalFileSize - amountSkipped); } while (amountSkipped mLocalFileSize); } FileOutputStream outputStream = new FileOutputStream(file, mLocalFileSize 0); byte buffer[] = new byte[2048]; do { int bytesRead = inputStream.read(buffer); if (bytesRead = 0) { break; } outputStream.write(buffer, 0, bytesRead); mLocalFileSize += bytesRead; } while (!mCancelDownloads); inputStream.close(); outputStream.close(); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: tabs iphone style
Hmm... This must be a 1.6 SDK change... On Sep 17, 8:06 am, Mark Murphy mmur...@commonsware.com wrote: nEx.Software wrote: It is incredibly easy to put tabs at the bottom... Just provide a layout xml file that places the TabWidget at the bottom, you get bottom tabs. You can then specify a view to use for a tab indicator, so you can make it look however you want it to look. *blink, blink* How do you specify a view to use for a tab indicator? Subclass TabWidget and override getChildTabViewAt()? Or is there another trick? Knowing that would be hugely useful, if you'd be willing to share the technique. Thanks! -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.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: tabs iphone style
Yes... http://developer.android.com/sdk/api_diff/4/changes/android.widget.TabHost.TabSpec.html On Sep 17, 8:16 am, nEx.Software email.nex.softw...@gmail.com wrote: Hmm... This must be a 1.6 SDK change... On Sep 17, 8:06 am, Mark Murphy mmur...@commonsware.com wrote: nEx.Software wrote: It is incredibly easy to put tabs at the bottom... Just provide a layout xml file that places the TabWidget at the bottom, you get bottom tabs. You can then specify a view to use for a tab indicator, so you can make it look however you want it to look. *blink, blink* How do you specify a view to use for a tab indicator? Subclass TabWidget and override getChildTabViewAt()? Or is there another trick? Knowing that would be hugely useful, if you'd be willing to share the technique. Thanks! -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.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: tabs iphone style
nEx.Software wrote: Yes... http://developer.android.com/sdk/api_diff/4/changes/android.widget.TabHost.TabSpec.html Ah, yes. setIndicator() used to just have the Drawable options, not the whole View. I'll have to experiment with these. Thanks for pointing this out! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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: SMS intent does not fill in number
Try: sendIntent.putExtra(address, 123456); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 17, 4:33 am, Gustav Mauer gus...@mauer.co.za wrote: I want to send an SMS from an application, but without needing the SMS permission, using an intent. This way the user can also decide if he/ she really wants to proceed to send the SMS. The code looks as follows: Uri smsToUri = Uri.parse(smsto:123456); Intent sendIntent = new Intent(Intent.ACTION_VIEW, smsToUri); sendIntent.putExtra(sms_body, Hello dear world); sendIntent.setType(vnd.android-dir/mms-sms); startActivity(sendIntent); However, when the SMS screen now shows, the number is not filled in. The SMS body is however filled in. This happens on the emulator and on a phone. What am I doing wrong please? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 does media scanner not list the audio file suffixed with .aac.
On Thu, Sep 17, 2009 at 12:23 AM, Tony Yang tonyyang...@gmail.com wrote: I push a audio file named music.aac into SD card, and then execute Media Scanner application or re-start the device. I found that media scanner didn't process .aac file, so the music.aac file doesn't exist in music player. But Android supports AAC/AAC+/eAAC format. It's supported in a .mp4 or .m4a container, not as a raw .aac file. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: tabs iphone style
I had actually copied the sources for TabActivity, TabHost, and TabWidget from the Open Source Project yesterday, I didn't realize that this was a change actually until your response. I am not even using the 1.6 SDK yet... I am now going to peruse the diff report a little more closely. On Sep 17, 8:24 am, Mark Murphy mmur...@commonsware.com wrote: nEx.Software wrote: Yes...http://developer.android.com/sdk/api_diff/4/changes/android.widget.Ta... Ah, yes. setIndicator() used to just have the Drawable options, not the whole View. I'll have to experiment with these. Thanks for pointing this out! -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.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: old TTS vs new TTS in 1.6
Thanks Mark, that is a better way to ask the question. Seems like the 1.6 version was derived from the eyes-free TTS software. I have a running app that used TTS that I was just about to launch, so wanted to get a feel for whether to hold off and adapt or just to go ahead since it will continue to work. Thanks again... On Sep 17, 9:56 am, Mark Murphy mmur...@commonsware.com wrote: dsurround wrote: Was the old TTS approach incorporated into the new SDK? Android did not have TTS prior to 1.6. You may be thinking of the eyes-free project: http://code.google.com/p/eyes-free/ If the old TTS was used for an application, will it have to be changed because of 1.6 update? Whether eyes-free works on Android 1.6 would be a question better asked in that project's group: http://groups.google.com/group/tts-for-android/ The TTS in Android 1.6 seems very similar, but it has different class and package names. blindfold has already begun discussing helping people move from eyes-free to Android 1.6 TTS over in that project's group: http://groups.google.com/group/tts-for-android/browse_frm/thread/6807... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Development Wiki:http://wiki.andmob.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Button.setTextColor, how to make it work? Options
For example, button.setTextColor(Color.CYAN) should work. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 17, 7:22 am, WoodManEXP woodman...@gmail.com wrote: Experimenting with some UI ideas I wanted to change the color in a button view some time after it had been initially drawn. So it seemed like calling .setTextColor() should do it. But it does not cause the color of the button text to change. Have even tried calling .invalidate() to force a redraw, no luck. Does anyone know the procedure for changing the color of the text in a button after it has been initially drawn? Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: WebView : can we select text in Java ?
On Sep 17, 8:13 pm, Nanard bsegon...@free.fr wrote: Hi, I'd like to use WebView to display some content (from my Java code or local temp file). I need to select some characters (change background color) of the view. Of course I need to change those selected char. using my Java code. How can it be done ? Can you post a short example ? Sorry I have no example, but basically, it's not possible to change the content of the WebView. All you can do is loadUrl() new URLs. However, you can loadURL(javascript:methods()) to call JavaScript code in your WebView content. That will do the work of changing the color using the DOM, or anything dynamic you need. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Route Audio Output to Mic?
When you are in a call the audio is controlled by the baseband (this is valid for the HTC hardware). It might be that the new Motorola cliq offers here more flexibility -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc.! On Sep 17, 3:21 am, Cheng Zhong hust.zch...@gmail.com wrote: Hi guys, I'm trying to play a music (using MediaPlayer) during a call and want the caller to hear the music I'm playing. Unluckly it doens't seem work at all, the caller hear nothing even I set the music volumn to MAX ( of course, the speaker and the mic on Android are far away from each other). Is there any ways to route Android's audio output to its Mic? Or something like Stereo Mix in Windows? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Orientation : onStop onDestroy called from BACK key or not ?
If you want to do something on the back button, look into the various button and event listeners and see if it's that button. Depending on what you register for and what you return, the ordinary back button consequences may not longer happen, ie you app can preempt them or not. Note that in android you don't actually close activities by choice (I know, it's odd) they get closed when the system runs out of resources. On Sep 17, 8:12 am, Nanard bsegon...@free.fr wrote: Hi, Each time I switch the orientation of the device, onStop() and onDestroy() are called. They are also called when I close the Avtivity (dismiss()), and when I press 'back' key. In onStop() or onDestroy() methods : how can I know how I can here ? I'd like to run some code when I close the Activity (back button), but not if I change screen orientation --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 use root permission
IF you want to set root permission with your app, the application has to be started as root. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 17, 1:20 am, Francesco Pace paxa...@gmail.com wrote: Yeah, with adb remount my program works correctly. But If I want set root permission at my simple application (File Browser), How can I do? Thanks... 2009/9/16 cs_post...@hotmail.com cs_post...@hotmail.com Running the mount command from a shell will likely show that /system is mounted read-only as per default android setup, unless you've changed that in the process of rooting the phone. The exact syntax of the (somewhat non-standard?) mount command to use for remounting it read/write is not something I recall at the moment, but you'll find it with some web searching. On Sep 16, 6:32 am, Francesco Pace paxa...@gmail.com wrote: I use Superuser.apk for execute su command. My program write file test.txt in /system but statement Log.v(TEST], String.valueOf(list.length)); return value 0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Signing apps
I don't see anything wrong with that. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 17, 3:03 am, Neilz neilhorn...@googlemail.com wrote: Ok thanks, and as far as Google and Android are concerned there is nothing wrong with someone doing this? On Sep 17, 10:48 am, Marc Lester Tan mail...@gmail.com wrote: Yes you can send your apps signed by the debug key to your friends but they need to make sure Uknown sources is checked under the Application settings. Also, Android Market will not accept your APK if it is signed by the debug key. -Marc On Thu, Sep 17, 2009 at 5:42 PM, Neilz neilhorn...@googlemail.com wrote: Hi all. Just trying to get my head around this signing principle. The dev guide says: The Android system will not install or run an application that is not signed appropriately. But I haven't signed the app I'm developing, and it runs fine on both the emulator and my device. Ok, so it's being signed with the eclipse debug key? But how come that still runs on the device. And if it runs on my device, what is there to stop me sending it out to friends to install on theirs? Is this possible, and is it technically allowed to do so? Thanks for your advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 1.6 SDK is here!
Hi, I will try to speak in english :-) my question is, will the g1phone be able to run 1.6 (system requirenments)? Julian. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Image in RemoteView disappearing or changing
Hi, as an update, I noticed that the resource IDs in the BroadcastReceiver's application and that of the calling application appear to be overlapped and getting confused with one another. On Sep 16, 5:20 pm, ccylan charles.cy...@gmail.com wrote: Hello, Over the past few days I have been trying to implement custom widget functionality. In this case I have instantiated a RemoteView containing some TextViews and an ImageView in one application's BroadcastReceiver. The BroadcastReceiver receives the intent signaling it to send the RemoteView to the calling application. When the calling application receives this RemoteView it uses apply to inflate the view properly and display it on the screen. The problem occurs when the activity changes, the inflated RemoteView occasionally has information disappear. One time the image even changed into another image from a drawable located in the BroadcastReceiver's application. Has anyone else experienced a similar problem and/or have a solution? I have looked at posts concerning ImageViews in widget use and orientation changes. Is this problem related? I am not entirely sure. I am currently running Android 1.5 SDK and am not able to upgrade for this side project of mine. Thank you for reading my concern. Sincerely, Charles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] 1.6 SDK - OpenGL
So, I see that there have been some changes in the android.opengl package, specifically the addition of GLES10, GLES11, GLES10Ext, and GLES11Ext. These appear to be exactly the same as those similarly named in the javax.microedition.khronos.opengles package. So I have to ask... Are these the same? If not, what are the differences? If they are, does that mean that the latter will be going away eventually and that we should use those in android.opengl? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ANDROID SDK 1.6 DOES NOT SUPPORT ARABIC LOCALE
You are right. Arabic letters are all rendered as uniform rectangles, which is even worse than the slightly-comical way in which the iPhone renders Arabic. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 16, 6:45 pm, Raphael r...@android.com wrote: I don't think there's any support for right-to-left in the system yet. R/ On Wed, Sep 16, 2009 at 6:12 PM, Ahmad Al-Ibrahim a.alibra...@gmail.com wrote: Disappointed, I was so happy to see Arabic listed in the docs. Any suggestion on how to get that done? or at least add Arabic fonts to be able to read Arabic across multiple apps? On Sep 17, 3:40 am, Xavier Ducrohet x...@android.com wrote: This looks to be a doc bug actually. The locale list in the SDK system image has not changed since 1.5 sorry about that. Xav On Wed, Sep 16, 2009 at 5:19 PM, almoumen almu...@gmail.com wrote: Hi everyone if you just have a look into the new locales that are added to the new SDK 1.6, you will notice that among these locales is Arabic http://developer.android.com/sdk/android-1.6.html but unfortunately, when I tried to run the emulator,I didn't find any locale supported Arabic. Could you please give more clarifications about this issue ?? -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Like to look at space?
Search for free app NASAImages on Market --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: connect to Google maps API or app to trace routes ...
I think they deprecated their API per Maps terms and conditions, http://maps.google.com/help/terms_maps.html, section 2g. Anyone more knowledgeable about this restriction, feel free to clarify. On Sep 17, 5:15 am, LEMESLE Philippe philippe.leme...@alyotech.fr wrote: thank you for your answer ... but i have already integrated a map in my app with points on overlays Why com.google.googlenav is deprecated ? Google don't want us to show routes on maps ? -Message d'origine- De : android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] De la part de Jeremy Logan Envoyé : jeudi 17 septembre 2009 10:57 À : Android Developers Objet : [android-developers] Re: connect to Google maps API or app to trace routes ... You'll have to draw your route manually (in a MapView) with an overlay. Thy the example here:http://developer.android.com/guide/tutorials/views/hello-mapview.html On Sep 17, 1:02 am, LEMESLE Philippe philippe.leme...@alyotech.fr wrote: Hello, i'm trying to trace routes thanks to the Google maps API. I'm disappointed because i haven't found any informations in docs. An alternative would be for me to launch the Google maps app embedded in the system, with the route. I succesfully launch the application, but i haven't found how i coul'd specify route parameters. bgrds, Philippe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Menu buttons in bottom part of layout
It's not a hack, its telling the linear layout to do the kind of stuff that it does: reserve no space for that view (height=0), but give it all remaining space (weight=1 and all other views left with the default weight=0). And yes, this is a typical way of building a UI that can deal with different sizes (if you don't already have a list view or some other scrollable container with the bulk of the data). And it's not just different screen sizes: it allows you to resize your UI when the soft keyboard is displayed, when switching between landscape and portrait, etc. A good example to look at is the contacts edit screen. As of 1.6, there will also be new layouts for different screen sizes, but you need to avoid relying on this for resizing because there is not one resource for every possible size, and even with similar screen sizes being combined the sheer number you would need to do is overwhelming: layout-small layout-small-land layout-normal layout-normal-long layout-normal-land layout-normal-long-land layout-large layout-large-long layout-large-land layout-large-long-land On Thu, Sep 17, 2009 at 3:16 AM, Mihai Dumitrache mmd...@gmail.com wrote: Hello, Thanks. I don't know if this is a hack (it looks like at least for me), but it's cool. I would ask you if this is how you really build you layout on android ? using scrollview for stretching views on different screen sizes, or is there some official guidelines to follow. Is there some kind of way to create custom layouts for different screen sizes(qvga, hvga), just like layout and layout-land folders ? Thanks again. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: will the device wake up if there is a widget instance on the homepage but the widget provider or receiver is disabled?
Ah sorry I am probably mistaken on that. So keep that time long please. :) On Thu, Sep 17, 2009 at 2:57 AM, Mark Murphy mmur...@commonsware.comwrote: Satya Komatineni wrote: Diane, Perhaps I got my question wrong. But the following url http://developer.android.com/guide/topics/appwidgets/index.html indicates that Note: If the device is asleep when it is time for an update (as defined by updatePeriodMillis), then the device will wake up in order to perform the update. This is based on 1.5. I also seem to recall Jeff Sharkey saying that the updatePeriodMillis does use a WAKEKUP flavor of alarm in the AlarmManager. People implementing app widgets are welcome to set updatePeriodMillis to be some ridiculously high value (or 0 might work...I forget) and handle their own updates with their own alarms. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: singleTask really always at the root of activity stack?
Ah the problem is that you want to put singleTask on what you have -published- as your main activity, which is the splash screen. This is the thing that the use launches from home. What has happened is: 1. Splash screen launched into its own task. 2. Main activity launched into its own task. 3. Splash screen exits. 4. User launches app again, which is the splash screen activity. 5. The splash screen activity has the same task affinity is the currently running main activity, so the system brings the current main activity to the foreground and launches the splash screen on top of it. So make your splash screen singleTask instead of the main activity which is really inside of your app's task flow, and all should be fine. (Or don't use singleTask at all. Is there a reason you are using? Very few apps actually do want it, and unless your app is designed to be launched by other apps in special ways, there is almost certainly no reason to use it at all.) On Thu, Sep 17, 2009 at 1:29 AM, RickardF rickard.fahlqu...@gmail.comwrote: Thanks for your response. I've browsed this group and it seems the launchMode settings have caused a little confusion at times. This is also valid for me, I'm afraid... Anyway, I have pasted an excerpt from the output of adb shell dumpsys activity (sorry for the mass of text) for the situation where I have one application with two activities; SplashScreen (launchMode normal) and mainActivity (launchMode singleTask). I have started the application from the launcher which starts the SplashScreen activity. From there the mainActivity is started with: Intent intent = new Intent(SplashScreen.this, com.rick.myApp.MainActivity.class); SplashScreen.this.startActivity(intent); To me, the dump indicates that Task11 contains two activities where SplashScreen is at the front of the task (root?) and MainActivity is not at the top of the stack. When we know that MainActivity has launchMode=singleTask, doesn't the dump contradict the documentation in the sense that it is not at the root? Thanks for helping me understand this. /Rickard DUMP OF SERVICE activity: Activities in Current Activity Manager State: Task{11 com.rick} clearOnBackground=false numActivities=2 rootWasReset=false affinity=com.rick intent=Intent { flags=0x1000 comp={com.rick/ com.rick.ui.activity.SplashScreen} } affinityIntent=null origActivity=null lastActiveTime=68582390 (inactive for 9s) History #5: HistoryRecord{4360d2d0 {com.rick/com.rick.myapp.MainActivity}} packageName=com.rick processName=com.rick launchedFromUid=10018 app=ProcessRecord{437381f0 1106:com.rick/ 10018} Intent { comp={com.rick/com.rick.myapp.MainActivity} } frontOfTask=false task=Task{11 com.rick} taskAffinity=com.rick realActivity=ComponentInfo{com.rick/ com.rick.myapp.MainActivity} dir=/data/app/com.rick.apk res=/data/app/com.rick.apk data=/ data/data/com.rick labelRes=0x7f080005 icon=0x7f020004 theme=0x1030006 stateNotNeeded=false componentSpecified=true isHomeActivity=false configuration={ scale=1.0 imsi=310/260 locale=en_US touch=3 key=2/1/2 nav=3 orien=1 } resultTo=null resultWho=null resultCode=-1 results=null pendingResults=null readUriPermissions=null writeUriPermissions=null launchFailed=false haveState=false icicle=null state=RESUMED stopped=false finishing=false keysPaused=false inHistory=true persistent=false launchMode=2 fullscreen=true visible=true frozenBeforeDestroy=false thumbnailNeeded=false idle=true waitingVisible=false nowVisible=true configDestroy=false configChangeFlags=0 connections=null History #4: HistoryRecord{435db2f0 {com.rick/ com.rick.ui.activity.SplashScreen}} packageName=com.rick processName=com.rick launchedFromUid=-1 app=ProcessRecord{437381f0 1106:com.rick/ 10018} Intent { flags=0x1000 comp={com.rick/ com.rick.ui.activity.SplashScreen} } frontOfTask=true task=Task{11 com.rick} taskAffinity=com.rick realActivity=ComponentInfo{com.rick/ com.rick.ui.activity.SplashScreen} dir=/data/app/com.rick.apk res=/data/app/com.rick.apk data=/ data/data/com.rick labelRes=0x7f080005 icon=0x7f020004 theme=0x1030006 stateNotNeeded=false componentSpecified=true isHomeActivity=false configuration={ scale=1.0 imsi=310/260 locale=en_US touch=3 key=2/1/2 nav=3 orien=1 } resultTo=null resultWho=null resultCode=0 results=null pendingResults=null readUriPermissions=null writeUriPermissions=null launchFailed=false haveState=true icicle=Bundle [mParcelledData.dataSize=364] state=STOPPED stopped=true finishing=false keysPaused=false inHistory=true
[android-developers] Re: How use root permission
Your problem is not in setting root permission, but in trying to do something that root permission does not directly enable, such as writing to a read-only file system. To do that your program will have to remount the filesystem read/write, or you will have to change the system startup scripts to make it writeable by default. Why particularly do you need to write to /system anyway? Or was that just a poorly chosen test case? On Sep 17, 4:20 am, Francesco Pace paxa...@gmail.com wrote: Yeah, with adb remount my program works correctly. But If I want set root permission at my simple application (File Browser), How can I do? Thanks... 2009/9/16 cs_post...@hotmail.com cs_post...@hotmail.com Running the mount command from a shell will likely show that /system is mounted read-only as per default android setup, unless you've changed that in the process of rooting the phone. The exact syntax of the (somewhat non-standard?) mount command to use for remounting it read/write is not something I recall at the moment, but you'll find it with some web searching. On Sep 16, 6:32 am, Francesco Pace paxa...@gmail.com wrote: I use Superuser.apk for execute su command. My program write file test.txt in /system but statement Log.v(TEST], String.valueOf(list.length)); return value 0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Image in RemoteView disappearing or changing
I had/have the/a disappearing widget image problem too, and mine wasn't related to orientation changes. My post is back 10 pages or so. I also posted how I got round it: keeping the image cached in device memory and then setting the removeview image with views.setImageViewUri. Good luck, Lee On Sep 17, 5:25 pm, ccylan charles.cy...@gmail.com wrote: Hi, as an update, I noticed that the resource IDs in the BroadcastReceiver's application and that of the calling application appear to be overlapped and getting confused with one another. On Sep 16, 5:20 pm, ccylan charles.cy...@gmail.com wrote: Hello, Over the past few days I have been trying to implement custom widget functionality. In this case I have instantiated a RemoteView containing some TextViews and an ImageView in one application's BroadcastReceiver. The BroadcastReceiver receives the intent signaling it to send the RemoteView to the calling application. When the calling application receives this RemoteView it uses apply to inflate the view properly and display it on the screen. The problem occurs when the activity changes, the inflated RemoteView occasionally has information disappear. One time the image even changed into another image from a drawable located in the BroadcastReceiver's application. Has anyone else experienced a similar problem and/or have a solution? I have looked at posts concerning ImageViews in widget use and orientation changes. Is this problem related? I am not entirely sure. I am currently running Android 1.5 SDK and am not able to upgrade for this side project of mine. Thank you for reading my concern. Sincerely, Charles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Menu buttons in bottom part of layout
Let me add to this a little more, in case I give a mistaken impression: I can't imagine an app that will need to design different layouts for all of these screen sizes. In fact, the vast majority of apps only need one layout, period. As long as you consider how your UI can be resized when you design it (from the obvious/easy thing of having a list view or scroll view holding its main content, to simply positioning and/or centering fixed UI elements in the overall space), then nothing has changed from a few weeks ago when the only screen was HVGA. There also was already a strong motivation to deal with different screen sizes already, in order to best interact with the IME which ideally will be allowed to resize the app's UI when it is displayed. In fact, in our testing with QVGA devices, the vast majority of apps already work fine on them, so developers will just need to toggle the flag to say so. The reason we don't show such apps by default, though, is because there are some that have significant issues, there is nothing the platform can really do about that, and the developer had no reason to expect to run on such a screen, so we don't want them getting bad reviews on market as a result. The one screen size that people are most likely to want to take into special consideration is large, which represents a screen significantly larger than a traditional phone screen. In this case, there are many things an app may want to do to take advantage of all that new space, rather than just show more data in a list (with very wide items). This isn't critical, because you certainly can just let your app resize, or even live with the system's compatibility mode of putting it in a postage stamp on the larger display, but it may be worth starting to think about. On Thu, Sep 17, 2009 at 9:52 AM, Dianne Hackborn hack...@android.comwrote: It's not a hack, its telling the linear layout to do the kind of stuff that it does: reserve no space for that view (height=0), but give it all remaining space (weight=1 and all other views left with the default weight=0). And yes, this is a typical way of building a UI that can deal with different sizes (if you don't already have a list view or some other scrollable container with the bulk of the data). And it's not just different screen sizes: it allows you to resize your UI when the soft keyboard is displayed, when switching between landscape and portrait, etc. A good example to look at is the contacts edit screen. As of 1.6, there will also be new layouts for different screen sizes, but you need to avoid relying on this for resizing because there is not one resource for every possible size, and even with similar screen sizes being combined the sheer number you would need to do is overwhelming: layout-small layout-small-land layout-normal layout-normal-long layout-normal-land layout-normal-long-land layout-large layout-large-long layout-large-land layout-large-long-land On Thu, Sep 17, 2009 at 3:16 AM, Mihai Dumitrache mmd...@gmail.comwrote: Hello, Thanks. I don't know if this is a hack (it looks like at least for me), but it's cool. I would ask you if this is how you really build you layout on android ? using scrollview for stretching views on different screen sizes, or is there some official guidelines to follow. Is there some kind of way to create custom layouts for different screen sizes(qvga, hvga), just like layout and layout-land folders ? Thanks again. -- 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. -- 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] Default behaviour of the Back button
Hi, I am confused, as to what the default behaviour of the back button is, as far as the Android platform is concerned. For example, in the Contacts Application, if I am creating a contact, I just key in a name, and the press back button, the contact is saved with only the name. Fair enough. But, I then edit this contact to include a phone number and press back button. This contact is updated which now includes the phone number. I again edit this contact. This time I remove the name, as well as the phone number and press the back button. I get a message saying, Contact doesn't exist. In this case, it deletes the contact. :( In the mail appllication, while composing, when I press back, it goes to the drafts folder. Thats good. But, if I just have to cancel this, and I don't want this to go to drafts folder. For this, I have to open the menu, and select Cancel. Is there any guideline for the back button, as to how should it behave. Waiting for your comments and suggestions. Thanks and Regards, Dexter. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---