[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 wrote:

[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 all

[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 wrote: > How do I get the MD5 fingerprint in Windows Vista.  I

[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 you

[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 only

[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 wrote: > If one had an application that needed to know its location, and the > location sensors were disabled, > is it possible to encourage a user to r

[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 ./platforms/

[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 wrote: > Same exact thing here. It is VERY unlikely that the screen size is the > problem, as so many have

[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 wrote: > I am trying to run the program mentioned in the link below and i >

[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: htt

[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 wrote: > Hi, > > I am confused with the SDK documentation which describes th

[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 s

[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 s

[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" wrote: > I'm trying to figure out a java.lang.RuntimeException problem in my app.

[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 wrote: > BACK UP YOUR KEYSTORE FILE > > BACK UP YOUR KEYSTORE FI

[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 regula

[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 wrote: > right click on the project in eclipse, an

[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 nee

[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 wrote: > Well, to make an Android Virtual Device, one needs a

[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: http://developer.android.com/intl/zh-CN/reference/

[android-beginners] Re: Long boot for emulator.. avoid restart?

2009-11-29 Thread Lance Nanek
Just leaving it running and starting apps from Eclipse seems to work fine for me. Provided I don't have my phone plugged in anyway, which is the default target on my machine. On Nov 28, 5:28 pm, Donovan Walker wrote: > Hello all! New to this group, and to Android. > > It takes a while to restart

[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 i

[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 worke

[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: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=opengl/java/android/opengl/GLSurfaceView.java;h=9

[android-beginners] Re: Absolutely Infuriating

2009-11-22 Thread Lance Nanek
t they > were missing this declaration of mTabHost, and the package imports. > > On Nov 19, 11:17 pm, Lance Nanek wrote: > > > >http://developer.android.com/guide/tutorials/views/hello-tabwidget.html > > >mTabHost will not resolve > > > That one can be fix

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

2009-11-22 Thread Lance Nanek
| > findViewById()? > > I tested it too...albeit probably not a very accurate way...with just > having it make a simple Toast in the onResume() and onCreate() > callbacks and would only get the Toast displayed the first time I went > to that tab after starting the app. > >

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

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

[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 wrote: > Eddie, > > The onTabChanged must be called from with my main TabActivity correct? > > If this is the case this isn't the

[android-beginners] Re: creating an Android Project question

2009-11-20 Thread Lance Nanek
I ran into a similar problem once. Going to the Window menu option in Eclipse, picking the Android SDK and AVD Manager option, and installing some platforms fixed it in my case. On Nov 19, 7:48 pm, suen0931 wrote: > Dear First, > > Nice to meet you. I am a new developer for Android in Taiwan. > >

[android-beginners] Re: Absolutely Infuriating

2009-11-19 Thread Lance Nanek
I'm copy pasting his code into the wrong place, because > it gives all 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. >

[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-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 wrote: > Every single example of using Tabs - be it the example provided on the > Android dev s

[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. I

[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 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: 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 10,

[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 wrote: > Hello everyone, I'm new to Android (but not Java), so bear with me. > > I'm trying to create a stopwatch-type UI, where a di

[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 thi

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

2009-11-02 Thread Lance Nanek
s nothing in terms > of protecting it from Android deciding to kill it. > > On Nov 1, 3:26 am, Lance Nanek wrote: > > > 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/ref

[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: http://developer.android.com/intl/fr/referenc

[android-beginners] Re: showDialog() fails to show anything

2009-10-28 Thread Lance Nanek
This seems to show the dialog fine in some quick tests: public class TestProgressDialog extends Activity { private static final int ID_DIALOG_X = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

[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
x27;t work. Same error as following a URL with the HTML version of the My Map. Just downloaded 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 wrote: > Trying a My Maps URL directly on my Android 1.6 phone right now didn't >

[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
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 showed the map OK, but tapping the icons did nothing. Zooming the map out got stuck partway when I tapped the zoom out control. The Brow

[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 wrote: > The "this" you are passing into new Intent is an anonymous derived > class of View.OnClickListener not your derived Activity class > WelcomeScreen

[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 fo

[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 ofte

[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 wrote: > I have an app in which I want to be able to select a location from a > list of cit

[android-beginners] Re: auto-enable GPS

2009-09-21 Thread Lance Nanek
On Sep 21, 2:54 pm, jotobjects 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? http://developer.android.com/guide/topics/u

[android-beginners] Re: auto-enable GPS

2009-09-19 Thread Lance Nanek
I'd actually prefer if a GPS centric app could flip the setting when a user launches it. Starting the app seems like a clear indication they want to start allowing GPS use again. This would save them trouble. Oh well, at least we have the android.settings.LOCATION_SOURCE_SETTINGS intent to get the

[android-beginners] Re: auto-enable GPS

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

[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 wrote: > GlennovitS wrote: > > Hey > > > I'm about to make an app with some d