[android-developers] Re: Android Project: read a txt file, speed is so slow

2008-12-09 Thread Mark Murphy
one at a time, is going to be bad on any platform, let alone a mobile device. > Is there any way to improve this program? Probably several. However, since we have no context for what it is you are trying to build, it is very difficult to provide much advice. Long-term, I recommend you spend som

[android-developers] Re: Anyone else seeing problems with the browser & Google Sites?

2008-12-10 Thread Mark Murphy
op and I get a "Web page not available" on the G1. Feels like some browser sniffing gone awry. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~-~--~~~---~--~~ You

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread Mark Murphy
My code is like that: > > FileInputStream _orifile_ = > openFileInput("/data//_samplefile_._txt_"); openFileInput() accepts relative paths only. No leading slashes are allowed. openFileInput() represents files stored in an application-specific storage area. getFilesDir() will tell you wh

[android-developers] Re: The problem of installing Repo

2008-12-10 Thread Mark Murphy
Morris wrote: > When I follow the steps of installing repo, I face the below errors. This mailing list is for application developers. Questions regarding the Android open source project are best asked on lists for the Android open source project: http://source.android.com/discuss -- M

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread Mark Murphy
n't determined if the above is not okay, > and if not, why not. I'm doing this in several places, and it has > never caused a problem. openFileInput() gives you a storage spot unique to your application in the on-board flash. It is not for use for, say, accessing /sdcard. -- Ma

[android-developers] Re: java.util.Timer NOT make sense in Activity?

2008-12-10 Thread Mark Murphy
interval, change that value. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[android-developers] Re: Weird Map Problem (Controlling same map)

2008-12-10 Thread Mark Murphy
BobW wrote: > Mark, > Great book. I recommend it to all. > I like the subscription model also. Very cool. Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version

[android-developers] Re: Anyone else seeing problems with the browser & Google Sites?

2008-12-10 Thread Mark Murphy
Bill Napier wrote: > Have you tried accessing it on Wifi vs. cell data? Could also be a > t-mobile data issue. My test was WiFi, FWIW. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.

[android-developers] Re: how to access file system

2008-12-10 Thread Mark Murphy
EvgenyV wrote: > Can I install any external file xml or text file next to apk > like .config file? If your program downloads or creates data, it can store the data on the device. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 200

[android-developers] Re: Allocation too large for this process

2008-12-10 Thread Mark Murphy
tion bigger than what the G1 can handle. If you intend to show the whole image via some sort of panning mechanism, consider splitting the image up into discrete tiles, akin to what Google Maps does. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! --

[android-developers] startActivity(), Browser, and windows

2008-12-10 Thread Mark Murphy
guess is that I need to use a FLAG_ACTIVITY_*, or combination of same, with my Intent to stop this behavior. However, I've tried a few, and nothing has worked. Any thoughts? Thanks in advance! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to An

[android-developers] Re: startActivity(), Browser, and windows

2008-12-10 Thread Mark Murphy
just happens to decide, each time that > activity receives a new intent, to create a new "window" for it. Thought that might be the case, but I figured it was worth asking... Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-2

[android-developers] Re: Getting GPS Location in Android 1.0 SDK

2008-12-11 Thread Mark Murphy
ning it once with -wipe-data to rebuild it. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

[android-developers] Re: Incoming Emails - Incoming SMS - What is the way to catch them?

2008-12-11 Thread Mark Murphy
ot necessarily pre-installed on every Android device. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[android-developers] Re: Getting GPS Location in Android 1.0 SDK

2008-12-11 Thread Mark Murphy
and Service/WeatherPlus examples both use locations. They go a little overboard on the permissions, as I too had frustrations with the location stuff, during the M5->0.9->1.0 SDK shifts. They definitely work under 1.0r1. I'll be trying them on 1.0r2 before the year's ou

[android-developers] Re: Keeping service alive - What is the right way to to go for my app?

2008-12-11 Thread Mark Murphy
e able to post a Notification...though I'm not sure if that will survive the service closing down. 2. You can't even be assured onDestroy() is called -- the process might just be terminated outright in extreme cases. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder'

[android-developers] Re: How to send email programmatically?

2008-12-11 Thread Mark Murphy
med to like %20 better, I figure that's the better answer. Issue 978 reports the same behavior. I have added these comments there as well. But, if you think this is supposed to work, I feel like I'm missing something. -- Mark Murphy (a Commons Guy) http://commonsware.com _The

[android-developers] Re: How to use built in email application to send email from my application?

2008-12-12 Thread Mark Murphy
me. > Please reply.I am waiting for u people to reply. > Thanks Peli has saved our bacon yet again: http://www.openintents.org/en/node/121 -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development

[android-developers] Re: Developing on device(? is it possible)

2008-12-12 Thread Mark Murphy
ough I needed to recompile the source code to make Android happy. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this messa

[android-developers] Re: 2 or more tabs in xml

2008-12-12 Thread Mark Murphy
source is samples/ApiDemos/src/com/example/android/apis/view/Tabs1.java. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are

[android-developers] Re: How to use built in email application to send email from my application?

2008-12-13 Thread Mark Murphy
dileep singh wrote: > hey please check this link.http://androidguys.com/?p=3100#comment-5168 > once again mark has proved himself that he is always dere to help > android guys. Thank Peli, not me -- I just added some more words around the research he and the OpenIntents team did.

[android-developers] Re: Querys involving more than one table of Contatcs Content Provider

2008-12-14 Thread Mark Murphy
book. I can't guarantee a timetable, though. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: [android-developers] Getting hold of a resource using generated string

2010-01-18 Thread Mark Murphy
> String idString = "button" + i + j; > button = (ImageButton) findViewByIdString(idString); > setupButton(button,i,j); > } > } > > Suggestions? > > Thanks, > Ray -- Mark Murphy (a Commons Guy) http://commo

Re: [android-developers] java.util.TimerTask on android

2010-01-18 Thread Mark Murphy
s/ > I've searched around a bit, and while I can find numerous posts > suggesting Android-specific timing mechanisms, I have not found > anything that says that java.util.TimerTask shouldn't be sufficient, > the Android docs include no kinds of qualifiers, and this post (from &

Re: [android-developers] Widget Help

2010-01-19 Thread Mark Murphy
t what the "next most contacted contact" is, or you would have to keep a file or database table or something that knows what the widget is currently showing, so you can determine what is "next" to be shown. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App D

Re: [android-developers] Using the AlarmManager as a timing service.

2010-01-19 Thread Mark Murphy
of the time, and that is unlikely to be the case. > But i am not sure what will happen to the timer task if the device went to > sleep while the task was running. TimerTask does not wake up the device. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: ht

Re: [android-developers] Using the AlarmManager as a timing service.

2010-01-19 Thread Mark Murphy
ound' this location.. call me". Something like that? That certainly exists, but I have not experimented with it recently, let alone with the device in sleep mode. Again, the OP was inquiring about timers, so my reply was focused on timers. -- Mark Murphy (a Commons Guy) http://comm

Re: [android-developers] Nexus one reporting 533 as Height!?!

2010-01-19 Thread Mark Murphy
> I'm testing an app on the nexus one at the moment and notice the get > height of display function is returning 533 is this some sort of > compatibility mode resolution? Probably, if you don't have set up. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App De

Re: [android-developers] how to verify whether an application is lauched or not

2010-01-20 Thread Mark Murphy
essages is lauched or > not. > > How can I do that. Please suggest if you have any idea. You cannot do this. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to t

Re: [android-developers] How to implement FADE effect in background of ListView?

2010-01-20 Thread Mark Murphy
this? None of those display what I would call a "fade effect". Could you be more specific? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups &quo

Re: [android-developers] Re: How to implement FADE effect in background of ListView?

2010-01-20 Thread Mark Murphy
then apply that drawable resource as the background of the window or ListView or whatever. As the article you linked to suggests, you will also wish to change or turn off the cache color hint. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.

Re: [android-developers] Understand Device deep sleep behavior and its affect on the application.

2010-01-20 Thread Mark Murphy
eference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK> > the best approach for me? Yes, though please be respectful of your user's battery life. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You rece

Re: [android-developers] Market access on the emulator?

2010-01-20 Thread Mark Murphy
t offering more places to get their app. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to

Re: [android-developers] ToggleButton image

2010-01-20 Thread Mark Murphy
tates (pressed, focused, etc.). And, of course, the background is what provides the actual button itself. When you replace the background with a simple image, you lose all of that. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.

Re: [android-developers] Re: ToggleButton image

2010-01-20 Thread Mark Murphy
4. Assign your @drawable/btn_toggle as the background for your ToggleButton. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers&qu

Re: [android-developers] Mystery Segfault after exiting game. Happens reliably but unable to track it down.

2010-01-20 Thread Mark Murphy
are always a bug in Android -- at minimum, it should throw a Java exception rather than segfaulting. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups &qu

Re: [android-developers] Orientation change crash in tab activity with list activity.

2010-01-21 Thread Mark Murphy
n, you can provide them with unique widget IDs. You will save memory, save CPU time, save battery life, reduce the odds that you will encounter a StackOverflowException for having too complicated of a UI, and solve this problem, all at the same time. -- Mark Murphy (a Commons Guy) http://commo

Re: [android-developers] How to close an application?

2010-01-21 Thread Mark Murphy
lease do not do this. If you want to simply close up an activity, the activity can call finish(). > How can i close an application safely? You do not need to: http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon/2034238#2034238 -- Mark Murp

Re: [android-developers] Access Download Manager DB

2010-01-21 Thread Mark Murphy
the same crash happening. That permission (ACCESS_DOWNLOAD_MANAGER) is not in the SDK. It is not available to SDK applications. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribe

Re: [android-developers] creating activity-less packages

2010-01-21 Thread Mark Murphy
ude that JAR in B. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-dev

Re: [android-developers] Re: How to close an application?

2010-01-21 Thread Mark Murphy
that users will prefer an OS that handles app cleanup itself, rather than one that forces a single-process paradigm or one that forces users to have to clean up all apps themselves. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.htm

Re: [android-developers] Re: creating activity-less packages

2010-01-21 Thread Mark Murphy
> Thanks for the reply. Is there a way to prevent the application list > from displaying an apk? No. That would be a security violation. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message b

Re: [android-developers] Question about background task applications?

2010-01-21 Thread Mark Murphy
> Is it possible to developp an application which : > - run in background (I know that it's possible with Services) > - is impossible to close or to stop ? No. Users can always stop background services using the Settings application. -- Mark Murphy (a Commons Guy) http://commonswa

Re: [android-developers] Re: creating activity-less packages

2010-01-21 Thread Mark Murphy
new user ID. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developer

Re: [android-developers] Intent filter for text/calendar ?

2010-01-21 Thread Mark Murphy
pes. You don't really describe the nature of the failure. What specifically is happening when you try to view one of these attachments. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you

Re: [android-developers] Re: creating activity-less packages

2010-01-21 Thread Mark Murphy
e android:sharedUserLabel as well, not just android:sharedUserId. Beyond that...I'm stumped. I haven't used sharedUserId personally, so I don't have any of my own sample code to point you to. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: htt

Re: [android-developers] Re: Intent filter for text/calendar ?

2010-01-21 Thread Mark Murphy
r of sample intent filters that use android:mimeType. See if any of those are treated properly by the mail client. If one does, try mirroring their intent filter. BTW, you're *sure* the email is coming over the wire with the attachment as text/calendar (versus some other MIME type)? -- Mark

Re: [android-developers] Keep activity running while in "sleep" mode

2010-01-21 Thread Mark Murphy
ur service stopped normally, and use an alarm to wake up the device and run your code. http://tinyurl.com/y9mttv5 -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to

Re: [android-developers] Keep activity running while in "sleep" mode

2010-01-21 Thread Mark Murphy
ing. > > Use AlarmManager. Keep your service stopped normally, and use an alarm to > wake up the device and run your code. > > http://tinyurl.com/y9mttv5 Whoops, sorry, errant URL paste there. I was aiming for: http://www.androidguys.com/2009/04/02/wake-up-with-the-alarm/ -- Mark Murphy

Re: [android-developers] program's offline installation

2010-01-22 Thread Mark Murphy
stalled? This way i > could trigger the file rename of *c*. No. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" gro

Re: [android-developers] Launch ContextMenu from ContextMenu

2010-01-22 Thread Mark Murphy
> up with "Add to playlist" as the title, and "Current playlist", "New", > and however-many-playlists-you-have defined after that. The second one might just be an AlertDialog. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books:

Re: [android-developers] Re: program's offline installation

2010-01-22 Thread Mark Murphy
ould need a third-party tar class. ZIP files can be handled natively. > Well, actually i can modify the apk, because the apk is a zip file > (=jar). Not at runtime. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --

Re: [android-developers] Fundamental Question

2010-01-25 Thread Mark Murphy
eCursorAdapter? Neither. Set up a listener on the ListView. If this is part of a ListActivity, just override onListItemClick(). If not, use setOnItemClickListener() on the ListView itself. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android

Re: [android-developers] How to select an item in a listview by code

2010-01-26 Thread Mark Murphy
will be clicked if the user presses the center button on the D-pad. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 22-26 February 2010: http://onlc.com -- You received this message because you are subscribed to the Google Groups &q

Re: [android-developers] How to select an item in a listview by code

2010-01-26 Thread Mark Murphy
ng that has a persistent "selection". -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 22-26 February 2010: http://onlc.com -- You received this message because you are subscribed to the Google Groups "Android Develo

Re: [android-developers] Re: Regarding network connectivity on Android.

2010-01-26 Thread Mark Murphy
Is there no way for starting a GPRS connection, like the > WiFiManager provides for WiFi connections? Just use sockets, or HttpClient, or whatever. You do not need to start a GPRS connection, as it is always on if it is available (i.e., not somehow disabled by the user) and WiFi is not activ

Re: [android-developers] What keycode is the HTC Hero 'Hide Keyboard' button?

2010-01-26 Thread Mark Murphy
g.) The HTC Hero does not have a "Hide Keyboard" hardware button. I am assuming the OP is referring to the button in the lower-left of the Hero IME, which hides the keyboard. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Andr

Re: [android-developers] Re: Guide Me Right Way

2010-01-26 Thread Mark Murphy
om/group/cw-android (BTW, thanks to Kevin and Temitope for recommending me!) -- 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 Grou

Re: [android-developers] OutOfMemory

2010-01-26 Thread Mark Murphy
wish to manage your own object pool for those, recycling them yourself. Whether or not this is the source of your specific difficulty, of course, is impossible to tell from here. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 8-12

Re: [android-developers] Re: Guide Me Right Way

2010-01-26 Thread Mark Murphy
gt; every so often and you get the updates for a year as part of the price. The >> best part is Mark has a forum for the book as well as you'll see him >> replying here on this forum quite a bit. Particularly now that I'm back to my regular un-banned status (cotton-pi

Re: [android-developers] US Taxes: Does Google send a 1099 tax form?

2010-01-26 Thread Mark Murphy
ifferent than any other business income. -- 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

Re: [android-developers] How to build library with my code?

2010-01-27 Thread Mark Murphy
ich are all set up using this model: http://commonsware.com/cwac -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To

Re: [android-developers] Reposition views att runtime

2010-01-27 Thread Mark Murphy
ams), making the desired changes, and calling setLayoutParams() to affect those changes. Note that I haven't done this in quite some time, so the above recipe is from memory and may be a bit off, though I'm pretty sure it is mostly correct. -- Mark Murphy (a Commons Guy) http://commonsware.co

Re: [android-developers] What About Oversize Apps?

2010-01-27 Thread Mark Murphy
first run and storing them on the SD card. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this

Re: [android-developers] Re: trying to launch Android 2's Gallery .. security exception

2010-01-27 Thread Mark Murphy
ot mean you can launch it directly using the component name anymore. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" g

Re: [android-developers] Spinner Example

2010-01-28 Thread Mark Murphy
ting > Sunday item through the spinner ,toast message should display "Sunday > Selected". > > Please guide me on how do this and if possible share code snippet. What part of this are you having difficulty with? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App

Re: [android-developers] Spinner Example

2010-01-28 Thread Mark Murphy
> When user click on the item, I dont knw which event to register like > button > have OnClick so what is there for this & how to check which item is > selected? Use setOnItemClickListener(). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Devel

Re: [android-developers] The concurrency control of ContentProvider whose android:multiprocess is set true

2010-01-28 Thread Mark Murphy
t process space? especially when the ContentProvider > instances accessing the same SQLite DB file? SQLite has built-in multi-process concurrency control -- it's part of the product. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.c

Re: [android-developers] How to run apk application on Linux

2010-01-28 Thread Mark Murphy
any equivalents from other distros. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, s

Re: [android-developers] RemoteViews setSelected

2010-01-28 Thread Mark Murphy
going again (which worked with the initial view, > before the update of the text). Re-inflate the view and update the whole thing, just as you did with the initial view. Unfortunately, lots of useful methods (e.g., setSelected()) are not annotated to be allowed for use via RemoteViews. -- M

Re: [android-developers] Re: ANDROID_ID always null on devices

2010-01-29 Thread Mark Murphy
tunately, I'm not aware of any place in the Settings app or anywhere that you can see the ANDROID_ID value without code, to see if that is the source of your difficulty. Perhaps you can find a pre-compiled app on the Market that will report that information. -- Mark Murphy (a Commons Guy)

Re: [android-developers] Re: ANDROID_ID always null on devices

2010-01-29 Thread Mark Murphy
ew, it came to my desk still closed in his > box. > Is there any way to reset to the factory settings and restore > everything? Probably, but I suspect that's a device-specific process. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsw

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Mark Murphy
> I have a gzipped (*.gz) file in my res/raw directory. Why? The APK file is already a compressed archive. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Mark Murphy
for files in res/raw. Yeah, I could break things up > into separate files, but that's sort of a pain to maintain. And trying to un-GZIP a stream isn't? :-) -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You

Re: [android-developers] Opening a gzipped raw resource file

2010-01-29 Thread Mark Murphy
s like > the growing advice on this list is to store the larger stuff on the SD > card > and have the user download it when the application first runs in order to > maintain a smaller internal memory application footprint. Yup. -- Mark Murphy (a Commons Guy) http://commonsware.c

Re: [android-developers] Re: Opening a gzipped raw resource file

2010-01-29 Thread Mark Murphy
known to be compressed (e.g., PNG), but I'd be a bit surprised if that extended to .gz files. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Grou

Re: [android-developers] HTC Hero Album app source code, anyone ?

2010-01-29 Thread Mark Murphy
plication. > If you think it's not possible to get hold of it, would you mind > suggesting an alternative photo viewing app which has its source open ? The Gallery source code in in the AOSP. There is also a photo app or two in the apps-for-android site (http://code.google.com/p/apps-for-

Re: [android-developers] "Problem loading widget": XML issue?

2010-01-29 Thread Mark Murphy
; android:layout_height="wrap_content" > > android:layout_gravity="center_horizontal"> > > > > > So it's a layout of two rows, the first row consi

Re: [android-developers] Re: ANDROID_ID always null on devices

2010-01-29 Thread Mark Murphy
ble via TelephonyManager, IIRC. > What is the purpose of ANDROID_ID if those values > are available? 1. Not everything is a phone 2. Not every phone has IMSI/IMEI -- not sure what those values map to in CDMA, for example -- Mark Murphy (a Commons Guy) http://commonsware.com And

Re: [android-developers] Layout problems: AbsoluteLayout deprecated, how to do it now?

2010-01-30 Thread Mark Murphy
or two on creating your own layout classes, I'd love to see 'em. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Group

Re: [android-developers] Start a service on device start up.

2010-01-30 Thread Mark Murphy
as I know. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 2.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, se

Re: [android-developers] Re: Multi-threaded http requests cause exception

2010-01-31 Thread Mark Murphy
Task is based upon > these classes) and tell the ExecutorService to use Thread-pools of any > size. I have a version of AsyncTask for Android 1.5 that eliminates the one-thread limitation: http://github.com/commonsguy/cwac-task -- Mark Murphy (a Commons Guy) http://commonsware.com Android A

Re: [android-developers] listing /data/data device's contents

2010-02-01 Thread Mark Murphy
> I'm trying to get a list of folders in /data/data that starts with > "totalcross". Is this possible? All i get is "permission denied". Correct. You do not have the rights on a device to read the directory contents of /data/data. -- Mark Murphy (a Commons Guy)

Re: [android-developers] Service - Need Info

2010-02-01 Thread Mark Murphy
> onCreate. > > Any Suggestion? Most likely, there is an Intent resolution problem. Look at LogCat at the warning level and see if you get any messages from Android saying that it could not resolve some Intent. You can also confirm that your service has an with an action that is equiv

Re: [android-developers] EditText Handling while Orientation change

2010-02-01 Thread Mark Murphy
to the superclass -- The EditText shares an android:id with some other widget in the layout You are welcome to manually maintain the state of the EditText yourself via onSaveInstanceState()/onRestoreInstanceState(), if the built-in support does not meet your needs. -- Mark Murphy (a

Re: [android-developers] Re: listing /data/data device's contents

2010-02-01 Thread Mark Murphy
applications are installed. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send e

Re: [android-developers] Discover resources?

2010-02-01 Thread Mark Murphy
R.xml.class.getDeclaredFields() doesn't return > any fields. > > The AssetManager didn't seem to work either because these are not raw > assets. > > Does anyone have ideas or examples? I don't think it is possible at runtime. You could write a code generator to build you

Re: [android-developers] Re: Binding list views to large data sets

2010-02-02 Thread Mark Murphy
when the user scrolls to the bottom of the list and therefore needs more data. http://github.com/commonsguy/cwac-endless -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to

Re: [android-developers] How to close one task in special

2010-02-02 Thread Mark Murphy
> How to close one task in special. Please don't. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" grou

Re: [android-developers] Problem with TabActivity and ListActivity

2010-02-02 Thread Mark Murphy
> And the Problem is If i want to start activity which is not specified > in tabhost in above Java code,it is going out of tabactivity. > ie.,It is not coming in tabactivity. > > 2)But i want to have all the activities under tabActivity. That is not possible, AFAIK. -- Mark Mu

Re: [android-developers] Play Mp3 while on Camera Vie

2010-02-02 Thread Mark Murphy
cPlayer or something for the voiceover. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send

Re: [android-developers] Writing files SDCard on Emulator

2010-02-02 Thread Mark Murphy
be for your application, not for an individual component. Moreover, I don't think you would get this message just for this permission being missing. > 3. Any other suggestions Are you sure your emulator has an SD card image? They don't by default. -- Mark Murphy (a Commons Guy) http://co

Re: [android-developers] Writing files SDCard on Emulator

2010-02-02 Thread Mark Murphy
ill appear just above the horizontal line. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, s

Re: [android-developers] Re: Binding list views to large data sets

2010-02-02 Thread Mark Murphy
> Is the list/adapter just creating 20K objects as it walks the result > set? No, but your database query is probably making a 100K roster of objects or more. Only as many views as are needed for the visible rows in the list will be created. -- Mark Murphy (a Commons Guy) http://commonswa

Re: [android-developers] getting the serial number

2010-02-02 Thread Mark Murphy
now how to get access to that number in the device? I do not believe it is exposed via the SDK. If you see it anywhere outside of adb (e.g., somewhere in the Settings app), you might look at the source for that app to see how they get it. -- Mark Murphy (a Commons Guy) http://commonsware.com And

Re: [android-developers] Re: Binding list views to large data sets

2010-02-02 Thread Mark Murphy
r for the actual ListView, and convert each query's Cursor into a new set of objects to be added to the adapter. Then, you can close and release the Cursor. This has the advantage of simplifying the merge logic, at the cost of extra processing (and briefly extra memory) when you load in e

Re: [android-developers] Re: Binding list views to large data sets

2010-02-02 Thread Mark Murphy
lease it if > the flag isn't set when onDestroy comes along. Seem reasonable? Why not just pass the ArrayList in onRetainNonConfigurationInstance()? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You receive

Re: [android-developers] concept of "user name"

2010-02-03 Thread Mark Murphy
> Is there a concept of "user name" in Android? Windows Mobile lets you > enter a description of the owner of the phone; Palm OS has the concept > of user name. But i couldn't find anything about this in Android. The device itself does not really track this anywhere. --

Re: [android-developers] Re: Writing files SDCard on Emulator

2010-02-03 Thread Mark Murphy
he path name like /sdcard be the same when connected to the > actual > device. No. Some devices have their SD card under different paths. Use Environment.getExternalStoragePath() to get the path to the SD card. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books:

Re: [android-developers] Re: Writing files SDCard on Emulator

2010-02-03 Thread Mark Murphy
adb shell or DDMS' File Explorer to poke around and deduce the path. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers&qu

<    11   12   13   14   15   16   17   18   19   20   >