[android-developers] Re: Changing package names fubars the map overlays?

2009-01-20 Thread Mark Murphy
the above-quoted statement, that means your code may have *passed in* a null, and so either marker is null or somehow SitesOverlay is having problems and can't be instantiated. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.

[android-developers] Re: Changing package names fubars the map overlays?

2009-01-21 Thread Mark Murphy
> E/AndroidRuntime( 583): at > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122) > E/AndroidRuntime( 583): at > android.app.ActivityThread.performLaunchActivity( What's the line at MainMap.java:275? -- Mark Murphy (a Commons Guy) http://

[android-developers] Re: Changing package names fubars the map overlays?

2009-01-21 Thread Mark Murphy
at > android.app.ActivityThread.performLaunchActivity( The upper stack trace is internal to Android itself and, at least for me, offers no meaningful information. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~

[android-developers] Re: Problem with simpleCursorAdapter, ListView backed by a managed cursor

2009-01-21 Thread Mark Murphy
ange support is what you want. I haven't played with this much myself. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[android-developers] Re: Replace the current view by an other view

2009-01-21 Thread Mark Murphy
e you attempting to call setContentView() from a background thread? If so, arrange to call it on the UI thread, via post(), runOnUiThread(), or a Handler. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~--

[android-developers] Re: Replace the current view by an other view

2009-01-21 Thread Mark Murphy
setContentView(f_grid); > } > }; > // Run the thread > m_activity.runOnUiThread(mainThreadRunnable); That should work fine, AFAIK. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- ht

[android-developers] Re: access rows in ListActivity

2009-01-21 Thread Mark Murphy
at the time you start the "heavy task", pass the Button along to the task, or otherwise arrange to know it at the time you want to disable the button. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---

[android-developers] Re: An activity, a service and receivers - an architectural question

2009-01-21 Thread Mark Murphy
ration status (text only) between the service and > the UI? Is SharedPreferences suitable for this purpose? Since the operation status is not persistent between runs of your application, I would not use SharedPreferences. Use some other in-process indicator (e.g., a static AtomicConcur

[android-developers] Re: How to deploy large DB with my APK

2009-01-21 Thread Mark Murphy
triction: > (I want my application to not depend on being online after download - > so the data should be downloaded with the application.) -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~

[android-developers] WebKit/WebView and Focus Highlighting

2009-01-21 Thread Mark Murphy
of change...for a single View. How would one go about affecting this change for the contents of a WebView? Thanks in advance for any advice! -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml

[android-developers] Re: WebKit/WebView and Focus Highlighting

2009-01-22 Thread Mark Murphy
d see if it gives them any help. Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

[android-developers] Re: Screen Orientation change performance Question

2009-01-22 Thread Mark Murphy
ges. In theory, your application should handle this just fine, since it might occur in other cases (e.g., call comes in and your app is abandoned for an extended period). I have a series of blog posts on this topic that may help: http://androidguys.com/?s=rotational+forces -- Mark Murphy (a Com

[android-developers] Re: two threads, the main closes the DB but the second is still running and need to use the DB!

2009-01-23 Thread Mark Murphy
t doesn't matter because the entire process is >> gone. > > It means that any secondary threads is living within the process and > it is not a "process" by itself? Correct. All threads you create in your process stay in your process. -- Mark Murphy (a Commo

[android-developers] Re: start Activity without Manifest

2009-01-23 Thread Mark Murphy
AlexKar wrote: > Can I launch unregistered Activity directly from my provider? No. Any Activity class that is not listed in AndroidManifest.xml file cannot be used as an Activity by the Android framework, AFAIK. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Swe

[android-developers] Re: Activity Issue on G1 phone

2009-01-23 Thread Mark Murphy
ed and recreated. I have a series of blog posts that cover this topic: http://androidguys.com/?s=rotational+forces -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~---

[android-developers] Re: Developer looking for project to join

2009-01-23 Thread Mark Murphy
to point me to their own project that needs help, or a > project they think might need help that would be great. Have a great > day. It's not my project, but OpenIntents.org has lots of Android components under development -- one might fit the bill. -- Mark Murphy (a Commons Guy) http

[android-developers] Re: How to layout image buttons in a grid view from xml layout file?

2009-01-23 Thread Mark Murphy
pirit to ListView or Spinner. The contents are set via an adapter. > I want to do this entirely in an xml layout file. Then you do not want GridView. Try TableLayout, perhaps. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Develo

[android-developers] Re: Future of Android

2009-01-23 Thread Mark Murphy
derekca wrote: > I know you all are swamped, probably overloaded with requests, but > it's really important that a number of issues get addressed promptly. This list is for developers working on Android applications. Please post diatribes like this to [android-discuss]. -- Mar

[android-developers] Re: Possible permissions issue....

2009-01-23 Thread Mark Murphy
s the Java package you declared in AndroidManifest.xml) Give us more concrete stuff to work with, and we can perhaps give you more concrete suggestions for how to get past your problem(s). -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development

[android-developers] Re: start Activity without Manifest

2009-01-24 Thread Mark Murphy
cks a compact means of implementing methods with default parameter values. -- 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

[android-developers] Re: License text to use for display in Android App under ASL 2.0

2009-01-24 Thread Mark Murphy
ication, that seems reasonable. But bear in mind that the ASL license in toto is for developers using your source code, not for end users of compiled binaries. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch

[android-developers] Re: Emulator crashs when accessing sd card settings

2009-01-24 Thread Mark Murphy
Jeremy Leibs wrote: > Any progress on this? I am having the exact same problem. It is > driving me crazy. Where is the image? I had some problems for a while trying to use an SD image stored on a USB thumb drive formatted vfat. I just moved the image to the main drive (ext3). -- Mark

[android-developers] Re: Displaying HTML Content

2009-01-24 Thread Mark Murphy
I suspect that the most-frequently-used patterns for Web browsing components are to display either network-served content or regular local files. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --

[android-developers] Re: Parsing RSS feeds, encoding problems

2009-01-25 Thread Mark Murphy
nodes, not just one. Hence, don't just use getFirstChild() -- iterate over all children. Leastways, that worked for & when I encountered a similar phenomenon. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Availab

[android-developers] Re: embed external activities using LocalActivityManager

2009-01-25 Thread Mark Murphy
t > possible at all? For security reasons, it is not possible. You can only embed activities that you own. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received

[android-developers] Re: embed external activities using LocalActivityManager

2009-01-25 Thread Mark Murphy
ap-highlight-color be transparent for all styles" or some such. -- 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

[android-developers] Re: WebKit/WebView and Focus Highlighting

2009-01-25 Thread Mark Murphy
Grace Kloba wrote: > The trick is to use "-webkit-tap-highlight-color". If the alpha of the > color is 0, the orange ring won't be drawn. Many thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Developm

[android-developers] Re: NetworkInterface.getNetworkInterfaces()

2009-01-25 Thread Mark Murphy
has anyone got it > to work? Do you have the INTERNET permission in your AndroidManifest.xml file? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You receive

[android-developers] Re: unzip

2009-01-25 Thread Mark Murphy
n Android, only Dalvik. And, there is no G: drive in Android, only in Windows PCs. Are you sure you are running your code in an Android application? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~--

[android-developers] Re: embed external activities using LocalActivityManager

2009-01-25 Thread Mark Murphy
h. > > thank you! yes, orange ring dissapeared. > > but when i change it to rgba(0,0,255,0.5); it's not half transparent > blue, why? (it's again fully opaque orange) To quote Ms. Kloba: "The trick is to use "-webkit-tap-highlight-color". If the alpha of

[android-developers] Re: 3G network response different from Wifi

2009-01-25 Thread Mark Murphy
r and document any possible workarounds. The only port scanner I have much personal experience with is nmap, and I do not see much one way or the other about using nmap over T-Mobile's 3G. With luck, you'll get a more definitive response to your query -- I'm mentioning this as an alternat

[android-developers] Re: adb stopped working (Ubuntu 8.10)

2009-01-26 Thread Mark Murphy
r mini-USB cable you can try? BTW, I am on the same environment as you (64-bit Ubuntu 8.10) and haven't had a problem once I got it working a couple of months ago. So, if you need to know any specific settings I have, just ask. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy

[android-developers] Re: how to display alert message when some one clicks on back button

2009-01-27 Thread Mark Murphy
se AlertDialog, perhaps created using the AlertDialog.Builder class. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ You received this message because you

[android-developers] Re: how to display alert message when some one clicks on back button

2009-01-27 Thread Mark Murphy
manoj wrote: > can you please show me the sample code? ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.java in your SDK's samples/ directory uses AlertDialog.Builder. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development

[android-developers] Re: # special characters in webview

2009-01-27 Thread Mark Murphy
loadData(toload, "text/html", "utf-8"); Try using loadDataWithBaseURL() instead of loadData(), supplying a bogus base URL (e.g., fake://i/will/smack/the/engineer/behind/this/scheme). That cures a lot of loadData() ills. -- Mark Murphy (a Commons Guy) http://commonsware.com

[android-developers] Re: exit button - or not?

2009-01-28 Thread Mark Murphy
do to > make room for the resources it needs at startup without slowing it > down too much? That would depend a bit on what "the resources it needs at startup" are. Can you give us more details? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to

[android-developers] Re: exit button - or not?

2009-01-28 Thread Mark Murphy
Windows for dealing with the case where your application needs to do work on startup and the user might have a bunch of other applications open. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~--

[android-developers] Re: Context of a class

2009-01-28 Thread Mark Murphy
) is undefined. That would be because classname is not a Context subclass. If classname is an inner class, use MyActivity.this instead, where MyActivity is the name of the activity class (or other Context). -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to

[android-developers] Re: Touch mode again (CRUD application context).

2009-01-28 Thread Mark Murphy
ops a dialog to add the item, and one can edit (via a dialog) or delete items from context menu choices. "View" in this case is simply part of the list, since the list can readily show just the single data item. -- Mark Murphy (a Commons Guy)

[android-developers] Re: exit button - or not?

2009-01-28 Thread Mark Murphy
I have to take whatever steps I can to make the user happy regardless. Of course, I'm an old fogey, having started developing apps in 16K of RAM on 1MHz CPUs. So my perspective may be out of touch with the whippersnappers who dominate the industry today. ;-) -- Mark Murphy (a Commons Guy) htt

[android-developers] Re: Reusing the +/- number spinner from TimePickerDialog?

2009-01-28 Thread Mark Murphy
icker; > based on the name I'm sure it is. > > Importing android.internal.widget doesn't work. It was worth a shot. The source to it is probably available on source.android.com. Clone your own until they open that one up in the SDK. -- Mark Murphy (a Commons Guy) http://com

[android-developers] Re: exit button - or not?

2009-01-28 Thread Mark Murphy
that my assumption was flawed. I am sorry for wasting your time. -- 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 subscr

[android-developers] Re: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Mark Murphy
uff takes, which would determine how frequently you can refresh the image without slowing the device down too much. It also implies you can connect the device to something with the mini-USB cable, I imagine. It's far from the most elegant solution, but it's something... -- Mark

[android-developers] Re: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Mark Murphy
Mark Murphy wrote: > Well, there's some way to get screen grabs off the device that DDMS > uses. I don't see an adb command for it, so off the top of my head I'm > not sure how it's done. But I think the DDMS source code is in the git > repository. > > In t

[android-developers] Re: Access resources from another application

2009-01-28 Thread Mark Murphy
till possible to > access the resources from this Subclass? > > By default it uses the resources from the current activity (Strings, > xml layout etc) Activities don't have resources; applications do. Multiple activities in the same application share their resour

[android-developers] Re: Access resources from another application

2009-01-28 Thread Mark Murphy
are both yours, you could find a way to "share" them in your build process, assuming you are building them in tandem. > Give me a shout if that is still unclear OK, here you go: SHOUT! ;-) -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder&#

[android-developers] Re: Access resources from another application

2009-01-28 Thread Mark Murphy
ithin > the target package. Ah, my mistake. I thought you still needed to be the same owner even in that case, or needed to be a system app. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~

[android-developers] Re: Rendering the G1 screen on a computer screen via VNC software?

2009-01-28 Thread Mark Murphy
I tossed together an app based on the notes I posted previously on this thread. See: http://groups.google.com/group/cw-android/browse_thread/thread/d2dbcabee6bcba1a or http://groups.google.com/group/android-discuss/browse_thread/thread/939b320cea3c81d4 -- Mark Murphy (a Commons Guy) http

[android-developers] Re: Instantiating a layout from an xml file and/or resource id

2009-01-28 Thread Mark Murphy
layout (e.g., LinearLayout containing other widgets), that's called "view inflation" or "layout inflation". getLayoutInflater().inflate() should do the trick. This uses the android.view.LayoutInflater class. You can see inflation used in many of my Fancy ListViews posts: ht

[android-developers] Re: Finding the data directory of an application

2009-01-29 Thread Mark Murphy
ity and Service are subclasses of Context. -- 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 t

[android-developers] Re: ListView w/ImageView - memory utilisation

2009-01-29 Thread Mark Murphy
sure your images get properly garbage collected. -- 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

[android-developers] Re: Question about following the activitycreator script

2009-01-29 Thread Mark Murphy
eed to change the script for it to work > on Mac? HelloAndroid-debug.apk is the debug version of the APK file and is installable in the emulator and on devices via adb. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Ava

[android-developers] Re: Swapping in and out ViewGroups (Layout) within a container ViewGroup.

2009-01-30 Thread Mark Murphy
ingle view representing the "inner layout" instead of the whole view tree. In other words, use removeView() instead of removeAllViews(). Personally, I typically just use ViewFlipper, so it can handle this case, plus give me the option for animating the transition between child view

[android-developers] Re: When does my thread die?

2009-01-30 Thread Mark Murphy
tation in java.util.concurrent as well if your threads still aren't closing up shop fast enough. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ You receiv

[android-developers] Re: How to add extra elements into Cursor or SimpleCursorAdapter?

2009-01-31 Thread Mark Murphy
Option #2: Don't pass the Cursor into SimpleCursorAdapter, but rather iterate over the Cursor, put the results into an ArrayList or something, and use that with an ArrayAdapter. Option #3: Create a CursorWrapper that injects your two extra values into the results. -- Mark Murphy (a Common

[android-developers] Re: Howto remove thread from Dalvik VM????

2009-02-01 Thread Mark Murphy
t. The original author of those classes, Doug Lea, has a book on Java concurrent programming (i.e., thread safety) that has some useful patterns: http://www.awprofessional.com/bookstore/product.asp?isbn=0201310090 -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -

[android-developers] Re: Math.Sin(90) doesn't return 1?

2009-02-01 Thread Mark Murphy
ain explosions, but could anyone tell > me what's going on here? The parameter to sin() is in radians, not degrees. The sine of 90 degrees is 1. The sine of 90 radians is approximately 0.8939966636005579. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ran

[android-developers] Re: Math.Sin(90) doesn't return 1?

2009-02-01 Thread Mark Murphy
Phill Midwinter wrote: > Ah > > So I just multiply by pi over 180? That should work. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/sched

[android-developers] Re: No callback when list item is touched.

2009-02-01 Thread Mark Murphy
); > > What am I missing? Is there another listener I need to configure? You need to call setOnItemSelectedListener() to handle taps like that. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~

[android-developers] Re: No callback when list item is touched.

2009-02-01 Thread Mark Murphy
uot;select", tap is "click". Without more code, I can't give you a solid answer. What you're doing sure looks good. Are you sure the issue isn't something inside of viewItem() -- that you're getting the event but viewItem() isn't responding to it proper

[android-developers] Re: Why I cannot see my mail to the group?

2009-02-02 Thread Mark Murphy
ssing there was some mail server hiccup that was preventing their delivery. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscr

[android-developers] Re: How to change working directory?

2009-02-02 Thread Mark Murphy
ta. > > How can I change this ? 1. I would not rely upon a "working directory". 2. Your application files should go in the directory identified by Context#getFilesDir(), which so far maps to /data/data/your.package.here/files. 3. On a device, you cannot read or write from the root

[android-developers] Re: It is Now MID-Q1, where are the Paid Apps???

2009-02-02 Thread Mark Murphy
ely on any single outlet (e.g., Android Market) . -- 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 subs

[android-developers] Re: Testing applications in mobile

2009-02-02 Thread Mark Murphy
cations on a G1. -- 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 Gro

[android-developers] Re: Extending the WebView

2009-02-02 Thread Mark Murphy
Mark Nuetzmann wrote: > I want to extend the WebView so that I can override the action of > clicking on a link in the webview. You want to set a WebViewClient on the WebView, where in the WebViewClient you put your logic in shouldOverrideUrlLoading(). -- Mark Murphy (a Commons Guy

[android-developers] Re: How does one sell on the Android Market?

2009-02-02 Thread Mark Murphy
choose. Markets like SlideME are probably easier and may have better reach, but one is not limited to only using markets (a la iPhone, and there only one market at that). -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android

[android-developers] Re: _id column in list adapter

2009-02-02 Thread Mark Murphy
id" column. There is no way to tell Android to use another column name, AFAIK. You might try renaming it in the SQL results: SELECT _ID=my_key, ... FROM mytable ... I haven't tried that, so I don't know if that will be sufficient. -- Mark Murphy (a Commons Guy) http://commonsware.

[android-developers] Re: ListView: Disable Focus Highlight

2009-02-02 Thread Mark Murphy
parent (#) and "roll your own" highlighting, if you feel the need. -- 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 m

[android-developers] Re: How to send xml file to server?

2009-02-03 Thread Mark Murphy
r in query at > index 41: > Manoj > 123 > dmh > can any one please help me how to solve this problem (sending the xml > file to server)? http://hc.apache.org/httpcomponents-client/examples.html Notably: -- You don't normally construct POST requests with parameters in the URL --

[android-developers] Re: LocationManager causes application to crash

2009-02-03 Thread Mark Murphy
es ACCESS > _FINE_LOCATION permission This suggests your elements are in the wrong spot or something. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ You

[android-developers] Re: change seekbar progress color

2009-08-24 Thread Mark Murphy
g the colors in a ProgressBar. The three differences I see between what you did and what I did: -- You are using SeekBar instead of ProgressBar, and it is possible SeekBar handles the progress drawable differently -- ProgressBar needs a third item with an id of @android:id/secondaryProgress -- I

[android-developers] Re: XML-RPC

2009-08-24 Thread Mark Murphy
> No one has an idea? score=new FilmScore(); score.votes=response.get("votes"); score.total=response.get("total"); score.average=response.get("average"); -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books:

[android-developers] Re: ADC 2 Submission Site -- Now live

2009-08-24 Thread Mark Murphy
ing the same app published under two package names? For example, if ADC2 basically means authors have to commit to supporting the ADC2 package name indefinitely, or run the risk of cutting off a chunk of their user base, that is not something to be taken lightly. Can we get a bit of clarification o

[android-developers] Re: Jdbc driver problem

2009-08-24 Thread Mark Murphy
service from Android using HttpURLConnection or HttpClient. -- 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 G

[android-developers] Re: ADC 2 Submission Site -- Now live

2009-08-24 Thread Mark Murphy
of the automated judging process (or by human judges in Round Two, who hopefully will be savvy enough to get past this issue), then the 2nd package name will not be an issue, since that app will never be updated, anyway. So...will ADC2 apps be used by people outside of ADC2 judging? Thanks! -- Mark Mur

[android-developers] Re: ADC 2 Submission Site -- Now live

2009-08-24 Thread Mark Murphy
t; support. Ah, good. Thanks! -- 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 Dev

[android-developers] Re: Problem to communicate with a service from an application

2009-08-25 Thread Mark Murphy
Take a look at: http://bit.ly/k4Yy3 (above link points to an example in the source code to _The Busy Coder's Guide to *Advanced* Android Development_). > Why in each example, there is an application AND a service in the same > package ? Not all examples have this. > Is is mandat

[android-developers] Re: Do the applications keep/manage their own SQLite databases (files)?

2009-08-25 Thread Mark Murphy
> Android includes a database engine (SQLite). In general, do the > applications keep/manage their own databases (files) or is there a > unifying database manager? Applications keep/manage their own databases. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Develo

[android-developers] Re: Checking whether DB Exists

2009-08-25 Thread Mark Murphy
otherwise > it is already created and initialized. > > Is there any simple API available to check whether DB exists or not ? Use SQLiteOpenHelper instead of opening the database yourself. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http:/

[android-developers] Re: Activate GPS service

2009-08-26 Thread Mark Murphy
it does not work, check the other actions defined on Settings. -- 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

[android-developers] Re: MenuItem ID

2009-08-26 Thread Mark Murphy
ut I would prefer to use an id. Menu IDs are like layout widget IDs, named by R.id: if (R.id.congestion==item.getItemId()) { // suggest a cold remedy } else if (R.id.warning==item.getItemId()) { // warn them about the side effects of the cold remedy } -- Mark Mur

[android-developers] Re: NullpointerException

2009-08-26 Thread Mark Murphy
n anyone help me ? Most likely, your et variable is null. You may not have a widget with android:id="@+id/et" in your activity. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~

[android-developers] Re: LocationManager always returns null ... ?

2009-08-26 Thread Mark Murphy
ill not be able to send the fix at the right time for getLastKnownLocation() to work as you expect. Moreover, on a production device, getLastKnownLocation() will *never* work as you expect, because it takes GPS several seconds, at best, to get a fix, and it will only *try* get a fix because you hav

[android-developers] Re: ontouch slideout buttons

2009-08-26 Thread Mark Murphy
onsguy/cw-advandroid/tree/e50e087577f8b28e727355c55097a5da2577d6d3/Animation/SlidingPanel (or http://bit.ly/93Xjd if that URL is too long) Combining those techniques, you should be able to create buttons that slide in on a screen tap. -- Mark Murphy (a Commons Guy) http://commonsware.com Android

[android-developers] Re: Tab2 scroll view showing up in tab1

2009-08-26 Thread Mark Murphy
tablayout2" android:id="@+id/tablayout3" That usually indicates you want to have four tabs, not three. Do you perhaps need to move android:id="@+id/ScrollViewtablayout2" into one of the other three layouts? -- Mark Murphy (a Commons Guy) http://commonsware.com Android A

[android-developers] Re: Does Android have APIs for HTTP progressive download for media files?

2009-08-27 Thread Mark Murphy
> Does Android have APIs for HTTP progressive download for media files? MediaPlayer and VideoView definitely have support HTTP URLs for video files. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.h

[android-developers] Re: How to get the email address using the ContentProvider

2009-08-27 Thread Mark Murphy
ks that shows querying the Contacts content provider, including one that will return emails for the contacts: http://github.com/commonsguy/cw-advandroid/tree/e50e087577f8b28e727355c55097a5da2577d6d3/Database/Contacts (or http://bit.ly/3RQqcC if that URL is too long) -- Mark Murphy (a Commons G

[android-developers] Re: text view focus

2009-08-27 Thread Mark Murphy
> how can we give text view focus? Call requestFocus() on the TextView. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you

[android-developers] Re: How to create button with icon and text

2009-08-27 Thread Mark Murphy
> How can I create a Button with icon and text? Use android:drawableLeft or android:drawableRight or android:drawableBottom or android:drawableTop. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.h

[android-developers] Re: Query: Packing resources into an APK

2009-08-27 Thread Mark Murphy
od to accept an InputStream as input, rather than a File. If these are files you intend to modify, you will need to use the InputStream to copy the file from the APK to some location on the device (e.g., openFileOutput()). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Develo

[android-developers] Re: How to create button with icon and text

2009-08-27 Thread Mark Murphy
ound="#FF" in the first place. That should also remove all of your focus and touch highlighting, as they are part of the background. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~

[android-developers] Re: Problem Using Jar File

2009-08-27 Thread Mark Murphy
resource IDs (the numbers that R.layout.foo and R.id.bar map to) will be different in the new project. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message

[android-developers] Re: Force screen orientation and avoid destroy call

2009-08-27 Thread Mark Murphy
Config) > { > super.onConfigurationChanged(newConfig); > } > > I've tried it and it seems to work. Is there any other alternative or > is it the correct solution? Well, I think it's the correct solution. But, then again, I'm biased in favor of the author of that fine,

[android-developers] Re: can I use EditText in AppWidget?

2009-08-27 Thread Mark Murphy
> I use EditText in AppWidget,and there is no error in Eclipse,but It > can not run. > Why?what i should do if I want use EditText in AppWidget? EditText is not allowed in an AppWidget: http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout -- Mark Murphy (

[android-developers] Re: Two applications, same package. How?

2009-08-27 Thread Mark Murphy
t your code and R.java should wind up in some other package. Depending on your code base, it may be worthwhile to package some of it as an independent JAR file that the two applications use. Since such JAR files cannot reliably reference R.java constants anyway, that JAR file's code would not n

[android-developers] Re: Problem Using Jar File

2009-08-28 Thread Mark Murphy
ode in the JAR does not reference R.layout, R.id, R.drawable, and so on, then your JAR is fine. Do a clean build of your project (e.g., get rid of the contents of gen/ and bin/), and you should be OK. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://com

[android-developers] Re: Can an application get event that it is installed?

2009-08-28 Thread Mark Murphy
> In application, I want to do some operations when it is installed, how can > I implement this feature? You can't, short of modifying the Android firmware. The user must run your application the first time. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Deve

[android-developers] Re: Load of applications in RAM

2009-08-28 Thread Mark Murphy
another application starts one of their activities or remote services, etc. As little as possible is loaded into RAM at system startup. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---

[android-developers] Re: Problem Using Jar File

2009-08-28 Thread Mark Murphy
pparently expensive ("Note: use of this function is discouraged. It is much more efficient to retrieve resources by identifier than by name."). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commons

[android-developers] Re: Is the limit of memory heap only 6M?

2009-08-28 Thread Mark Murphy
> > Any idea how to deal with this ? Tactically, load fewer images. Strategically, find ways to help out with improvements to the Android garbage collector. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://com

<    5   6   7   8   9   10   11   12   13   14   >