[android-beginners] Re: Installing on SD Card Version 2.2

2010-06-28 Thread Lance Nanek
It's just a new manifest attribute. Older versions of the OS will ignore it. Build against the 2.2 SDK, but set your minSdkVersion to an earlier OS. Be careful not to use anything new on the Java side without checking first via something like reflection, however. On Jun 28, 6:23 am, Justin

[android-beginners] Re: Fast way of drawing lines between two points anywhere on screen. OpenGL ES.

2010-02-21 Thread Lance Nanek
Make a single large buffer ahead of time and put things in it as needed. The glDrawArrays method takes first and count arguments, so you never have to draw the entire buffer, just whatever part of it you are currently using. Note that you can draw multiple lines per draw call if your lines are

[android-beginners] Re: MapAPIKey

2010-02-17 Thread Lance Nanek
The keytool program comes with the JDK (Java Development Kit). An example of where it would be is: C:\Program Files\Java\jdk1.6.0_16\bin For that version of the JDK installed to that jdk* directory. On Feb 17, 10:30 pm, Kevin Brooks bear35...@gmail.com wrote: How do I get the MD5 fingerprint in

[android-beginners] Re: Help with Random number generator

2010-01-28 Thread Lance Nanek
Looks like you are calling setText(int resid) whereas what you really want is setText(CharSequence text): http://developer.android.com/reference/android/widget/TextView.html#setText(int) http://developer.android.com/reference/android/widget/TextView.html#setText(java.lang.CharSequence) Convert

[android-beginners] Re: Text effects

2010-01-27 Thread Lance Nanek
There are some attributes for putting a shadow behind the letters in a TextView: http://developer.android.com/reference/android/widget/TextView.html#attr_android:shadowColor http://developer.android.com/reference/android/widget/TextView.html#attr_android:shadowRadius Even setting it to black

[android-beginners] Re: Is it possible direct users to a settings screen?

2010-01-26 Thread Lance Nanek
http://developer.android.com/intl/de/reference/android/provider/Settings.html#ACTION_LOCATION_SOURCE_SETTINGS On Jan 26, 11:05 am, Michael Dorin bsddo...@gmail.com wrote: If one had an application that needed to know its location, and the location sensors were disabled, is it possible to

[android-beginners] Re: aapt

2010-01-17 Thread Lance Nanek
Looks like it is platform specific. Here's a find from my SDK directory showing locations: $ find -name aapt ./platforms/android-1.1/tools/aapt ./platforms/android-2.1/tools/aapt ./platforms/android-2.0/tools/aapt ./platforms/android-1.6/tools/aapt ./platforms/android-2.0.1/tools/aapt

[android-beginners] Re: New Android Project in Eclipse - Build Target Section Not Selectable

2010-01-02 Thread Lance Nanek
ADT is the Android plugin for Eclipse. There is information on updating it here: http://developer.android.com/intl/zh-TW/sdk/eclipse-adt.html#updating On Dec 30 2009, 8:43 pm, matthewevans87 matthewevan...@gmail.com wrote: Same exact thing here. It is VERY unlikely that the screen size is the

[android-beginners] Re: MapActivity cannot be resolved to a type .

2009-12-31 Thread Lance Nanek
Those errors can arise due to not using a Google APIs build target. You can check your build target by right clicking on the project in Eclipse, selecting Properties, then selecting Android. On Dec 30, 8:26 pm, sanjay rao rsan...@gmail.com wrote: I am trying to run the program mentioned in the

[android-beginners] Re: Android 2.0 has Multitouch Keyboard yes or no?

2009-12-26 Thread Lance Nanek
The KeyboardView source code was explicitly linked in one of the previous multitouch threads as an example of using multitouch: http://groups.google.com/group/android-developers/msg/26b5501ec0b1bc4b Just browsing through I can see it using new methods like MotionEvent#getPointerCount in there:

[android-beginners] Re: Activity - calling finish() in onStart()/onCreate()

2009-12-24 Thread Lance Nanek
It does seem to be mentioned in the documentation for the onCreate method at least: http://developer.android.com/intl/zh-CN/reference/android/app/Activity.html#onCreate%28android.os.Bundle%29 On Dec 23, 9:22 am, alexk-il alexk.il.subscripti...@gmail.com wrote: Hi, I am confused with the SDK

[android-beginners] Re: No Build option in the New Android Project dialog Box in the Eclipse IDE

2009-12-23 Thread Lance Nanek
That happened to me once on a computer with large fonts and a small resolution. The contents of the Build Target section of the dialog seem to get hidden before even the white space at the bottom when there isn't enough room. In my case I managed to drag the the dialog downwards by the title bar

[android-beginners] Re: Searching for Hardware that runs Android

2009-12-21 Thread Lance Nanek
It was pretty odd the one time I got to play with one. It was running Android 1.5, but also had a screen resolution other than HVGA. Android 1.6 is when a lot of the built in support for screen resolutions other than HVGA was added to Android. So they must be doing it a different way than you'll

[android-beginners] Re: logcat question

2009-12-19 Thread Lance Nanek
You are already seeing them. The more refers to the lines that are just duplicates of the lines that the RuntimeException exception above the NullPointerException has already printed. On Dec 19, 11:44 am, tinyang tiny...@earthlink.net wrote: I'm trying to figure out a java.lang.RuntimeException

[android-beginners] Re: I can't update my app in the android market

2009-12-12 Thread Lance Nanek
Maybe the signing keystore generator in Eclipse, the upload feature in the Market, and the documentation should have some helpful reminders added that let people know backing it up is a good idea. On Dec 12, 10:11 am, niko20 nikolatesl...@yahoo.com wrote: BACK UP YOUR KEYSTORE FILE

[android-beginners] Re: Did you know you can do this?

2009-12-07 Thread Lance Nanek
I read an interesting article the other day about moderating Google Groups: http://ejohn.org/blog/google-groups-is-dead/ I actually have seen a couple spam messages on this group with the sender spoofed to look like a regular poster. So the issue he mentions about not being able to keep all

[android-beginners] Re: a 2.0 simple project revert to 1.5

2009-12-05 Thread Lance Nanek
You may have to change the values of the attribute(s) on the uses-sdk element in your AndroidManifest.xml to lower numbers as well. I don't think they get automatically updated when you change the build target. On Dec 5, 1:08 pm, Jeffrey Blattman jeffrey.blatt...@gmail.com wrote: right click on

[android-beginners] Re: Noob Question

2009-11-29 Thread Lance Nanek
That's what Android looks like while it is starting up. You'll see that when the emulator starts no matter what program you run. The emulator can take a long time to start up. I've also occasionally seen it get stuck while starting up. In those cases I've just closed it and tried again and it

[android-beginners] Re: New Android Project in Eclipse - Build Target Section Not Selectable

2009-11-29 Thread Lance Nanek
Eclipse 3.5.1 and Ubuntu 9.10 are working for me. Maybe one thing to check is to make sure that you have some build targets installed. After installing the SDK and setting it up in Eclipse go to the Window menu, then choose Android SDK and AVD Manager, then choose Available Packages. Check to see

[android-beginners] Re: getting my current location

2009-11-29 Thread Lance Nanek
If you use the Logcat view in Eclipse or the adb logcat command from the SDK on the command line you can see why your app is crashing. In this case it is probably that getLastKnownLocation is returning null, which it can as per the documentation:

[android-beginners] Re: Problems installing Android SDK - no target available

2009-11-29 Thread Lance Nanek
Have you tried installing some platforms in the Android SDK and AVD Manager? Here's another thread where I just described that process: http://groups.google.com/group/android-beginners/msg/ab392010286fe2c6 On Nov 26, 10:17 am, ak08820 ak08...@gmail.com wrote: Well, to make an Android Virtual

[android-beginners] Re: on click listener application has stopped unexpectedly

2009-11-29 Thread Lance Nanek
When you see the stopped unexpectedly message then you can check the Logcat view in Eclipse or use the adb logcat command line tool from the SDK to see the error. Although in this case it looks like you didn't implement the onCreateDialog method. In order to use the showDialog method you also need

[android-beginners] Re: Beginning to use OpenGL ES on Android

2009-11-23 Thread Lance Nanek
If you are using the built in view subclass for OpenGL called GLSurfaceView, like those API demos do, then GLSurfaceView starts a separate thread that calls the renderer for you:

[android-beginners] Re: Absolutely Infuriating

2009-11-22 Thread Lance Nanek
missing this declaration of mTabHost, and the package imports. On Nov 19, 11:17 pm, Lance Nanek lna...@gmail.com wrote: http://developer.android.com/guide/tutorials/views/hello-tabwidget.html mTabHost will not resolve That one can be fixed by adding this member variable above the onCreate

[android-beginners] Re: Tab views, onStart() ???

2009-11-20 Thread Lance Nanek
Doesn't onPause get called on the activity whose tab you are leaving and onResume get called for the activity whose tab you are going to? On Nov 20, 11:22 am, JasonMP hyperje...@gmail.com wrote: Eddie, The onTabChanged must be called from with my main TabActivity correct? If this is the case

[android-beginners] Re: Tab views, onStart() ???

2009-11-20 Thread Lance Nanek
: presumably, except my code that I place in the onResume never gets run when the tabs are switched. On Nov 20, 1:27 pm, Lance Nanek lna...@gmail.com wrote: Doesn't onPause get called on the activity whose tab you are leaving and onResume get called for the activity whose tab you are going

[android-beginners] Re: random problem

2009-11-19 Thread Lance Nanek
The value of this expression will always be zero: (int) Math.random() Casting to an integer removes the fractional portion. Casting has a higher operator precedence than multiplication or addition, so happens first in your full expression. Parentheses could be used to alter when the cast happens,

[android-beginners] Re: Absolutely Infuriating

2009-11-19 Thread Lance Nanek
kinds of errors. Some about the XML being wrong, and more variable will not resolve errors. The third one I tried was about dynamic tabs, a link I found in this site, but that one does not run. On Nov 19, 1:50 am, Lance Nanek lna...@gmail.com wrote: The API demos (platforms/android-2.0/samples

[android-beginners] Re: Absolutely Infuriating

2009-11-18 Thread Lance Nanek
The API demos (platforms/android-2.0/samples/ApiDemos in the SDK directory) have 3 different tabs examples and compile and run fine for me. What error are you getting? On Nov 17, 10:17 pm, Captain Heff teh.he...@gmail.com wrote: Every single example of using Tabs - be it the example provided on

[android-beginners] Re: Droid doesn't show up as target

2009-11-17 Thread Lance Nanek
I connected a Droid to a Windows laptop yesterday. Development wasn't working until someone pointed out that I needed to update the USB driver that comes with the SDK if I hadn't already. That was an option in Eclipse under the window menu and then picking the Android SDK and AVD Manager option.

[android-beginners] Re: Unable to update TextView on a scheduled-basis

2009-11-12 Thread Lance Nanek
Yeah, I was thinking the View#postDelayed way from that post would be fine in this case myself. On Nov 12, 6:17 am, skink psk...@gmail.com wrote: Lance Nanek wrote: The painless threading blog post here mentions a lot of nice ways: http://android-developers.blogspot.com/2009/05/painless

[android-beginners] Re: Unable to update TextView on a scheduled-basis

2009-11-11 Thread Lance Nanek
The painless threading blog post here mentions a lot of nice ways: http://android-developers.blogspot.com/2009/05/painless-threading.html On Nov 9, 12:12 pm, Chris cpar...@alum.rpi.edu wrote: Hello everyone, I'm new to Android (but not Java), so bear with me. I'm trying to create a

[android-beginners] Re: Issue with Android Location

2009-11-11 Thread Lance Nanek
You can use the LogCat view in Eclipse to see more details when your application crashes. In this case it is probably due to the fact that the getLastKnownLocation method can return null. That would cause a NullPointerException when you try to call a method on the null like getLatitude. On Nov

[android-beginners] Re: R.layout.main Not Found when running WebView Tutorial

2009-11-03 Thread Lance Nanek
import android.R; That actually has to be removed for your purposes. The android.R class is for built-in stuff, like android.R.drawable.ic_menu_edit. The R class with your layout and other things from your app will be in the package declared in your AndroidManifest.xml. I've seen cases where

[android-beginners] Re: Very specific question about Foreground / Background tasks...

2009-11-02 Thread Lance Nanek
. Please note that this does not explain how the system decides that the Service is no longer used. But without that information, putting the task in a Service instead of an Activity accomplishes nothing in terms of protecting it from Android deciding to kill it. On Nov 1, 3:26 am, Lance

[android-beginners] Re: Very specific question about Foreground / Background tasks...

2009-11-01 Thread Lance Nanek
In Android a service can be used to perform work in the background while the user is using other apps: http://developer.android.com/intl/fr/reference/android/app/Service.html If the work should be done at a certain time, then there is the AlarmManager:

[android-beginners] Re: new'ing an Intent

2009-10-27 Thread Lance Nanek
Using WelcomeScreen.this instead of this should take care of the problem Richard pointed out for this case. On Oct 27, 6:09 pm, RichardC richard.crit...@googlemail.com wrote: The this you are passing into new Intent is an anonymous derived class of View.OnClickListener not your derived

[android-beginners] Re: I have a great idea for an app and have tried my best but cant get anything to work!! Help please!!

2009-10-27 Thread Lance Nanek
the file and wouldn't start Maps with it with the KML version of the My Map. On Oct 27, 8:21 pm, Lance Nanek lna...@gmail.com wrote: Trying a My Maps URL directly on my Android 1.6 phone right now didn't work out well. The Google Maps app showed an error, Unable to load the URL. The Browser

[android-beginners] Re: Error

2009-10-26 Thread Lance Nanek
Looks like you have to change this import: import android.content.DialogInterface.OnClickListener; To this: import android.view.View.OnClickListener; This problem often happens when an IDE tries to import something for you, but picks the wrong thing. One thing you can do to help prevent that

[android-beginners] Re: Stuck in Mud Over GWT?

2009-10-14 Thread Lance Nanek
A cannot be resolved error for those classes usually means you have the wrong build target set for the project. Right-click on the project in Eclipse, choose the Properties option, then the Android option from the list on the left of the Properties dialog, then make sure the checked build target

[android-beginners] Re: New app: my NPR

2009-10-01 Thread Lance Nanek
Too bad they don't wiki the api documentation.  The docs would get filled out a lot faster and users could leave comments about different caveats they found. :-)  Maybe Google is reading this ?? :-p Wow, yeah. Even just user comments on doc pages would be great. PHP does this and you often

[android-beginners] Re: Selecting a city location

2009-09-24 Thread Lance Nanek
I don't know about getting a list of cities, but android.location.Geocoder#getFromLocationName will give you an address with latitude and longitude for strings like Boston, MA. On Sep 23, 2:54 pm, bevis bev...@gmail.com wrote: I have an app in which I want to be able to select a location from a

[android-beginners] Re: auto-enable GPS

2009-09-22 Thread Lance Nanek
On Sep 21, 2:54 pm, jotobjects jotobje...@gmail.com wrote: Is there a way to detect if GPS is turned on? http://developer.android.com/reference/android/location/LocationManager.html#isProviderEnabled(java.lang.String) and then ask the user if they want to turn it on?

[android-beginners] Re: auto-enable GPS

2009-09-19 Thread Lance Nanek
On Sep 19, 2:02 am, martin-g ml mg.mli...@gmail.com wrote:  String allowedProviders = LocationManager.GPS_PROVIDER + , + LocationManager.NETWORK_PROVIDER; Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, allowedProviders); This will enable both GPS

[android-beginners] Re: Math functions in Android - HELP

2009-09-17 Thread Lance Nanek
In addition to the standard class, Android does have a few functions redone to be less accurate but better performing: http://developer.android.com/reference/android/util/FloatMath.html On Sep 16, 1:08 pm, Mark Murphy mmur...@commonsware.com wrote: GlennovitS wrote: Hey I'm about to make