[android-beginners] Re: Application has stopped

2009-06-21 Thread Mark Murphy
06-21 20:33:23.136: ERROR/AndroidRuntime(737): ... 12 more The key line is usually the one that looks like this: > 06-21 20:33:23.136: ERROR/AndroidRuntime(737): Caused by: > java.lang.RuntimeException: Binary XML file line #78: You must supply a > layout_width attribute. Here, th

[android-beginners] Re: Application has stopped

2009-06-21 Thread Mark Murphy
Dennis Christy wrote: > It was layout-land. > > How do I get to the stack trace? That is in LogCat. There will be a few dozen error lines (in red if you're using DDMS) showing your Java stack trace. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.

[android-beginners] Re: Application has stopped

2009-06-21 Thread Mark Murphy
yout/land. That should be res/layout-land. > I have looked at the LogCat, but don't see anything that sheds any light > on the problem. Can you post the stack trace? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twit

[android-beginners] Re: Testing on-boot services.

2009-06-21 Thread Mark Murphy
memory, they won't run while the device is asleep). Use your BOOT_COMPLETED listener to schedule the AlarmManager. This has the side benefit of being more testable in Eclipse, since you can play with the alarm settings to get it to fire off sometime after you have the debugger set up.

[android-beginners] Re: Can I access the object of activity in a view?

2009-06-21 Thread Mark Murphy
urrency) working in ordinary Java, then move back into Android. It may save some frustration. :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~--

[android-beginners] Re: Can I access the object of activity in a view?

2009-06-20 Thread Mark Murphy
our Views can access relevant objects inside YourOwnActivity. -- 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-beginners] Re: Can I access the object of activity in a view?

2009-06-20 Thread Mark Murphy
w's Activity. -- 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 Beginn

[android-beginners] Re: Items in ListView don't get selected using touch

2009-06-20 Thread Mark Murphy
android:layout_width="fill_parent" android:layout_height="fill_parent"> Since the MapView is set to fill the RelativeLayout, but the LinearLayout appears later in the XML, the LinearLayout gets a higher Z-order and therefore sits atop the map. -- Mark Murphy (a Common

[android-beginners] Re: Items in ListView don't get selected using touch

2009-06-19 Thread Mark Murphy
on top of your list, blocking touches? -- 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 &qu

[android-beginners] Re: Items in ListView don't get selected using touch

2009-06-19 Thread Mark Murphy
> if I try to touch an item to select it the item doesn't get selected. > > Any ideas ? This is expected behavior. Try it in any other application, and you should get the same thing. Touch events create list item "clicks", not persistent selections. -- Mark Murphy (a Commons

[android-beginners] Re: BroadCastReceiver can communicate with services?

2009-06-19 Thread Mark Murphy
to do it? Call startService() with an Intent. The Intent should identify your service, and you should call putExtra() on the Intent to attach any data you need. In the service, implement onStart(), and read the extras off the received Intent. -- Mark Murphy (a Commons Guy) http://commonsware.com _The

[android-beginners] Re: Database location and management via external tools.

2009-06-18 Thread Mark Murphy
as dismayed to see: "Announcement: The developer, due to various engagements, is unable to support this project any longer. Hoping to find someone who is interested in owning and taking this project further." If anyone knows any XUL jockeys who might want to take over this project, point it out to 

[android-beginners] Re: Send Mail NOT from user account

2009-06-18 Thread Mark Murphy
sing the android > sdk. No, you will still need to use some third-party JAR for this (e.g., JavaMail, if you can get it working on Android). -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Deve

[android-beginners] Re: Database location and management via external tools.

2009-06-18 Thread Mark Murphy
kage for "your.package.here"). Or, use DDMS or adb pull to download the database to your development machine, where you can use whatever SQLite clients you want. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development

[android-beginners] Re: want to write some data in a file in Android

2009-06-18 Thread Mark Murphy
> be written to this file. > But its not doing so. The program is not crushing at all. > > Can anybody tell me where am I doing wrong. Questions regarding the Android source code are best asked on a discussion list pertaining to Android source code: http://source.android.com/discuss --

[android-beginners] Re: Q re Android Programming Tutorials a.M Murphy

2009-06-17 Thread Mark Murphy
> Hope it's not off-topic asking questions about a specific learning > resource in this forum... > > Book is the Commonsware book "Android Programming Tutorials" by Mark > Murphy. You are probably better off with the cw-android Google Group: http://groups.goo

[android-beginners] Re: Bundle always null

2009-06-17 Thread Mark Murphy
, or because Android ran out of memory and had to destroy your activity to reclaim RAM. In your case, your activity is not being destroyed, merely stopped when the second activity launches. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android D

[android-beginners] Re: can android work with xRandR to enable more than one display?

2009-06-17 Thread Mark Murphy
e Android SDK. -- 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 Beginners

[android-beginners] Re: Choosing the Right Book

2009-06-16 Thread Mark Murphy
de to Android Development_ will be updated with Android 1.5 stuff by the end of June. The Warescription program gives you PDFs of all three. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Ver

[android-beginners] Re: How to make 3rd party installer?

2009-06-16 Thread Mark Murphy
install the APK, it will trigger the install process. -- 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 t

[android-beginners] Re: Porting C project in android

2009-06-14 Thread Mark Murphy
ly possible today. There will (soon?) be a Native Developer Kit (NDK) which will allow for C code in Android SDK projects. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~-

[android-beginners] Re: What DB do you use in android flatform?

2009-06-14 Thread Mark Murphy
> I'm going to design small application in android flatform. > I need DB to manage data. What DB is mostly used in android? > and Where can I get the docs? SQLite is included with Android. http://sqlite.org and http://developer.android.com for documentation. -- Mark Murphy (a Com

[android-beginners] Re: How to put buttons in a row?

2009-06-14 Thread Mark Murphy
n9 You could use: -- A nested set of LinearLayouts -- A RelativeLayout, using alignWithParentTop and kin -- A TableLayout -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~

[android-beginners] Re: XML Layout Specification

2009-06-14 Thread Mark Murphy
Javadocs", with other material at the URL I listed a couple of bullets ago. > Thanks for any hints for a complete newbie. Welcome to Android! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~-

[android-beginners] Re: Practical questions

2009-06-13 Thread Mark Murphy
ing out quite nicely. Hence, it would appear that, in the eyes of consumer electronics manufacturers, Android does not have "hefty processing requirements". Now, if you would like to cite articles of your own, demonstrating that firms are indeed skipping over Android due to "hefty proc

[android-beginners] Re: String format of numbers into currency

2009-06-13 Thread Mark Murphy
quot;$###,###.###", s); > String t = stringformatoutput; > > hoping to have my formatted string ready for output in t, but I get an > error message that stringformatoutput cannot be resolved. > > Can someone set me straight please String t=customFormat("$###,#

[android-beginners] Re: compatibility of an app across android versions

2009-06-13 Thread Mark Murphy
to be sure. -- 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 Beginners&qu

[android-beginners] Re: How to set minimum value for SeekBar?

2009-06-13 Thread Mark Murphy
isplay on the SeekBar. Set the SeekBar's maximum to be 140 (100-(-40)), then add 40 to the raw value to get the number you should use when setting the bar position. > how to set minimum value for SeekBar. The minimum value is 0 and cannot be changed, other than for you to build your own S

[android-beginners] Re: ListView vs ScrollView

2009-06-12 Thread Mark Murphy
ollbar. That might be a ListView. It might also be some other type of layout (e.g., TableLayout), wrapped in a ScrollView. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.or

[android-beginners] Re: Practical questions

2009-06-12 Thread Mark Murphy
ropriate for cheap consumer electronics. Not everybody agrees with you: http://asia.cnet.com/blogs/rehashplus/post.htm?id=63011448&scid=rvhm_ms -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki

[android-beginners] Re: Problem calling openStream() FileNotFoundException

2009-06-12 Thread Mark Murphy
; My manifest contains the Internet permission: > > > > > The problem is as though the DNS cant resolve the domain ? > > Any ideas ?? Have you tried putting that URL in the Browser app? I know it will not display properly, but it will indicate whether your emulator/device

[android-beginners] Re: modifying a Listview after onCreate (at buttonclick).

2009-06-11 Thread Mark Murphy
b logcat, DDMS, or the DDMS perspective in Eclipse. If I had to guess, ArrayAdapter#clear() may not work when you initialize it with a static String array, but that's just a guess. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android t

[android-beginners] Re: Loading bar / splash screen for webview app

2009-06-11 Thread Mark Murphy
e WebView. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "And

[android-beginners] Re: Using Buttons in home screen widgets

2009-06-11 Thread Mark Murphy
that the service is somehow making a difference, but I'm not quite sure why. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received

[android-beginners] Re: Using Buttons in home screen widgets

2009-06-11 Thread Mark Murphy
tton to configure the widget. The configure button pops an activity, but the refresh button triggers the same logic as is invoked when updateTimeMillis elapses. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available!

[android-beginners] Re: Loading bar / splash screen for webview app

2009-06-11 Thread Mark Murphy
ient, then told the WebView to load my content 3. At the same time, started a RotateAnimation on my ImageView 4. When the WebViewClient got onPageFinished(), I stopped the animation, made the ImageView be View.GONE, and made the WebView be View.VISIBLE This worked fairly nicely. -- Ma

[android-beginners] Re: No Activity found to handle intent {action="com.example.MY_ACTION"}

2009-06-10 Thread Mark Murphy
ing the element from your manifest, or -- adding the category to the Intent you are using with startActivityForResult() Your element is saying "I want Intents that are for the DEFAULT category". Your Intent does not match that. Change one or the other, and I suspect it will work

[android-beginners] Re: Android Widget

2009-06-10 Thread Mark Murphy
rce="@xml/mywidget" /> > > > > > > > > > I am calling the service from the MyWidget which extends > AppWidgetProvider > > Please help me out In your manifest, you have your element inside the element. The el

[android-beginners] Re: OverlayItem Drawable Any way to get current drawable?

2009-06-09 Thread Mark Murphy
and would prefer not to > split them up. Is there something I'm missing here? You could keep track of your item states outside of the drawables. I think you can subclass OverlayItem to add whatever additional information you might want to hold onto. -- Mark Murphy (a Commons Guy) http

[android-beginners] Re: android' is not recognized as an internal or external command,

2009-06-09 Thread Mark Murphy
ove to 1.5r2, which is the current release. My apologies to the OP for my earlier incorrect response. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~

[android-beginners] Re: android' is not recognized as an internal or external command,

2009-06-09 Thread Mark Murphy
ws-1.1_r1\android-sdk- > windows-1.1_r1\tools>and > oid > 'android' is not recognized as an internal or external command, > operable program or batch file. > > Please guide me on this http://developer.android.com/sdk/1.5_r2/installing.html See "Installing the SDK",

[android-beginners] Re: How can I do this?

2009-06-08 Thread Mark Murphy
onstrates using a Handler to set up a timer-style system. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you

[android-beginners] Re: Activity thread keeps restarting

2009-06-08 Thread Mark Murphy
about > this anywhere. Include some information in onRetainNonConfigurationInstance() that will tell onCreate() what to do (e.g., boolean indicating "we're changing orientation, so please do not re-do the calculations"). Or, move the calculation logic into a service, w

[android-beginners] Re: Creating semi-transparent list items - possible?

2009-06-08 Thread Mark Murphy
ew()/bindView() for CursorAdapter), depending on what you want to do with your rows. For the getView() scenario, visit: http://wiki.andmob.org/samplecode where you will find links to the half-dozen or so blog posts I made under the Fancy ListViews series. -- Mark Murphy (a Commons Guy) http://com

[android-beginners] Re: Creating semi-transparent list items - possible?

2009-06-08 Thread Mark Murphy
at I would like to have now, is that the list items have a > transparency (like having an opacity of 75-80%) so that the background > shines through a little. > > Could you guys tell me whether that’s possible? Yes, though you will need to specify your own custom row layout that h

[android-beginners] Re: Where do I start

2009-06-08 Thread Mark Murphy
. If you need books on Android, I keep a running tally of them on a knol: http://knol.google.com/k/-/android-programming (though I need to add the recent O'Reilly book...) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki

[android-beginners] Re: Overalying camera preview

2009-06-08 Thread Mark Murphy
that this may reduce the frame rate at which the SurfaceView gets updated, though I am not certain if the SurfaceView rendering or the camera is the limiting factor on frame rate. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android D

[android-beginners] Re: Flow problem in Activity class

2009-06-08 Thread Mark Murphy
is pressed. If you are, you may wish to start from some code that is known to work. There are many published working examples of this, including: http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/view/LinearLayout8.html -- Mark Murphy (a Commons Guy) http://commons

[android-beginners] Re: Can a Text View request and receive focus

2009-06-07 Thread Mark Murphy
MMC2 wrote: > Can a Text View request and receive focus? Not that I am aware of. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~

[android-beginners] Re: Hello, Android the book

2009-06-06 Thread Mark Murphy
ed* Android Development_, available presently via the Warescription, and to appear in print in ~7 weeks. Android could definitely use a book aimed at game development (2D/3D), though that'll have to be written by somebody other than me. Thanks for the feedback! -- Mark Murphy (a Commons G

[android-beginners] Re: how to check if another application has been started

2009-06-05 Thread Mark Murphy
raydey wrote: > Hey guys, I'm trying to create an application where I need to check if > an application has been started. So for example, if the calendar was > clicked, before the calendar came up, my application would start up. > Is there any way to do this? Not that I am aw

[android-beginners] Re: How to detect home screen?

2009-06-05 Thread Mark Murphy
to the home screen and leaves their phone in that state, so your intended solution (do work when the device is on the home screen) will not work for a significant number of users. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android

[android-beginners] Re: Hello, Android the book

2009-06-05 Thread Mark Murphy
sed it because of the 1 year update guarantee, and > with the sdk constantly evolving I would hate to > buy a book that didn't update its examples. Thanks for the vote of confidence! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android D

[android-beginners] Re: errno=Connection timed out

2009-06-05 Thread Mark Murphy
resolved. Also, make sure you are not behind some firewall or proxy server that might interfere with git's operation. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.org/hado --~--~-~--~---

[android-beginners] Re: Display a simple alert message in Android 1.5

2009-06-04 Thread Mark Murphy
gt; Can somebody provide an example of how to display a simple alert? http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.html Use AlertDialog.Builder with setTitle() and/or setMessage(). -- Mark Murphy (a Commons Guy) http://commonsware.

[android-beginners] Re: How to detect home screen?

2009-06-04 Thread Mark Murphy
read priority, and you should be set: http://developer.android.com/reference/java/lang/Thread.html#setPriority(int) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.org/hado --~--~-~--~~--

[android-beginners] Re: Force Close on startActivityForResult since 1.5 update on phones but not emulator

2009-06-04 Thread Mark Murphy
Then, post the stack trace to a Web service, or ask the user to email it to you as an attachment, or something. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ Yo

[android-beginners] Re: How to detect home screen?

2009-06-03 Thread Mark Murphy
nning. What is it that you are trying to achieve? -- 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 t

[android-beginners] Re: Bug in the MediaStore Content Provider ?

2009-06-03 Thread Mark Murphy
; the conent provider after after it has been added to sdcard. What makes you think that is expected? Can you point to someplace in the documentation that says MediaStore immediately indexes new MP3 files? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Androi

[android-beginners] Re: How to use OrientationEventListener

2009-06-02 Thread Mark Murphy
n may be rather difficult. If the Browser application does what you want, you may wish to review its source code to see how it does it. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~---

[android-beginners] Re: Best way to add 100.000 words to database

2009-06-02 Thread Mark Murphy
nd dictionaries are traditionally implemented. I would be rather surprised if many used a SQL database. For example: http://jaspell.sourceforge.net/ They use ternary search trees for storing their dictionary. Moreover, they have an implementation of such trees in Java under a BSD license. --

[android-beginners] Re: Accessing android DB(Created by Android media app) using Native code.

2009-06-02 Thread Mark Murphy
http://source.android.com/discuss and find the list that fits your situation. -- 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

[android-beginners] Re: MapView Tutorial help

2009-06-01 Thread Mark Murphy
Theo K wrote: > 2. The Android 1.5 SDK warns me that the getZoomControls() method is > deprecated. It would be good if this was updated in the tutorial. > What would be a better way of creating Zoom controls? Use setBuiltInZoomControls() in MapView. -- Mark Murphy (a Commons

[android-beginners] Re: how to check in intenet connction is avaliable

2009-06-01 Thread Mark Murphy
vity exists. For example, you might disable menu choices that imply the use of a connection. In this case, I assumed he wanted those connectivity methods as part of his diagnostics, to confirm his suspicion that the device indeed had no connectivity at the time of the crashes. -- Mark Murphy (a

[android-beginners] Re: how to check in intenet connction is avaliable

2009-05-31 Thread Mark Murphy
tRouteToHost() or getActiveNetworkInfo(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed t

[android-beginners] Re: Image quality

2009-05-31 Thread Mark Murphy
symptoms you are experiencing (rather than a generic "loses too much quality") -- how you are viewing the image (Gallery? your own app? Picture Frame widget? something else?) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Andr

[android-beginners] Re: Best way to add 100.000 words to database

2009-05-31 Thread Mark Murphy
amp;& (line=input.readLine())!=null; i++) { DB.execSQL(...); } DB.setTransactionSuccessful(); } plus an appropriate try/catch in there. However, bear in mind that this will still take a very long time, so unless you're trying this for educational purposes, I'd move along to one of the

[android-beginners] Re: Best way to add 100.000 words to database

2009-05-31 Thread Mark Murphy
(); >} > Something like that should work. This will cut the time somewhat, but 100,000 insert statements will still take a fair amount of time to process, coarser transactions or not. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://tw

[android-beginners] Re: Best way to add 100.000 words to database

2009-05-31 Thread Mark Murphy
ke up double the memory. 3. Create the SQLite database on your development PC and download it off the Internet before first use. Downside: if SQLite ever changes its database format, you're in trouble. 4. Use some other data structure and library than SQLite. -- Mark Murphy (a Commons Guy) htt

[android-beginners] Re: Multiple Buttons and OnClickListener issue

2009-05-29 Thread Mark Murphy
Logik wrote: >Can Someone help explain why I get an error when I create a second > onClick listener for a second button? What is the error? You can get the Java stack trace from adb logcat, standalone DDMS, or the DDMS perspective in Eclipse. -- Mark Murphy (a Commons Guy

[android-beginners] Re: Help with Services

2009-05-28 Thread Mark Murphy
so you let the user know of completed work, rather than telling a possibly non-existent activity. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received t

[android-beginners] Re: [android-beginners]Screen pointer

2009-05-28 Thread Mark Murphy
een#Capacitive I'm not aware of any capacitive touchscreen stylii available, but there's probably one out there someplace. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~

[android-beginners] Re: Question about requestLocationUpdates()

2009-05-27 Thread Mark Murphy
27;t get the > "network" provider to work. In fact, when I list all providers, only > gps is in there. Does the emulator not have the network provider > available? AFAIK, it does not. -- Mark Murphy (a Commons Guy) http://commonsw

[android-beginners] Re: Support for Javax.comm

2009-05-26 Thread Mark Murphy
ns about adding serial port support should go to a list dedicated to Android firmware: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Up

[android-beginners] Re: Support for Javax.comm

2009-05-25 Thread Mark Murphy
with the appropriate classes from Apache Harmony. However, space on phone is very limited, so you will need to make a very strong argument why these classes are essential for a significant number of application developers. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://tw

[android-beginners] Re: Pushing files onto device

2009-05-25 Thread Mark Murphy
f your project and thereby include it in the installed APK. > Pushing the two files onto the device is essential to the application, Then do not write the application, or implement your desired functionality some other way (e.g., scripting language instead of JARs). -- Mark Murphy (a

[android-beginners] Re: Error inflating class TextView

2009-05-25 Thread Mark Murphy
ndroid.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562) > 05-25 18:15:52.070: ERROR/AndroidRuntime(840): ... 34 more > > > Why is it having problems inflating the TextView? I'm stumped, please > help. Look at line #17 of the layout ("Binary XML

[android-beginners] Re: Suppress Orientation Change

2009-05-25 Thread Mark Murphy
english. http://wiki.andmob.org/samplecode That page points you to a number of code samples, including my Rotational Forces series, which would lead you to: http://androidguys.com/?p=2891 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Developm

[android-beginners] Re: onCreateContextMenu ListView Confusion

2009-05-25 Thread Mark Murphy
Sikus wrote: > Is there any way how can I find out item selected in > onCreateContextMenu method? I need show or hide items in the context > menu according to item in ListView. getSelectedItem(), getSelectedItemId(), and getSelectedView() should all work, called on your ListView.

[android-beginners] Re: How to convert inputStream to string

2009-05-25 Thread Mark Murphy
Android. Use a search engine to find Java examples like this one: http://www.kodejava.org/examples/266.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.

[android-beginners] Re: ListView

2009-05-24 Thread Mark Murphy
o make the divider be transparent (#). Either of those should have the effect of "hiding" the separator. The difference is that in the latter, the space taken up by the separator will still be there. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commo

[android-beginners] Re: how to run sdk sample activities?

2009-05-23 Thread Mark Murphy
Kent Loobey wrote: > What is the URL to instructions on how to run the sample activities included > in the Android 1.5 SDK? They are in the ApiDemos icon in your emulator's Launcher, usually. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsg

[android-beginners] Re: TextView scrolling

2009-05-22 Thread Mark Murphy
o repaint or redraw or something? > > > Anyone? I used a ScrollView for some examples in my Advanced Android book: transcript.setText(transcript.getText().toString()+"Shaking started\n"); scroll.fullScroll(View.FOCUS_DOWN); (where transcript is a TextVie

[android-beginners] Re: URLEncoder encode/decode

2009-05-22 Thread Mark Murphy
encode/decode in the "x-www-form-urlencoded" MIME content type. http://www.exampledepot.com/egs/java.net/FormEncode.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~

[android-beginners] Re: Messaging between 2 threads

2009-05-21 Thread Mark Murphy
arrange for such-and-so work to be done in the background", in which case thread pools (using AsyncTask or LinkedBlockingQueue) may be the proper answer. If you are new to multithreaded programming in Java, I encourage you to read up on the subject, such as _Java Concurrency in Practice_. --

[android-beginners] Re: storing values of an array

2009-05-19 Thread Mark Murphy
droid has built-in parsers to help you read them back in. Or, read and write them in binary format. See Context and openFileOutput() to get an OutputStream on a file in your application's private data store. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to A

[android-beginners] Re: httpclient -> http.client

2009-05-16 Thread Mark Murphy
han we will here. -- 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 Beginners&quo

[android-beginners] Re: Download Webpage

2009-05-16 Thread Mark Murphy
ide/topics/security/security.html -- 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

[android-beginners] Re: Download Webpage

2009-05-16 Thread Mark Murphy
> How I can download a webpage and analyze it? http://exampledepot.com/egs/java.net/pkg.html http://hc.apache.org Both of those libraries are integrated into Android. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 A

[android-beginners] Re: Query - Android UI/worker threads

2009-05-15 Thread Mark Murphy
cannot make "native C calls" in an application written to the Android SDK. Questions regarding Android firmware development are best asked on a discussion list that pertains to Android firmware development: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://com

[android-beginners] Re: i want to connect the emulator with the tomcat server using http protocol

2009-05-15 Thread Mark Murphy
> i want to develope the application in which i want to the data from > server so can anyone tell me the procedure of that connetion.. http://exampledepot.com/egs/java.net/pkg.html http://hc.apache.org Both of these are available in Android. -- Mark Murphy (a Commons Guy

[android-beginners] Re: Compiling C/C++ Code and Call It from Java

2009-05-14 Thread Mark Murphy
JNI to call it from Java. However, questions about that should be sent to: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ Y

[android-beginners] Re: Store prepopulated sqlite database in an app

2009-05-13 Thread Mark Murphy
ter you are done with it. For small databases, this is not an issue, but I would not pack a large database in this way (e.g., 15MB). Finally, others have reported errors when attempting to expand large files out of the APK. I think the limit was 1MB or 2MB. -- Mark Murphy (a Commons Guy) http:

[android-beginners] Re: Settings not saving

2009-05-13 Thread Mark Murphy
"weight", 145); > } It is expensive to keep reloading your SharedPreferences this way. > public static String GetGender(Context context){ > return PreferenceManager.getDefaultSharedPreferences(context) > .getString("gender", "Male&quo

[android-beginners] Re: Running Android applications on Linux

2009-05-13 Thread Mark Murphy
dinary Linux. You can run Android in an ARM emulator running on Linux, if that helps. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message

[android-beginners] Re: View tables created via android application in sqlite3

2009-05-13 Thread Mark Murphy
, or use adb pull or DDMS to retrieve the file off of the device/emulator and use a SQLite client on your development machine. Personally, I use the SQLite Manager add-on for Firefox. -- Mark Murphy (a Commons Guy) http://commonsware.com _The

[android-beginners] Re: Not sure how to use Cursors

2009-05-13 Thread Mark Murphy
; then the > database could have bad data. I would rather loose an entire row, than > have a half-correct row. Individual SQL statements are atomic; multiple statements can be made atomic via transactions. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder

[android-beginners] Re: Answering the phone

2009-05-13 Thread Mark Murphy
> How do I get an application to actually answer the phone? For applications written to the SDK, you don't. That can be done by firmware applications, but not SDK applications. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development

[android-beginners] Re: Dreaded "Stopped Unexpectedly"

2009-05-12 Thread Mark Murphy
/> >> >> >android:key="BAC" >> >android:title="@string/baclbltxt" >> >android:defaultValue="0.08" >> >/> >> >> >android:layout_width=&quo

[android-beginners] Re: Value Hidden in a ListView

2009-05-12 Thread Mark Murphy
e/android/widget/AdapterView.OnItemSelectedListener.html Whichever one of those you are using, the ID of the item in the list is passed as the "id" parameter. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Developmen

<    3   4   5   6   7   8   9   10   11   12   >