[android-developers] Alpha Buffer support on G1
Since Google groups doesn't let you add posts to threads more than 60 days old, and I want to leave a solution to the problem I encountered a while back, I'm posting this message with the same title in hopes that anyone running into the problem I had will find this message as well. I was having trouble getting my G1 to render an RGBA_ OpenGL context to the screen. Everything was twice the size it should be because the pixels were being interpreted as two 565 pixels. The colors were obviously wrong as well. I had missed a critical function call. You must configure the Surface that is being used by EGL using the SurfaceHolder method setFormat. The pixel format needs to be TRANSLUCENT, or more specifically you can use RGBA_. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Widget process lifetime: Why not stop the service?
On Sat, May 23, 2009 at 12:50 PM, Michael Elsdörfer wrote: > From what I understand, a service must be used in any case to avoid ANR > when processing the request might take a bit longer. Oh sure, if you are going to do some longer-running -continuous- work then use a service. Don't use a service to sit there and do nothing but schedule future work (which is what you seemed to be describing in your first post). The widget example on the developer blog uses a service as well, but > does not call Service.stopSelf() when done. Hm. Bad sample code! No cookie! I'll see about getting that fixed. In the meantime, consider stopping a service when it is done with its work to be a Good Thing. :} -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Loading listview items from service results in hang
How would I delay the saved state application until I load the service then? LOADING is my android:empty view - I guess I could remove it... Thanks, Isaac Waller On May 23, 9:11 pm, Marco Nelissen wrote: > On Sat, May 23, 2009 at 8:27 PM, Isaac Waller wrote: > > > No, what you are supposed to do, is not return from onCreate until you > > are ready to show your GUI. I am not ready without these items. If it > > took, say, 2 or 3 seconds to load these items, maybe, but it takes a > > fraction of a second - the screen flashes 'LOADING' and then shows the > > items. It looks quite ugly. > > So why do you flash 'LOADING'? If it's that fast, just don't show anything, > and it will look exactly the same as if you'd blocked the UI thread. > > > And then there is the losing of scroll > > position and focus too. > > There are several ways to address that, most of them trivial. > The fact of the matter is that you can't block the UI thread to wait for > the onServiceConnected() callback. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Airtell calling card - receipt
Hi, I'm extremely sorry for this. In fact the mail-id "android-developers" had been added by accident (might be auto-fill in of address fields). However I do apologize for the trouble. Warm Regards, Anil On Sun, May 24, 2009 at 2:13 AM, Disconnect wrote: > You might want to change that. > > On Sat, May 23, 2009 at 12:10 PM, Anil Sasidharan wrote: > >> Airtel calling card >> >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] More FaceBook, My Space, Youtube, Google News Online at this
http://free-belajaronline.blogspot.com/2009/05/myspace-is-in-real-trouble-if-these.html MySpace Is In Real Trouble If These Page View Decl... http://free-belajaronline.blogspot.com/2009/05/hip-hop-star-murdered-just-two-hours.html Hip Hop Star Murdered Just Two Hours After His Fir... http://free-belajaronline.blogspot.com/2009/05/facebook-turns-down-8-billion-valuation.html Facebook Turns Down $8 billion Valuation Term Shee... http://free-belajaronline.blogspot.com/2009/05/buzzd-unveils-location-based.html Buzzd Unveils Location-Based Entertainment Guide F... http://free-belajaronline.blogspot.com/2009/05/adaptiveblue-enhances-sticky-web.html AdaptiveBlue Enhances Sticky Web Browser Companion... http://free-belajaronline.blogspot.com/2009/05/jimdo-sells-30-stake-to-united-internet.html Jimdo Sells 30% Stake To United Internet, Signs De... http://free-belajaronline.blogspot.com/2009/05/interview-with-queen-rania-of-jordan-on.html An Interview With Queen Rania of Jordan On How Twi... http://free-belajaronline.blogspot.com/2009/05/larry-page-twitter-made-google-focus-on.html Larry Page: Twitter Made Google Focus On Realtime ... http://free-belajaronline.blogspot.com/2009/05/live-from-yahoos-end-of-10-blue-links.html Live From Yahoo’s “End of the 10 Blue Links” Talk http://free-belajaronline.blogspot.com/2009/05/nuevo-google-adds-message-translation.html ¡Nuevo! Google Adds Message Translation To Gmail http://free-belajaronline.blogspot.com/2009/05/european-social-network-netlog-to-use.html European Social Network Netlog To Use Mollom’s Spa... http://free-belajaronline.blogspot.com/2009/05/record-industrys-failed-totalmusic.html The Record Industry’s Failed TotalMusic Project Fi... http://free-belajaronline.blogspot.com/2009/05/google-releases-tweaked-version-of.html Google Releases Tweaked Version of Reader http://free-belajaronline.blogspot.com/2009/05/yahoo-search-as-we-know-it-is-over.html Yahoo Search, As We Know It, Is Over http://free-belajaronline.blogspot.com/2009/05/tipjoy-makes-useful-premium-twitter-app.html Tipjoy Makes A Useful Premium Twitter App To Test ... http://free-belajaronline.blogspot.com/2009/05/footbo-raises-1-million-for-social.html Footbo Raises $1 Million For Social Network Focuse... http://free-belajaronline.blogspot.com/2009/05/bitauto-chinese-canary-in-online-ad.html BitAuto: A Chinese Canary in an Online Ad Coal Min... http://free-belajaronline.blogspot.com/2009/05/facebook-verified-apps-rolling-out.html Facebook Verified Apps Rolling Out Tomorrow (Updat... http://free-belajaronline.blogspot.com/2009/05/freemium-model-and-desktop-app-get.html The Freemium Model And A Desktop App Get The Thumb... http://free-belajaronline.blogspot.com/2009/05/former-myspace-execs-get-funding-for.html Former MySpace Execs Get Funding For New Venture; ... http://free-belajaronline.blogspot.com/2009/05/amazon-updates-kindle-app-to-be-more.html Amazon Updates The Kindle App To Be More iPhone-if... http://free-belajaronline.blogspot.com/2009/05/may-20-2009-techcrunch-t-mobile-lets.html May 20, 2009 TechCrunch T-Mobile Lets Consumers Pu... http://free-belajaronline.blogspot.com/2009/05/t-mobile-lets-consumers-put-its-pricing.html T-Mobile Lets Consumers Put Its Pricing To The Tes... http://free-belajaronline.blogspot.com/2009/05/roger-mcnamee-invests-in-stimulist-news.html Roger McNamee Invests In The Stimulist, News Site ... http://free-belajaronline.blogspot.com/2009/05/report-iphone-applications-are-getting.html Report: iPhone Applications Are Getting Cheaper http://free-belajaronline.blogspot.com/2009/05/stroll-through-facebooks-new-app.html A Stroll Through Facebook’s New App Directory http://free-belajaronline.blogspot.com/2009/05/new-zealand-telco-seems-to-further.html New Zealand Telco Seems To Further Verify New iPho... http://free-belajaronline.blogspot.com/2009/05/village-voice-media-sites-now-get-40.html Village Voice Media Sites Now Get 40 Percent Of Tr... http://free-belajaronline.blogspot.com/2009/05/youtube-offers-brand-partners-another.html YouTube Offers Brand Partners Another Carrot: Goog... http://free-belajaronline.blogspot.com/2009/05/twitter-shies-away-from-advertisingfor.html Twitter Shies Away From Advertising…For Now http://free-belajaronline.blogspot.com/2009/05/ray-ozzie-asserts-microsofts-position.html Ray Ozzie Asserts Microsoft’s Position In The Clou... http://free-belajaronline.blogspot.com/2009/05/twitter-surges-past-digg-linkedin-and.html Twitter Surges Past Digg, LinkedIn, And NYTimes.co... http://free-belajaronline.blogspot.com/2009/05/strap-in-mozillas-jetpack-may-be-next.html Strap In: Mozilla’s Jetpack May Be The Next Step I... http://free-belajaronline.blogspot.com/2009/05/google-suggest-adds-hyperlinks.html Google Suggest Adds Hyperlinks, Personalization An... http://free-belajaronline.blogspot.com/2009/05/billshrink-gets-major-marketing-love.html BillShrink Gets Major Marketing Love From T-Mobile... http://free-belajaronline.
[android-developers] Re: How to solve "G1/HTC Magic not recognized by ADB under Windows"
2009/5/21 Cédric Berger : > I had asked HTC if they had drivers... > their answer :-( : > " > You recently wrote us about an issue that you have encountered with your htc > To clarify your issue, you stated that: you would like to install usb driver > in Google android SDK 1.5. – Unfortunately we do not do the developer > support and we are unable to answer your question. If the above steps do not > resolve your issue, we invite you to visit the support area on our Web site. > Please go to: http://www.htc.com/www/support.aspx " > " I'll translate: "No, they are part of the Android SDK" :-p 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] Re: Problem installing application onto HTC Magic
On Thu, May 21, 2009 at 6:20 AM, Android Users wrote: > > Any help on this as this is stopping our work. Searched in all android > forums, but no luck.. You need to ask your carrier to provide the maps binaries in their system images (or did you create your own system images?) The SDK only helps you develop application that run with whatever API a given device has. Maps is not part of the "core" Android platform, it is part of the "Google Experience" devices with combine the Android system with a set of Google-specific applications. The SDK will not magically make these apps appear on a given device. Only a carrier can decide that. So the bottom line is: does your device have Maps on them? As you said, your device does not have it, so do not expect anything to work that requires the maps API. HTH 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] Re: Android Loading listview items from service results in hang
On Sat, May 23, 2009 at 8:27 PM, Isaac Waller wrote: > > No, what you are supposed to do, is not return from onCreate until you > are ready to show your GUI. I am not ready without these items. If it > took, say, 2 or 3 seconds to load these items, maybe, but it takes a > fraction of a second - the screen flashes 'LOADING' and then shows the > items. It looks quite ugly. So why do you flash 'LOADING'? If it's that fast, just don't show anything, and it will look exactly the same as if you'd blocked the UI thread. > And then there is the losing of scroll > position and focus too. There are several ways to address that, most of them trivial. The fact of the matter is that you can't block the UI thread to wait for the onServiceConnected() callback. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Installing the USB driver for HTC Magic on Vista
2009/5/22 Cédric Berger : > > 2009/5/21 Cédric Berger >> >> took me a LOT of trials before it worked ! >> >> I finally have this rule and it is OK (did not have to edit user groups on >> my system): >> >> SYSFS{idVendor}=="0bb4", SYSFS{idProduct}=="0c02", MODE="0666", >> GROUP="plugdev" Oh sorry, I forgot to mention that the syntax changes slightly with the udev version. You know, just to make this more interesting :-) > this was in /etc/udev/rules.d/50-android.rules > > But it seems to also work like this : (method for Ubuntu 9.04 : > http://www.frandroid.com/2371/ubuntu-904-et-android/ ) > -> in /etc/udev/rules.d/51-android.rules : > SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4", MODE=”0666" Ubuntu 9.04 already has a rules/50-something file so you need to make sure that the android rule is > 50. Otherwise whatever you define gets reset. We should update the doc to just state rule/51-android.rules which will work right now till the base configuration changes once again :-) > Also take care if you copy/paste this rule : looks like double quotes > (") may be wrongly copied from html page, and then it did not work for > me before I retyped them. Hmm thanks for the info. That's a new one. 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] Re: Android Loading listview items from service results in hang
No, what you are supposed to do, is not return from onCreate until you are ready to show your GUI. I am not ready without these items. If it took, say, 2 or 3 seconds to load these items, maybe, but it takes a fraction of a second - the screen flashes 'LOADING' and then shows the items. It looks quite ugly. And then there is the losing of scroll position and focus too. On May 23, 8:23 pm, Marco Nelissen wrote: > "hanging the UI thread" is the hack. I suggest you do it the right way > instead. > > On Sat, May 23, 2009 at 8:09 PM, Isaac Waller wrote: > > > Even if I changed that, I would lose the saved list scroll position > > and selected item. > > I do not want to make some hack around running it in the UI thread - I > > want to hang the UI thread. > > > On May 23, 8:06 pm, Jason Proctor wrote: > > > >If I do this, then I lose the benefits of running it in the UI thread. > > > >I want to hang my application until it gets these items, because if > > > >not, my view with id="android:empty" shows up for a second, and that > > > >looks ugly. > > > > >So put in another view, one that's not ugly. > > > > how about some kind of progress indicator to indicate that something > > > is happening? > > > > -- > > > jason.software.particle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Loading listview items from service results in hang
"hanging the UI thread" is the hack. I suggest you do it the right way instead. On Sat, May 23, 2009 at 8:09 PM, Isaac Waller wrote: > > Even if I changed that, I would lose the saved list scroll position > and selected item. > I do not want to make some hack around running it in the UI thread - I > want to hang the UI thread. > > On May 23, 8:06 pm, Jason Proctor wrote: > > >If I do this, then I lose the benefits of running it in the UI thread. > > >I want to hang my application until it gets these items, because if > > >not, my view with id="android:empty" shows up for a second, and that > > >looks ugly. > > > > >So put in another view, one that's not ugly. > > > > how about some kind of progress indicator to indicate that something > > is happening? > > > > -- > > jason.software.particle > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Loading listview items from service results in hang
Even if I changed that, I would lose the saved list scroll position and selected item. I do not want to make some hack around running it in the UI thread - I want to hang the UI thread. On May 23, 8:06 pm, Jason Proctor wrote: > >If I do this, then I lose the benefits of running it in the UI thread. > >I want to hang my application until it gets these items, because if > >not, my view with id="android:empty" shows up for a second, and that > >looks ugly. > > >So put in another view, one that's not ugly. > > how about some kind of progress indicator to indicate that something > is happening? > > -- > jason.software.particle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android Loading listview items from service results in hang
>If I do this, then I lose the benefits of running it in the UI thread. >I want to hang my application until it gets these items, because if >not, my view with id="android:empty" shows up for a second, and that >looks ugly. > > >So put in another view, one that's not ugly. how about some kind of progress indicator to indicate that something is happening? -- jason.software.particle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Loading listview items from service results in hang
On Sat, May 23, 2009 at 5:51 PM, Isaac Waller wrote: > > > Move the "now retrieve from service using binder and set list adapter" > > into onServiceConnected() and get rid of the sleep() infinite loop. > If I do this, then I lose the benefits of running it in the UI thread. > I want to hang my application until it gets these items, because if > not, my view with id="android:empty" shows up for a second, and that > looks ugly. So put in another view, one that's not ugly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 should I call an application from another application?
Using intents. http://developer.android.com/reference/android/content/Intent.html You can browse through a few examples here: http://www.openintents.org/en/applications Peli www.openintents.org On 23 Mai, 06:30, "iou200...@gmail.com" wrote: > As the subject ,I want to know How should I call an application from > another application?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 Loading listview items from service results in hang
> Move the "now retrieve from service using binder and set list adapter" > into onServiceConnected() and get rid of the sleep() infinite loop. If I do this, then I lose the benefits of running it in the UI thread. I want to hang my application until it gets these items, because if not, my view with id="android:empty" shows up for a second, and that looks ugly. > Is your service positively deterministic, such that it will *always* > take less than a second? Or does it take less than a second only in > normal conditions (e.g., connectivity is OK to some server you're > fetching data from)? The data is inside a List inside my service, already pre-made. It should take basically no time at all. How would I fix the deadlock? On May 23, 5:33 pm, Mark Murphy wrote: > Isaac Waller wrote: > > In my Android application, I have a ListActivity. This ListActivity > > uses a SimpleAdapter that I fill with items from my service. So, in my > > code, I do: > > > MySuperCoolService.Binder serviceBinder = null; > > private ServiceConnection serviceConnection = new ServiceConnection() > > { > > public void onServiceConnected(ComponentName className, > > IBinder service) { > > Log.d(TAG, "Service connection: connected!"); > > serviceBinder = (MySuperCoolService.Binder)service; > > } > > public void onServiceDisconnected(ComponentName className) { > > Log.d(TAG, "Service connection: disconnected"); > > serviceBinder = null; > > } > > }; > > bindService(new Intent(this, MySuperCoolService.class), > > serviceConnection, BIND_AUTO_CREATE); > > while(serviceBinder==null) { > > Thread.Sleep(1000); > > } > > // now retrieve from service using binder and set list adapter > > Icky! > > Move the "now retrieve from service using binder and set list adapter" > into onServiceConnected() and get rid of the sleep() infinite loop. > > > This whole operation takes hardly any time (less than a second), so I > > want it to run in the UI thread. > > Is your service positively deterministic, such that it will *always* > take less than a second? Or does it take less than a second only in > normal conditions (e.g., connectivity is OK to some server you're > fetching data from)? > > > The reason I want this to run in the UI thread is that if you have a > > list item selected, or you have scrolled to a certain position in the > > ListView, and you rotate the device or take out the keyboard or > > something (to trigger a configuration change) when my activity is > > restarted, Android will try to restore the state right after onCreate. > > By default, yes. There are other ways of dealing with this. > > > But, if I run it in a separate thread, it will not. > > Sure it can. Either don't reload the state from the service (by using > onRetainNonConfigurationInstance() and having your state persist across > rotations), or fork another background thread (if these are > load-data-and-close threads), or tell a persistent background thread > "yo! load the stuff again!". > > > The problem I am having with running it in the UI thread is that when > > I try to bind to the service, that service bind request gets put onto > > the message queue. > > Correct. > > > But then when I go into my loop, I stop the message > > queue from looping. > > Equally correct. > > > So my program hangs, because it's waiting for the > > service to get bound, and the service won't get bound until the loop > > ends (I think you call this a deadlock). > > Spot on! In other words, icky! > > > Sorry for such a long question, > > I seem to have missed the question. > > If the question is "how do I get rid of the infinite loop?", move the > "now retrieve from service using binder and set list adapter" into > onServiceConnected(). > > However, unless you're really really certain this will always occur very > very quickly, use a background thread, in addition to getting rid of the > infinite loop. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: whats wrong with my EditText to int
i found the problem...its function add(); Thank you for your help. 2009/5/23 chen hence > public void menu_add(){ > // > setContentView(R.layout.add); > Button btnadd=(Button)findViewById(R.id.addtips); > Button btnreturn=(Button)findViewById(R.id.return_menu_record); > //点击添加备注 > btnadd.setOnClickListener(new View.OnClickListener(){ > > public void onClick(View v) { > // TODO Auto-generated method stub > EditText et1=(EditText) findViewById(R.id.content); > EditText et2=(EditText) findViewById(R.id.money); > String con=et1.getText().toString(); > try{ > int money=Integer.parseInt(et2.getText().toString()); > data.get(index).add(con, money); > Dialog dlg=new Dialog(android01.this); > dlg.setContentView(R.layout.succeed); > dlg.show(); > } > catch(Exception ex){ > Dialog dlg=new Dialog(android01.this); > dlg.setContentView(R.layout.error); > dlg.show(); > } > } > }); > btnreturn.setOnClickListener(new View.OnClickListener(){ > > public void onClick(View v) { > // TODO Auto-generated method stub > menu_record(); > } > }); > } > > add.xml > > > android:id="@+id/widget30" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > xmlns:android="http://schemas.android.com/apk/res/android"; > android:orientation="vertical" > > > android:id="@+id/tx4" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="Content" > > > > android:id="@+id/content" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="What did you spend the money on?" > android:textSize="18sp" > > > > android:id="@+id/tx5" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="Money" > > > > android:id="@+id/money" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="How much?" > android:textSize="18sp" > > > > android:id="@+id/addtips" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="add tips" > > > > android:id="@+id/return_menu_record" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="return" > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Loading listview items from service results in hang
Isaac Waller wrote: > In my Android application, I have a ListActivity. This ListActivity > uses a SimpleAdapter that I fill with items from my service. So, in my > code, I do: > > MySuperCoolService.Binder serviceBinder = null; > private ServiceConnection serviceConnection = new ServiceConnection() > { > public void onServiceConnected(ComponentName className, > IBinder service) { > Log.d(TAG, "Service connection: connected!"); > serviceBinder = (MySuperCoolService.Binder)service; > } > public void onServiceDisconnected(ComponentName className) { > Log.d(TAG, "Service connection: disconnected"); > serviceBinder = null; > } > }; > bindService(new Intent(this, MySuperCoolService.class), > serviceConnection, BIND_AUTO_CREATE); > while(serviceBinder==null) { > Thread.Sleep(1000); > } > // now retrieve from service using binder and set list adapter Icky! Move the "now retrieve from service using binder and set list adapter" into onServiceConnected() and get rid of the sleep() infinite loop. > This whole operation takes hardly any time (less than a second), so I > want it to run in the UI thread. Is your service positively deterministic, such that it will *always* take less than a second? Or does it take less than a second only in normal conditions (e.g., connectivity is OK to some server you're fetching data from)? > The reason I want this to run in the UI thread is that if you have a > list item selected, or you have scrolled to a certain position in the > ListView, and you rotate the device or take out the keyboard or > something (to trigger a configuration change) when my activity is > restarted, Android will try to restore the state right after onCreate. By default, yes. There are other ways of dealing with this. > But, if I run it in a separate thread, it will not. Sure it can. Either don't reload the state from the service (by using onRetainNonConfigurationInstance() and having your state persist across rotations), or fork another background thread (if these are load-data-and-close threads), or tell a persistent background thread "yo! load the stuff again!". > The problem I am having with running it in the UI thread is that when > I try to bind to the service, that service bind request gets put onto > the message queue. Correct. > But then when I go into my loop, I stop the message > queue from looping. Equally correct. > So my program hangs, because it's waiting for the > service to get bound, and the service won't get bound until the loop > ends (I think you call this a deadlock). Spot on! In other words, icky! > Sorry for such a long question, I seem to have missed the question. If the question is "how do I get rid of the infinite loop?", move the "now retrieve from service using binder and set list adapter" into onServiceConnected(). However, unless you're really really certain this will always occur very very quickly, use a background thread, in addition to getting rid of the infinite loop. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android Loading listview items from service results in hang
Hello, In my Android application, I have a ListActivity. This ListActivity uses a SimpleAdapter that I fill with items from my service. So, in my code, I do: MySuperCoolService.Binder serviceBinder = null; private ServiceConnection serviceConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { Log.d(TAG, "Service connection: connected!"); serviceBinder = (MySuperCoolService.Binder)service; } public void onServiceDisconnected(ComponentName className) { Log.d(TAG, "Service connection: disconnected"); serviceBinder = null; } }; bindService(new Intent(this, MySuperCoolService.class), serviceConnection, BIND_AUTO_CREATE); while(serviceBinder==null) { Thread.Sleep(1000); } // now retrieve from service using binder and set list adapter This whole operation takes hardly any time (less than a second), so I want it to run in the UI thread. See my onCreate: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fillDataUsingCodeAbove(); } The reason I want this to run in the UI thread is that if you have a list item selected, or you have scrolled to a certain position in the ListView, and you rotate the device or take out the keyboard or something (to trigger a configuration change) when my activity is restarted, Android will try to restore the state right after onCreate. But, if I run it in a separate thread, it will not. Also there is a cool fadein animation too :) The problem I am having with running it in the UI thread is that when I try to bind to the service, that service bind request gets put onto the message queue. But then when I go into my loop, I stop the message queue from looping. So my program hangs, because it's waiting for the service to get bound, and the service won't get bound until the loop ends (I think you call this a deadlock). I have thought of putting Looper.loop() inside my loop, but that just hangs it at Looper.loop() (I don't know why.) Sorry for such a long question, Isaac Waller --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: get color from ImageView (x/y)?
You can do something like this: public class MyImageView extends ImageView { . . . public boolean onTouchEvent(MotionEvent ev) { BitmapDrawable bd = (BitmapDrawable)getDrawable(); Bitmap bitmap = bd.getBitmap(); int color = bitmap.getPixel((int)ev.getX(), (int)ev.getY()); // red --> Color.red(color) // green --> Color.green(color) // blue --> Color.blue(color) return true; } } -- Jack Ha Open Source Development Center ・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 May 23, 7:37 am, guruk wrote: > Hi, > > i have a ImageView with a Picture in it. > When I touch the Picture through the TouchScreen, how can i get the > ColorCode (eg. 0xff0033933) from the x/y Coordinate I clicked? > > Something like: onTouch.GetColorCode (from the pixel bellow my > finger) > > Any Idea? > > Thanks > Yours Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android G1 - Streaming WMV
Hello Dave, When you wrote "HTTP progressive and RTSP for 3GPP/MPEG-4 streams" did you mean also that G1 device supports H.264 video streaming? Thanks, Emil On May 23, 1:09 pm, Emil wrote: > Ok. Thanks. > > I would like to stream video comes from my video capture card located > on my PC through WI-FI into my Android G1 device. Do you have any > suggestions regarding how to set & stream the right video format so > the G1 device will be able to play it? > > Emil > > On May 22, 9:23 pm, Dave Sparks wrote: > > > HTTP progressive and RTSP for 3GPP/MPEG-4 streams. > > > On May 22, 10:57 am, Emil wrote: > > > > Thanks for the answer. > > > > So which video streaming formats the Android G1 does support? > > > > Emil > > > > On May 22, 4:39 am, Dave Sparks wrote: > > > > > The G1 does not support Windows Media streaming formats, only local > > > > file playback. > > > > > On May 21, 1:23 am, semil103 wrote: > > > > > > Hello, > > > > > > I would like to know if I can view streamed WMV video format using G1 > > > > > device (not the developer phone). > > > > > I understand that WMV format is not included in basic Android > > > > > Supported Media Formats. But I'm interested in developing application > > > > > specific for G1 device. My hope is taken > > > > > from:http://developer.android.com/guide/appendix/media-formats.html > > > > > Here It's written that > > > > > "In addition to the core media formats supported in the Android > > > > > platform, the T-Mobile G1 also supports the formats listed below: > > > > > . > > > > > WMV Versions 7, 8 and 9. Simple profile only Windows Media Video > > > > > (.wmv)" > > > > > > I just can't find the answer for that question. can anyone help me > > > > > clearing this issue so I would know if it is worthwhile to purchase G1 > > > > > device? > > > > > > Thanks, > > > > > Emil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Airtell calling card - receipt
You might want to change that. On Sat, May 23, 2009 at 12:10 PM, Anil Sasidharan wrote: > Airtel calling card > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: conversion to dalvik format failed with error 1
This is my strange scenario.. maybe it will help someone: 1. On "Project/Build Automatically" checked I'm not getting any errors. 2. When I uncheck "Project/Build Automatically" and build, I'm not getting any errors. 3. When I clean and build (with "Project/Build Automatically" unchecked) i get: no classfiles specified; Conversion to Dalvik format failed with error 1 4. When I clean with "Project/Build Automatically" checked, I'm not getting any errors. On 13 мај, 22:18, Danny wrote: > This seems to work, > but now I'm getting > "Could not find myapp.apk!" > > On May 2, 10:05 am, CnmJbm wrote: > > > > > ok, it seems i fixed it on my environment. > > > just delete the R.java (by refreshing the project) and rebuild the > > project. > > > On May 2, 9:57 am, CnmJbm wrote: > > > > i got the sameerror, TOO!!! > > > > May Day > > > > On Apr 28, 3:57 pm, "chris.cap...@gmail.com" > > > wrote: > > > > > Hi, > > > > > I just updated to SDK 1.5 and all of my projects are failing to build > > > > with the followingerror: > > > > > [2009-04-28 15:53:23 - Utilities]noclassfilesspecified > > > > [2009-04-28 15:53:23 - Utilities]ConversiontoDalvikformatfailed > > > > witherror1 > > > > > ("Utilities" is the name of this specific project.) > > > > > Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5 > > > > everything worked fine. Thanks. > > > > > Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Widget process lifetime: Why not stop the service?
> Don't use a service; use the alarm manager to schedule your > wakeup/work. Currently I'm actually using the widget framework's update mechanism. From what I understand, a service must be used in any case to avoid ANR when processing the request might take a bit longer. The widget example on the developer blog uses a service as well, but does not call Service.stopSelf() when done. Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Widget process lifetime: Why not stop the service?
Don't use a service; use the alarm manager to schedule your wakeup/work. On Sat, May 23, 2009 at 9:38 AM, Michael Elsdörfer wrote: > > I'm writing a widget that needs to update rather infrequently (say > multiple hours). Following the source examples out there, it seems the > common solution is to use a service to prepare the updates. However, > after I am done, my process is still running on "service level", it > looks like it's not being killed by Android in low memory conditions, > and killing it manually causes it to restart. > > The same seems to be true for all other widgets I have installed so > far - they stay in memory. > > Wouldn't it be better to have to service call this.stop() when it is > done, at least if the widget knows it probably won't need to do > another update any time soon? > > I'm doing this now, and it seem to work fine - my process is being > killed when Android needs memory. I'm confused though as to why this > wouldn't be the encouraged behaviour then (it's not like the G1 has an > aweful lot of memory to spare). Should or shouldn't I be doing this? > > > -- 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: Ruuning a unix command from my application
On Sat, May 23, 2009 at 11:29 AM, Mark Murphy wrote: > I am uncertain if the commands available in Android, few as they are, > are part of the public API, and as such perhaps should not be relied upon. They are definitely not part of the supported API. > Do you have any evidence that Android has a tar utility installed on > $PATH? I can't seem to find one. Nope, no tar. -- 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: Ruuning a unix command from my application
karthikr wrote: > Im trying to run an unix command from my application, I am uncertain if the commands available in Android, few as they are, are part of the public API, and as such perhaps should not be relied upon. Of course, based upon your code, you've apparently decided that sticking to public APIs is way too limiting... > Basically I want to extract a tar file, but Im getting an I/O > exception while running the below code. Do you have any evidence that Android has a tar utility installed on $PATH? I can't seem to find one. > Can you please tell me as to how this has to be done Find Java code that can extract tarballs. For example, searching Google on: java tar extract turns up all sorts of goodness: http://commons.apache.org/compress/ http://www.trustice.com/java/tar/ (this is a little old) http://blog.2much2learn.com/?p=3 (recent blog post on using above code) the tar code from Ant (http://ant.apache.org) I'd start with Apache Commons Compress. -- 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: NinePatchDrawable strange rendering
On 23 Maj, 16:52, skink wrote: > npd.setColorFilter(0x8080, Mode.SRC_IN); > npd.draw(c); > it seems that 0x8080 is to dark to see it use 0x instead. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: UnknownHostException on 1.5 emulator
Yes, I have the same problem. Sometimes it happens very soon after launch-( On May 21, 10:11 pm, Peter Jeffe wrote: > If I leave the 1.5 emulator running for a while (overnight, maybe > less) it starts getting unknown host errors like this: > > 05-21 18:03:23.618 2663 2683 I InetAddress: Unknown hostwww.google.com, > throwing UnknownHostException > > It doesn't matter what app is trying to access the net, it always gets > an unknown host. The network is working, since it works if I use an > IP address. So it's as if the DNS client is getting stuck and just > stops resolving. It takes a while to get the error too, like it's > timing out on its queries, not like an immediate logic problem. I > haven't bothered to do a network trace to see what it's doing. I also > haven't tried to see if this is also a problem with the 1.1 emulator > in the 1.5 SDK, but it was certainly never a problem with the 1.0 SDK. > > Anyone else seeing this, and more importantly, anyone seeing it on 1.5 > on a device? > > -- Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Ruuning a unix command from my application
Hi Guys, Im trying to run an unix command from my application, Basically I want to extract a tar file, but Im getting an I/O exception while running the below code. Can you please tell me as to how this has to be done executeCommand("tar", "- xvf", pathOfFileToBeExtracted); /// public static void executeCommand(String command, String arg0, String arg1) throws Exception { try { Class execClass = Class.forName("android.os.Exec"); Method createSubprocess = execClass.getMethod("createSubprocess", String.class, String.class, String.class, int[].class); Method waitFor = execClass.getMethod("waitFor", int.class); int[] id = new int[1]; FileDescriptor fileDescriptor = (FileDescriptor) createSubprocess.invoke( null, command, arg0, arg1, id); FileInputStream inputStream = new FileInputStream(fileDescriptor); BufferedReader reader = new BufferedReader(new InputStreamReader (inputStream)); String output = ""; String line; while ((line = reader.readLine()) != null) { output += line + "\n"; } waitFor.invoke(null, id[0]); } catch (Exception e) { System.out.println(e); throw new Exception(); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Camera application 1.5 on emulator does nothing
You probably have thought of this, but when you created the AVD did you enable camera support (the default is disabled)? see: http://developer.android.com/guide/developing/tools/avd.html cheers On May 22, 8:02 am, arnouf wrote: > Ok so you did the test that I would like to do. > For your information, if you make an AVD file with target 1.1, > emulator is working correctly... > > On May 22, 1:03 pm, arjan broer wrote: > > > > > same problem here. > > Running Ubuntu Linux, eclipse 3.4.1 > > ADT 0.9.1.v200805011822-1621 > > Android SDK 1.5_r1- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] NinePatchDrawable strange rendering
hi, i'd like to draw on Canvas semitransparent NinePatchDrawable with color filter in SRC_IN mode: npd.setColorFilter(0x8080, Mode.SRC_IN); npd.draw(c); and it seems that central patch is drawn with different color than the others. without setting color filter everything is ok. is it a bug in NinePatchDrawable or am i missing something? thanks, pskink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] NinePatchDrawable strange rendering
hi, i'd like to draw on Canvas semitransparent NinePatchDrawable with color filter in SRC_IN mode: npd.setColorFilter(0x8080, Mode.SRC_IN); npd.draw(c); and it seems that central patch is drawn with different color than the others. without setting color filter everything is ok. is it a bug in NinePatchDrawable or am i missing something? thanks, pskink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Bug detected VideoView/ImageView
On Sat, May 23, 2009 at 8:46 AM, arnouf wrote: > > I think that I found a problem with Android SDK > in a relative form, try to add An ImageView and A VideoView > In an activity, retrieve your VideoView and try to retrieve his > SurfaceHolderYour application have to crash with a real big > tracelog in LogCat Care to post that stack trace? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Find whether any audio is currently playing
On Fri, May 22, 2009 at 9:57 PM, iDeveloper wrote: > Thanks. > And how do I stop the audio from playing if isMusicActive() returns true? > Do I have to use the MediaPlayer instance? But the instance won't be in > memory any longer as the activity has been exited once and a new instance of > the activity created in order to come back. > That is a bug in your application. You can't just let the MediaPlayer go out of scope and expect it to keep playing. It will stop playing as soon as the garbage collector runs and gets rid of 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] Widget process lifetime: Why not stop the service?
I'm writing a widget that needs to update rather infrequently (say multiple hours). Following the source examples out there, it seems the common solution is to use a service to prepare the updates. However, after I am done, my process is still running on "service level", it looks like it's not being killed by Android in low memory conditions, and killing it manually causes it to restart. The same seems to be true for all other widgets I have installed so far - they stay in memory. Wouldn't it be better to have to service call this.stop() when it is done, at least if the widget knows it probably won't need to do another update any time soon? I'm doing this now, and it seem to work fine - my process is being killed when Android needs memory. I'm confused though as to why this wouldn't be the encouraged behaviour then (it's not like the G1 has an aweful lot of memory to spare). Should or shouldn't I be doing this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Main and three binder threads are running after application close
This is the intended behavior. See the docs starting here: http://developer.android.com/guide/topics/fundamentals.html#procthread On Fri, May 22, 2009 at 11:54 PM, olko wrote: > > > Well, this is what I observe when I press the "back" button: > > In the main activity: > - onPause() is called > - onStop() is called > - on Destroy() is called > > In the remote service: > - onUnbind() is called (I unbind in onDestroy() of the main activity) > - onDestroy() is called > > After that in the debugger: > - main and three Binder threads (#1, 2, and 3) are still running > > Those threads will be running as long as I do not terminate them in > the Debugger. > Any ideas how to clean this? > > > On May 21, 9:50 pm, Mike Hearn wrote: > > Pressing the back button doesn't necessarily destroy the activity, it > > just pauses it. Read the lifecycle docs to understand what you are > > seeing. > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to cancle a dialog when touch it?
i found the problem...its function add(); Thank you for your help. 2009/5/23 arnouf > > User AlertDialogBuilder to add your buttons...It's simplier > > On May 23, 4:47 am, "hencechen...@gmail.com" > wrote: > > i have my code > > Dialog dlg=new Dialog(android01.this); > > dlg.setContentView(R.layout.error); > > dlg.show(); > > MotionEvent event = null; > > if(dlg.onTouchEvent(event)) > > dlg.cancel(); > > but it dosnt work? > > how to fix it? > > Thank you. > > Hence > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Bug detected VideoView/ImageView
I think that I found a problem with Android SDK in a relative form, try to add An ImageView and A VideoView In an activity, retrieve your VideoView and try to retrieve his SurfaceHolderYour application have to crash with a real big tracelog in LogCat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Intent Selected_alternative
It's fixed thanks On May 23, 3:31 pm, arnouf wrote: > Hi, > 1 point for your Mark (plus the others!)... > The problem is maybe this... > > I'll try another thing to demonstrate this Intent possibility... > > Rgds > > On May 23, 3:25 pm, Mark Murphy wrote: > > > arnouf wrote: > > > But when I open Gallery and try opening a picture my application is > > > not proposed. > > > > What's wrong? > > > Does Gallery suggest any other third-party applications? In other words, > > does Gallery support the feature (adding third-party items into option > > menus) that you are seeking? > > > -- > > 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: AsyncTask posting mulitple parameters
Thanks Romain, Just to clarify, are you suggesting to pass an object containing the data ? ie or similar, where object has attributes = parameters I want to pass ? On May 23, 2:24 am, Romain Guy wrote: > Just use the type Object for the parameters and you can then pass > whatever you want. > > > > On Fri, May 22, 2009 at 9:24 PM, avrono wrote: > > > This maybe a silly question, but I was wondering how to pass multiple > > parameters toAsyncTask > > > I have somthing like : > > > private class DownloadTask extendsAsyncTask< ArrayList, int [], > > Cursor, void, void> { > > protected ArrayList doInBackground(ArrayList > > lst, int [] _thread_keys, Cursor c) { > > return selectThreads2(lst, _thread_keys, c); > > } > > > I would like to pass in the 3 parameters , I am not sure (1) if it is > > possible and (2) what the syntax would be > > > Thanks in advance > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] get color from ImageView (x/y)?
Hi, i have a ImageView with a Picture in it. When I touch the Picture through the TouchScreen, how can i get the ColorCode (eg. 0xff0033933) from the x/y Coordinate I clicked? Something like: onTouch.GetColorCode (from the pixel bellow my finger) Any Idea? Thanks Yours Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Unable to remove default launching of an application.
Guillaume Perrot wrote: > According to me, it would be useful to have both the uninstall and the > clear data button. > Thus the documentation is quite confusing with this flag. Agreed. If you want, visit http://b.android.com and file a bug against the documentation. -- 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: Putting the device to sleep?
GiladH wrote: > My app seldom needs to put the device (or screen) to sleep. I suspect the Android model says that the user controls when the device goes to sleep, either by the power button or via the user-selected inactivity timer. > According to docs PowerManager.goToSleep() does just that, but > requires android.permission.DEVICE_POWER, which is never granted to > apps! That appears to only available to firmware-based apps. To quote Ms. Hackborn: "Whoops, I just looked and this permission is not available to applications. Sorry, it isn't possible for apps to do this." > (A) What on earth should i do to get this working? Modify the firmware. > (B) How can i programmatically wake up the device. Use AlarmManager to broadcast an Intent at the time you want to do some work and have the device wake up. In the BroadcastReceiver, either do the work you need to do (if it is short), or obtain a WakeLock (probably via a singleton), start a service, have the service do the work, then have the service release the WakeLock. > just to clarify - i'm not interested in a wake lock solution You don't need to hold a WakeLock, so long as you're willing to allow the device to go right back to sleep once your BroadcastReceiver's onReceive() returns. -- 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: Intent Selected_alternative
Hi, 1 point for your Mark (plus the others!)... The problem is maybe this... I'll try another thing to demonstrate this Intent possibility... Rgds On May 23, 3:25 pm, Mark Murphy wrote: > arnouf wrote: > > But when I open Gallery and try opening a picture my application is > > not proposed. > > > What's wrong? > > Does Gallery suggest any other third-party applications? In other words, > does Gallery support the feature (adding third-party items into option > menus) that you are seeking? > > -- > 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: Intent Selected_alternative
arnouf wrote: > But when I open Gallery and try opening a picture my application is > not proposed. > > What's wrong? Does Gallery suggest any other third-party applications? In other words, does Gallery support the feature (adding third-party items into option menus) that you are seeking? -- 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: How to cancle a dialog when touch it?
User AlertDialogBuilder to add your buttons...It's simplier On May 23, 4:47 am, "hencechen...@gmail.com" wrote: > i have my code > Dialog dlg=new Dialog(android01.this); > dlg.setContentView(R.layout.error); > dlg.show(); > MotionEvent event = null; > if(dlg.onTouchEvent(event)) > dlg.cancel(); > but it dosnt work? > how to fix it? > Thank you. > Hence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Intent Selected_alternative
Hi, I created an Activity that I would like call when user wants display a picture. I found a lot of source code as below But when I open Gallery and try opening a picture my application is not proposed. What's wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Unable to remove default launching of an application.
Thanks. According to me, it would be useful to have both the uninstall and the clear data button. Thus the documentation is quite confusing with this flag. 2009/5/23 Mark Murphy > > > But my second question remains unsolved: there is an interesting flag in > > the > > Manifest: > > android:allowClearUserDataWhether or not users are given the option to > > remove user data — "true" if they are, and "false" if not. If the value > is > > " > > true", as it is by default, the application manager includes an option > > that > > allows users to clear the data. > > It's enabled by default. Turning it to false (or explicitly to true) > seems > > to have no effect at all. > > A search on Google came up with: > > > http://groups.google.com/group/android-developers/browse_thread/thread/86b5bc388feed93e?fwc=1 > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 2.0 Available! > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Putting the device to sleep?
Hey, My app seldom needs to put the device (or screen) to sleep. That is - programmatically imitate user pressing on red stop-call button. According to docs PowerManager.goToSleep() does just that, but requires android.permission.DEVICE_POWER, which is never granted to apps! (A) What on earth should i do to get this working? (B) How can i programmatically wake up the device. just to clarify - i'm not interested in a wake lock solution tnx, GiladH --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 remove default launching of an application.
> But my second question remains unsolved: there is an interesting flag in > the > Manifest: > android:allowClearUserDataWhether or not users are given the option to > remove user data — "true" if they are, and "false" if not. If the value is > " > true", as it is by default, the application manager includes an option > that > allows users to clear the data. > It's enabled by default. Turning it to false (or explicitly to true) seems > to have no effect at all. A search on Google came up with: http://groups.google.com/group/android-developers/browse_thread/thread/86b5bc388feed93e?fwc=1 -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SyncFailedException writing to sdcard
Some users of my program are randomly experiencing a java.io.SyncFailedException on a call to java.io.FileDescriptor.sync() for a file held on an sdcard. Other than being out of space on the sdcard (which is a definite possiblity for at least some of the occurences, and definitely not for others), what could be the underlying cause of the exception? -Shon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 remove default launching of an application.
For a quick example, download Astro File Manager, click on a image file, you should see 2 actions: * ASTRO Image Viewer * View Picture (standard) And a check box "Use by default for this action", I choosed "View Picture". If you check it, a text explains (ok it does not "tell", don't play on words...) : "Clear default in Home Settings > Applications > Manage applications. If you go there, then click on Astro: the Clear defaults button is disabled. But I eventually realized that I misunderstood the feature, we have to clear the default launching in the choosed application, not the triggering one, e.g. Camera in my example... But my second question remains unsolved: there is an interesting flag in the Manifest: android:allowClearUserDataWhether or not users are given the option to remove user data — "true" if they are, and "false" if not. If the value is " true", as it is by default, the application manager includes an option that allows users to clear the data. It's enabled by default. Turning it to false (or explicitly to true) seems to have no effect at all. The application controls I have for any Market/Eclipse apps are: * Uninstall * Clear cache (what cache ? web cache ?) * Clear defaults (ok now) * Force stop In the built-in applications I have also an extra "Clear data" button. How to make this button appear for my app ? Is that "allowClearUserData" is supposed to do ? In this case there is a bug or a nasty limitation. 2009/5/23 Mark Murphy > > > I have the same bug for all non standard applications, whatever the > > phone I tested. > > What's going on with this feature ? > > It is difficult to answer this question, since you have not really said > what the "feature" is you are curious about. > > >> > I check the box, it tells me that I can clear the setting in > >> > Application -> Manage Applications. > > From your original post, my guess is that this is where you are starting > to encounter what you feel is unusual behavior. However, this sentence is > not very clear: > > -- What is "it" in the expression "it tells me"? > > -- What "setting" does "it" tell you to clear? > > -- By "tells me", do you mean the phone spoke to you, and if not, how did > it communicate with you? > > Some code snippets and a dump of the stack trace (assuming "it tells me" > is referencing some exception) might help us help you better. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 2.0 Available! > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How can I use my own color instead of default orange color for selection
Hi, 1. I want to use my own color for selecting ui views. By default, android shows the selected view with background as orange. I want to show the view background color as red. 2. In the same way, I want the same behaviour should be applied to whole application. How can I achieve this? Can any one please help me? Thanks, Manoj. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 remove default launching of an application.
> I have the same bug for all non standard applications, whatever the > phone I tested. > What's going on with this feature ? It is difficult to answer this question, since you have not really said what the "feature" is you are curious about. >> > I check the box, it tells me that I can clear the setting in >> > Application -> Manage Applications. >From your original post, my guess is that this is where you are starting to encounter what you feel is unusual behavior. However, this sentence is not very clear: -- What is "it" in the expression "it tells me"? -- What "setting" does "it" tell you to clear? -- By "tells me", do you mean the phone spoke to you, and if not, how did it communicate with you? Some code snippets and a dump of the stack trace (assuming "it tells me" is referencing some exception) might help us help you better. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Unable to remove default launching of an application.
I have the same bug for all non standard applications, whatever the phone I tested. What's going on with this feature ? On 6 mai, 15:40, Guillaume Perrot wrote: > "I go to the application settings, but the "clear defaults" button is > always enabled" -> I meant always disabled. > > On 6 mai, 15:39, Guillaume Perrot wrote: > > > Example: > > I have a button which starts an activity with GET_CONTENT audio/* > > I have a menu with choices: Music Track or Sound Recorder and a > > checkbox. > > I check the box, it tells me that I can clear the setting in > > Application -> Manage Applications. > > I launch the Music Track with the box checked. > > I go to the application settings, but the "clear defaults" button is > > always enabled. > > It was already the case with 1.1 SDK, 1.5 does not help (tested on > > emulator 1.5 AND ADP1 with 1.5 recovery image). > > > I also tested the allowClearUserData flag but it seems we cannot clear > > anything but the cache (for the webview ?). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 remove default launching of an application.
I have the same bug for all non standard applications, whatever the phone I tested. What's going on with this feature ? On 6 mai, 15:40, Guillaume Perrot wrote: > "I go to the application settings, but the "clear defaults" button is > always enabled" -> I meant always disabled. > > On 6 mai, 15:39, Guillaume Perrot wrote: > > > Example: > > I have a button which starts an activity with GET_CONTENT audio/* > > I have a menu with choices: Music Track or Sound Recorder and a > > checkbox. > > I check the box, it tells me that I can clear the setting in > > Application -> Manage Applications. > > I launch the Music Track with the box checked. > > I go to the application settings, but the "clear defaults" button is > > always enabled. > > It was already the case with 1.1 SDK, 1.5 does not help (tested on > > emulator 1.5 AND ADP1 with 1.5 recovery image). > > > I also tested the allowClearUserData flag but it seems we cannot clear > > anything but the cache (for the webview ?). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 G1 - Streaming WMV
Ok. Thanks. I would like to stream video comes from my video capture card located on my PC through WI-FI into my Android G1 device. Do you have any suggestions regarding how to set & stream the right video format so the G1 device will be able to play it? Emil On May 22, 9:23 pm, Dave Sparks wrote: > HTTP progressive and RTSP for 3GPP/MPEG-4 streams. > > On May 22, 10:57 am, Emil wrote: > > > Thanks for the answer. > > > So which video streaming formats the Android G1 does support? > > > Emil > > > On May 22, 4:39 am, Dave Sparks wrote: > > > > The G1 does not support Windows Media streaming formats, only local > > > file playback. > > > > On May 21, 1:23 am, semil103 wrote: > > > > > Hello, > > > > > I would like to know if I can view streamed WMV video format using G1 > > > > device (not the developer phone). > > > > I understand that WMV format is not included in basic Android > > > > Supported Media Formats. But I'm interested in developing application > > > > specific for G1 device. My hope is taken > > > > from:http://developer.android.com/guide/appendix/media-formats.html > > > > Here It's written that > > > > "In addition to the core media formats supported in the Android > > > > platform, the T-Mobile G1 also supports the formats listed below: > > > > . > > > > WMV Versions 7, 8 and 9. Simple profile only Windows Media Video > > > > (.wmv)" > > > > > I just can't find the answer for that question. can anyone help me > > > > clearing this issue so I would know if it is worthwhile to purchase G1 > > > > device? > > > > > Thanks, > > > > Emil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: whats wrong with my EditText to int
public void menu_add(){ // setContentView(R.layout.add); Button btnadd=(Button)findViewById(R.id.addtips); Button btnreturn=(Button)findViewById(R.id.return_menu_record); //点击添加备注 btnadd.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { // TODO Auto-generated method stub EditText et1=(EditText) findViewById(R.id.content); EditText et2=(EditText) findViewById(R.id.money); String con=et1.getText().toString(); try{ int money=Integer.parseInt(et2.getText().toString()); data.get(index).add(con, money); Dialog dlg=new Dialog(android01.this); dlg.setContentView(R.layout.succeed); dlg.show(); } catch(Exception ex){ Dialog dlg=new Dialog(android01.this); dlg.setContentView(R.layout.error); dlg.show(); } } }); btnreturn.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { // TODO Auto-generated method stub menu_record(); } }); } add.xml http://schemas.android.com/apk/res/android"; android:orientation="vertical" > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 run a apk in the app
iou200...@gmail.com wrote: > I want to know ,too. > > On May 6, 9:11 pm, ainilife wrote: >> hi all: >> i want to download aapkfile from my server and run this >> application in my app. is this possible? if it can , please post some >> sample code. thank you all. That is not possible. At most, you can download an APK and tell Android to begin the installation process. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? 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: whats wrong with my EditText to int
Hi.. Can you update entire code... Thank You Nithin N V --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: whats wrong with my EditText to int
i entered numbers such 545. but there is nothing but exption happened. 2009/5/23 Jack Ha (T-Mobile USA) > > Can you provide the logcat output that shows the stack trace? > > What value did you enter for the et2 field? > > -- > Jack Ha > Open Source Development Center > ・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 May 22, 10:55 pm, "hencechen...@gmail.com" > wrote: > > here is my code,and it always goes to Exception. > > > > EditText et1=(EditText) > findViewById(R.id.content); > > EditText et2=(EditText) > findViewById(R.id.money); > > String con=et1.getText().toString(); > > try{ > > int > money=Integer.parseInt(et2.getText().toString()); > > data.get(index).add(con, money); > > Dialog dlg=new Dialog(android01.this); > > dlg.setContentView(R.layout.succeed); > > dlg.show(); > > } > > catch(Exception ex){ > > Dialog dlg=new > Dialog(android01.this); > > > dlg.setContentView(R.layout.error); > > dlg.show(); > > } > > > > How can i fix it? > > > > Thank you for your helping. > > Hence > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---