[android-developers] Re: (TabActivity) How to switch tab from within a sub activity

2010-04-03 Thread Lance Nanek
I've changed tabs from the activity inside a tab by using a broadcast intent before. Example from a still very rough, unpublished app: Listening in the tab activity subclass for the broadcast:

[android-developers] Re: Droid 2.1-update1 EGL10.eglCreateWindowSurface() deadlocks intermittently

2010-04-03 Thread Lance Nanek
Reminds me of this previous issue a little, where people were working out ways to make GLSurfaceView wait for the rendering to stop before actually pausing: http://code.google.com/p/android/issues/detail?id=4283 On Apr 3, 5:56 pm, Robert Green rbgrn@gmail.com wrote: I've had this reported to

[android-developers] Re: StartActivity(ForResult) at the creation of Main activity

2010-04-02 Thread Lance Nanek
If you are using an older version of Android then it could be this bug, which has an easy workaround: http://groups.google.com/group/android-developers/browse_thread/thread/d3c076e7a0165e64/f553df5324bf5da4 On Mar 31, 4:58 pm, Will w.rou...@gmail.com wrote: I resolved it calling my access

[android-developers] Re: Setting screens size/scale on big screen devices

2010-03-23 Thread Lance Nanek
One thing to check when seeing unexpectedly small screen sizes is to make sure you aren't in compatibility mode: For instance, suppose a given device is using a WVGA high-denisty screen, which is 480x800 and about the same size as a traditional HVGA screen, but it's running an app that states

[android-developers] Re: Dismissing Custom Dialog

2010-03-19 Thread Lance Nanek
Call the setOnClickListener method on the Button instance that you got from findViewById, just like you do for the TextView. Both classes subclass View, so they both have that method. Inside the method you call dismissDialog, which is available via the enclosing Activity, just like you call

[android-developers] Re: AnyBody to test My Application on Droid,N1.

2010-03-19 Thread Lance Nanek
Runs without crashing on my Droid in the US. There's a Toast popup about an ad not being ready. Doesn't seem like anything a user would care about. Maybe it's just accidentally left in from development. On Mar 19, 1:17 pm, Abdul Mateen abmat...@gmail.com wrote: Hi and Asslam-u-Alikum, Any body

[android-developers] Re: Handler is not using seperate Thread

2010-03-17 Thread Lance Nanek
When created by the no argument constructor, a Handler runs on the thread it is created on. You often see a Handler created on the main thread intentionally, like in Mark's example above, so that a second thread can send messages to it that will be acted on in the main thread. This is needed

[android-developers] Re: Custom Dialog

2010-03-17 Thread Lance Nanek
I tried the official issue route of getting someone to do something here: http://code.google.com/p/android/issues/detail?id=5748 You can star/vote it up, I suppose. It's been months, though. Disappointing that such a trivial fix that would help so many people who are starting out isn't being

[android-developers] Re: Help regarding Logging

2010-03-16 Thread Lance Nanek
You can see some example code for reading logs here: http://code.google.com/p/skylight1/source/browse/trunk/SkylightUtils/src/skylight1/util/LoggingExceptionHandler.java#221 On Mar 16, 9:07 am, MobDev developm...@mobilaria.com wrote: Hi, for my application I would like to be able to incorporate

[android-developers] Re: General lag issues with real-time games

2010-03-14 Thread Lance Nanek
One issue that I've run into is that users use controls in unexpected ways. I wrote my first game expecting quick taps next to the player's character. When various people tried out the game, however, they didn't all do that. Some tapped the bottom corners, some held their finger down and moved it

[android-developers] Re: General lag issues with real-time games

2010-03-14 Thread Lance Nanek
neither you nor your users have any control over the GC behavior of someone else's application. Users do have indirect control, however. I often put my phone in airplane mode when testing because it reduces the number of GC events I see in the logs. I assume it is because other processes can't do

[android-developers] Re: General lag issues with real-time games

2010-03-14 Thread Lance Nanek
One thing to watch out for with MediaPlayer is that the format matters a lot. I've seen the G1 go from 60 FPS to 50 FPS just because I added MP4 music, then act fine once I converted it to highly compressed, mono OGG or substituted it with MIDI. I suppose other apps playing music in the background

[android-developers] Re: Vertex Array/Vertex Buffer Objects driver bug on Droid

2010-03-14 Thread Lance Nanek
Doesn't the spec say it has to be 4? From http://www.khronos.org/opengles/sdk/1.1/docs/man/glColorPointer.xml : size Specifies the number of components per color. Must be 4. The initial value is 4. From

[android-developers] Re: General lag issues with real-time games

2010-03-14 Thread Lance Nanek
Here's a good video if you want to pick up the basics Mark: http://code.google.com/events/io/2009/sessions/WritingRealTimeGamesAndroid.html Includes coverage of the GC issue by a Googler. On Mar 14, 11:10 am, Mark Murphy mmur...@commonsware.com wrote: WARNING: this is a rant, because blaming

[android-developers] Re: General lag issues with real-time games

2010-03-14 Thread Lance Nanek
Good point. Some quick trials here do seem to indicate that the GC firing in a different process doesn't stop the world for a game like the GC firing in the game's does. So GC from other processes isn't as bad. Tested on a Droid running Android 2.0.1. A stretch of logged draw requests with

[android-developers] Re: How to use PathClassLoader for files that are not installed.

2010-03-12 Thread Lance Nanek
I saw a thread with people loading APKs via DexClassLoader here: http://stackoverflow.com/questions/1001944/android-remote-code-loading On Mar 12, 7:04 am, Craig O Connor craigoc...@gmail.com wrote: Hi guys, I am using PathClassLoader in my application and can get it to load files that are

[android-developers] Re: Using GPS in a thread

2010-03-12 Thread Lance Nanek
The docs state: The calling thread must be a Looper thread such as the main thread of the calling Activity. http://developer.android.com/intl/de/reference/android/location/LocationManager.html#requestLocationUpdates%28java.lang.String,%20long,%20float,%20android.location.LocationListener%29

[android-developers] Re: Need a Nexus One tester with logcat

2010-03-09 Thread Lance Nanek
I was thinking you could test it on an Android 2.1 emulator device at least, but it force closes due to not finding a sensor. Maybe if you fixed that, just make it show a static view or something when it can't get the sensor, you could at least do a little testing there. Might catch the issue if

[android-developers] Re: Best practice to test what happens when my application is killed

2010-03-09 Thread Lance Nanek
The Dev Tools app on the emulator has an option that might help: http://developer.android.com/intl/zh-CN/guide/developing/debug-tasks.html Immediately destroy activities Tells the system to destroy an activity as soon as it is stopped (as if Android had to reclaim memory). This is very

[android-developers] Re: Windows Phone and XNA. Nightmare is real. What we do with that ?

2010-03-09 Thread Lance Nanek
It allows you to develop your games mostly on the desktop and deploying it to your Android device Neat project. Have you seen this one for the same purpose? http://code.google.com/p/skorpios/ Might be neat to cooperate or share techniques or something. On Mar 9, 7:11 pm, Mario Zechner

[android-developers] Re: Small screen devices cannot see my app even declared already in the manifest

2010-03-08 Thread Lance Nanek
Are you using the camera permission? If so you need to indicate that you don't need autofocus as per this page: http://developer.android.com/guide/topics/manifest/uses-feature-element.html On Mar 8, 10:10 pm, brian karlo gutierrez brikz...@yahoo.com wrote: Hello everyone,     I have this

[android-developers] Re: About using Hierarchy Viewer

2010-03-07 Thread Lance Nanek
http://groups.google.com/group/android-developers/msg/2dbd4dcf7280607b On Mar 7, 6:13 am, Mycall ahndr...@naver.com wrote: Hi all. When I was using Hierarchy Viewer to check views of basic emulator, there was no problem and I can normally find all views in the emulator. But when I was

[android-developers] Re: Complex tab indicators

2010-03-07 Thread Lance Nanek
Isn't that just done by specifying different values for different states? Just like you would for a custom button? Doesn't look very difficult in the source:

[android-developers] Re: About using Hierarchy Viewer

2010-03-07 Thread Lance Nanek
not work with production devices. It is due to build mode like build - user.? Do you have any idea.? HierarchyViewer does not work with production devices. If adb shell getprop ro.secure prints out 1, then HierarchyViewer cannot be used. Thanks Mycall. On 3월8일, 오전2시31분, Lance Nanek lna

[android-developers] Re: How do I start and stop GPS through program to save power?

2010-03-06 Thread Lance Nanek
Apps can't change that setting any more in recent versions of Android. Well they still can in some rare circumstances, I think, like some rooted phones. In recent versions of Android just passing a large value for the minTime parameter of the LocationManager#requestLocationUpdates will do what

[android-developers] Re: Activities in Android 2.1

2010-03-03 Thread Lance Nanek
You can use a level 4 or higher build target, so that you can use the new attributes, but still set minSdkVersion to 3 and run on older phones. You do have to be careful not to use new methods on the older phones, however. This is generally done via reflection, or checking values like

[android-developers] Re: how to use include tag

2010-03-03 Thread Lance Nanek
Use Activity#findViewById to get a view far enough down the hierarchy that there aren't any duplicate IDs below it, then use View#findViewById. On Mar 3, 10:54 am, mike chinnu.thelear...@gmail.com wrote: following is the layout xml file. here i used include tag. in that the

[android-developers] Re: Which Android firmware versions should a developer try to support?

2010-03-01 Thread Lance Nanek
There's a percentage, at least: http://developer.android.com/intl/zh-CN/resources/dashboard/platform-versions.html On Mar 1, 12:50 pm, Richard richard.mcclel...@gmail.com wrote: I am working on an Android application that I would like to work on a reasonable number of devices.  Currently my

[android-developers] Re: Remove default margin inside WebView

2010-02-24 Thread Lance Nanek
Setting the margin/padding to zero seems to take care of it here: String html = htmlheadstyle* {margin:0;padding:0;}/style/ headbodydiv style='border:1px #000 solid;width:240px;height: 200px;'/Test/div/body/html; On Feb 24, 4:14 am, Carl Whalley carl.whal...@googlemail.com wrote: There seems to

[android-developers] Re: Layout and minsdkversion issue

2010-02-22 Thread Lance Nanek
A low min SDK with no target SDK setting can result in your application being run in compatibility mode re things like screen size: http://developer.android.com/intl/fr/guide/practices/screens_support.html On Feb 22, 4:41 pm, nikhil nik...@gmail.com wrote: I developed this app with minsdkversion

[android-developers] Re: Help?

2010-02-21 Thread Lance Nanek
You might want to try calling System.gc() manually somewhere in there, like in onCreate. It has worked for me in the past to avoid that exception when recreating heavy weight activities. It's kind of an ugly hack, though. The call is documented as not even guaranteed to do anything. Also, you

[android-developers] Re: problem with LocationManager

2010-02-21 Thread Lance Nanek
The exception shown in logcat after the crash will tell you more information about why your app is crashing. If you are trying to use a system service before onCreate, for example, it will let you know, etc.. One way to get to logcat is to go to Logcat view in the DDMS Perspective in Eclipse. On

[android-developers] Re: can't display OpenGL and Camera together on nexus one/Milestone whereas it works fine on HTC Magic

2010-02-17 Thread Lance Nanek
Have you tried the setZOrderMediaOverlay method mentioned in the previous threads about this? http://groups.google.com/group/android-developers/msg/2123d7174c70cfa6 On Feb 16, 8:33 pm, Balbouch yorick.mazi...@gmail.com wrote: Hello, Most of you would think it's this question again... Well, my

[android-developers] Re: where can I download the driver for nexus one?

2010-02-17 Thread Lance Nanek
You can get the updated driver from inside Eclipse by going to the Window menu, then choosing Android SDK and AVD Manager, then Available Packages, and installing the update. It gets downloaded to the usb_driver directory under the directory where you installed the SDK. There are details for

[android-developers] Re: triggering onCreate with a non-null Bundle (or onRestoreInstanceState) from the emulator

2010-02-16 Thread Lance Nanek
http://developer.android.com/intl/fr/guide/developing/debug-tasks.html Immediately destroy activities Tells the system to destroy an activity as soon as it is stopped (as if Android had to reclaim memory). This is very useful for testing the onSaveInstanceState(Bundle) /

[android-developers] Re: Live Wallpaper --OpenGL Help/Advice.

2010-02-14 Thread Lance Nanek
http://groups.google.com/group/android-developers/browse_thread/thread/9677b73c0b571f5a/20b06ff6e135adec On Feb 14, 3:06 am, joshbeck josh.beck2...@gmail.com wrote: Hello all, I can construct an Activity that utilized OpenGL to draw a square, set properties, and make it rotate around a fixed

[android-developers] Re: Live Wallpaper --OpenGL Help/Advice.

2010-02-14 Thread Lance Nanek
public GLSurfaceView mGLSurfaceView; ... mGLSurfaceView = new GLSurfaceView(this); ... mGLSurfaceView = new GLSurfaceView(MyLiveWallpaper.this); Remove the lines above. Any use of GLSurfaceView in this is wrong. public Engine onCreateEngine() { return new GLEngine(); } You are supposed to

[android-developers] Re: Broken Meshes / not synchronous while rendering GlSurfaceView

2010-02-13 Thread Lance Nanek
simply change the bytebuffers in an OnDraw call where it gets used by a native render call? On 13 Feb., 07:24, Lance Nanek lna...@gmail.com wrote: I haven't run into anything like that myself. I do often run into issues that can cause the data to be incorrectly offset or otherwise messed

[android-developers] Re: Multitouch seems badly broken on Nexus One 2.1-update1

2010-02-13 Thread Lance Nanek
A more capable multitouch screen probably costs more. If that is the case, it isn't really surprising that multiple manufacturers would go with a cheaper, less capable one. On Feb 13, 6:51 pm, Kevin Duffey andjar...@gmail.com wrote: So Robert.. is this a platform issue in your mind.. being that

[android-developers] Re: Broken Meshes / not synchronous while rendering GlSurfaceView

2010-02-12 Thread Lance Nanek
I haven't run into anything like that myself. I do often run into issues that can cause the data to be incorrectly offset or otherwise messed up, however, which might look similar. The position of the buffer is important when you call glVertexPointer, for example. So if the way you filled the

[android-developers] Re: android and proguard...

2010-02-11 Thread Lance Nanek
Class names referenced in the manifest and other XML files are probably what most of those -keep public class * extends android.app.Activity like configuration lines are for in the various examples of using ProGuard with Android out there:

[android-developers] Re: accelerometer driver example?

2010-02-09 Thread Lance Nanek
This mentions the accelerometer: http://pdk.android.com/online-pdk/guide/sensors.html On Feb 9, 2:48 pm, Robin Getz rg...@blackfin.uclinux.org wrote: On Fri 5 Feb 2010 11:45, Robin Getz pondered: Where is an example of an accelerometer driver that properly connects to the android sensor

[android-developers] Re: System.out.println(...) statements within the onCreate

2010-02-09 Thread Lance Nanek
Use the Log class instead: http://developer.android.com/intl/zh-CN/reference/android/util/Log.html And view the output in Logcat in Eclipse by the menus: Window - Show View - Other - Android - Logcat On Feb 8, 10:37 pm, eehksar eehk...@gmail.com wrote: Hi All, Am a newbie... could anyone

[android-developers] Re: Dialog problem

2010-02-09 Thread Lance Nanek
More stars/occurrences on the bug report welcome: http://code.google.com/p/android/issues/detail?id=5748 On Feb 9, 6:05 pm, Bob Kerns r...@acm.org wrote: The four stages of Android UI Enlightenment: 0) You dutifully use getApplicationContext() his Activity to pass along to the SDK. 1) You

[android-developers] Re: Vertex arrays vs. VBOs

2010-02-03 Thread Lance Nanek
Robert Green has mentioned VBOs being fast for his uses a couple times on this list, I think. Might be worth searching those posts out. Not actual usage, but I saw them mentioned in some docs recently. It's for a newer version of OpenGL ES, but this ImgTec document recommends VBOs, for example:

[android-developers] Re: Why are my SharedPreferences suddenly deleted, after I updated my game in the Market?

2010-02-03 Thread Lance Nanek
Did you change/add a sharedUserId in your manifest? On Feb 3, 3:40 am, Martin google-gro...@digle.de wrote: Hi! Why are my SharedPreferences suddenly deleted, after I updated my game in the Market? Here is the logcat: W/ApplicationContext( 1465): Attempt to read preferences file /data/

[android-developers] Re: Cant find the solution for this GLSurfaceView error

2010-02-03 Thread Lance Nanek
The buffer needs to be direct so that it isn't moved around in memory. You can do this by creating it using ByteBuffer.allocateDirect. You can see examples in demos: http://developer.android.com/intl/de/resources/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.html On Feb

[android-developers] Re: No visual feedback for preference defaults - bug or feature?

2010-02-03 Thread Lance Nanek
You could try setting the defaults with a method like PreferenceManager#setDefaultValues. On Feb 3, 1:51 pm, OldSkoolMark m...@sublimeslime.com wrote: What are the display semantics for displaying preference defaults? I have been expecting that the first time the app is run, that when the

[android-developers] Re: DDMS GPS doesn't work: Send -120,35 loc = lm.getLastKnownLocation() returns null

2010-02-02 Thread Lance Nanek
Is the GPS provider running? If nothing has called one of the LocationManager#requestLocationUpdates methods, which can start the GPS provider, then LocationManager#getLastKnownLocation will return null. The getLastKnownLocation method does not start the provider. It returns null if the provider

[android-developers] Re: OpenGL poor performance with textures?

2010-02-01 Thread Lance Nanek
. Thanks, Federico On Feb 1, 12:52 am, Lance Nanek lna...@gmail.com wrote: If the final is only a non-transparent background and a couple sprites, you may actually get it to perform slightly better than the benchmark, not worse. The benchmark has a lot of extra stuff getting

[android-developers] Re: Discover resources?

2010-02-01 Thread Lance Nanek
Weird, I dropped a settings.xml in res/xml in a quick test project and R.xml.class.getDeclaredFields() worked just fine. I tried running from Eclipse and also exporting to an APK, installing, and running that - both worked. Tested on an Android 1.6 G1 phone and an Android 2.1 emulator. Maybe there

[android-developers] Re: Simple LinearLayout Question

2010-01-31 Thread Lance Nanek
The weight controls how the remaining space is used after the sizes are taken into account. That's why you often see width/height set to zero where weight is used. On Jan 31, 3:49 am, scastria scastria...@gmail.com wrote: Maybe I am missing something here: I have a simple horizontal

[android-developers] Re: OpenGL poor performance with textures?

2010-01-31 Thread Lance Nanek
I don't have a Droid to test on, but if you haven't tried it already, it might be worth dropping the various texture settings down to their fastest/lowest quality and enabling mipmaps to check if that's where the problem is. Something like this: gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,

[android-developers] Re: App Signing and the Android Market

2010-01-29 Thread Lance Nanek
Maybe the first app just left the Just In listing in the Market around that time? On Jan 29, 11:48 am, Open ldonel...@gmail.com wrote: I have two paid apps in the Android market.  My first app was selling a few units per day, I recently uploaded my second app.  Both apps were signed with the

[android-developers] Re: string to uppercase not working

2010-01-28 Thread Lance Nanek
Strings are immutable in Java and cannot be changed. The toUpperCase method returns a different String than it is passed. The String it returns is upper case. The original stays unchanged. On Jan 28, 2:49 am, android beginner android.beginne...@gmail.com wrote: Hi, The following is the code

[android-developers] Re: Why is HTC Hero using drawable-ldpi?

2010-01-28 Thread Lance Nanek
The new density specifiers are for Android 1.6 up. You need to hide them from Android 1.5 by using version specifiers. Example: drawable- ldpi-v4. On Jan 28, 2:06 pm, westmeadboy westmead...@yahoo.co.uk wrote: Here is a summary of my manifest:     uses-sdk android:minSdkVersion=3

[android-developers] Re: android milestone text size small

2010-01-27 Thread Lance Nanek
Isn't there some sort of density calculation bug that results in small text sizes on the Droid? Maybe you're running into the same thing on the Milestone? On Jan 27, 6:40 am, extrapedestrian extra.pedestr...@gmail.com wrote: I defined it in pt. It should be bound to size of inch. On Jan 27,

[android-developers] Re: OpenGL Fillrate Issues

2010-01-27 Thread Lance Nanek
Someone in one of the past threads on this issue mentioned that overriding dispatchTouchEvent on Activity performs better than onTouchEvent on a View. It might be worth testing that if you guys are writing benchmarks anyway. On Jan 27, 5:56 pm, Ralf Schneider li...@gestaltgeber.com wrote:

[android-developers] Re: Archos Approval on an app

2010-01-27 Thread Lance Nanek
That worked fine for me. I'm in the US running Firefox 3.5.7 on Ubuntu 9.10. It looks like the OK button for the Discount Code area of the form uses JavaScript. So one thing that might be worth checking is that you have that enabled. On Jan 27, 7:22 pm, Andrei gml...@gmail.com wrote: i got the

Re: Fwd: [android-developers] androidmarket search

2010-01-25 Thread Lance Nanek
http://developer.android.com/intl/de/guide/publishing/publishing.html#marketintent On Jan 25, 6:23 pm, David Toledo dtole...@gmail.com wrote: Hi I need is redirect to androidmarket and find some my application. I found one android application similar. thanks David -- Forwarded

[android-developers] Re: OpenGL ES

2010-01-22 Thread Lance Nanek
They aren't Android specific, but the Sun and Khronos sites have documentation on that method: http://java.sun.com/javame/reference/apis/jsr239/javax/microedition/khronos/opengles/GL10.html#glDrawElements%28int,%20int,%20int,%20java.nio.Buffer%29

[android-developers] Re: OpenGL ES

2010-01-22 Thread Lance Nanek
Donald gdon...@gmail.com wrote: On Fri, Jan 22, 2010 at 1:25 PM, Lance Nanek lna...@gmail.com wrote: http://khronos.org/opengles/documentation/opengles1_0/html/glDrawElem... Ok, so the Kronos API docs have the fourth parameter glDrawElements() as a void pointer, and then the Android SDK has

[android-developers] Re: Android 2.1 bug: uses res/layout-v3 instead of res/layout

2010-01-21 Thread Lance Nanek
The documentation states that version qualifiers are for that version and higher, not just that version: http://developer.android.com/guide/practices/screens_support.html#qualifiers Resources that are for use only on a specific API Level or higher. For example, if your application is designed

[android-developers] Re: cocos2d for Android updated: Please help test on real phone.

2010-01-20 Thread Lance Nanek
I tested out the debug build from the site on my G1 phone running the OTA Android 1.6 firmware: http://cocos2d-android.googlecode.com/files/Cocos2D-debug.apk AtlasSpriteTest, AtlasTest, ClickAndMoveTest, CocosNodeTest, MenuTest, MotionStreakTest, SceneTest, SpritesTest showed white squares where

[android-developers] Re: Layout issues for multiple screen sizes and API versions

2010-01-19 Thread Lance Nanek
You might be running into the Android 2.0.0 bug where it only matches the -v6 specifier: http://groups.google.com/group/android-developers/msg/315ce9b9dde1161a On Jan 19, 8:13 am, snowy_tracks marclidd...@gmail.com wrote: I am currently trying to make my app compliant with all screen sizes /

[android-developers] Re: Audio Output Analysis

2010-01-19 Thread Lance Nanek
I've seen the Tricorder app showing wave forms before: http://code.google.com/p/moonblink/wiki/Tricorder On Jan 17, 4:50 pm, Dan Bjorge brosm...@gmail.com wrote: I was playing around with some of the live wallpapers and thought it'd be neat to try to make something like the frequency/waveform

[android-developers] Re: how to make two apks install at the same place

2010-01-17 Thread Lance Nanek
The one time I needed shareUserId for something this bug scared me out of using it: http://code.google.com/p/android/issues/detail?id=2773 Android 1.5 is still 31% of the market, unfortunately: http://developer.android.com/resources/dashboard/platform-versions.html On Jan 17, 8:27 am,

[android-developers] Re: Definition of SensorEvent rotation angles

2010-01-16 Thread Lance Nanek
Do you have a phone? Just log the values and look at them as you move the phone. There are also several apps on the market that will show you the raw sensor data. On Jan 16, 3:16 pm, Peter Eastman peter.east...@gmail.com wrote: I'm trying to figure out exactly how to interpret the rotation

[android-developers] Re: Motorola Droid (possible android) multi-touch bug and how to reproduce

2010-01-15 Thread Lance Nanek
Have you created on official issue for it at http://b.android.com/ ? On Jan 15, 11:09 am, Mirmathrax mirmath...@gmail.com wrote: Multi-touch API is bugged (at least on Motorola Droid). Here is a method to reproduce the error for analysis: 1)  Create a new android project in Eclipse with the

[android-developers] Re: icon in Droid is badly scaled

2010-01-14 Thread Lance Nanek
You can use the hdpi qualifier on a resource directory to provide a higher resolution version for the Droid that it won't try to scale. If your image is currently in res/drawable, for example, you can put a high resolution version of it in res/drawable-hdpi-v4. The normal drawable folder is

[android-developers] Re: Time keeping in a game thread

2010-01-14 Thread Lance Nanek
http://developer.android.com/reference/android/os/SystemClock.html On Jan 14, 8:02 am, Neilz neilhorn...@googlemail.com wrote: Hi all. What is most efficient way of keeping a check on time within a game thread? Currently I create a new Date() when the game starts, and was thinking of

[android-developers] Re: Activity library

2010-01-13 Thread Lance Nanek
Your Activity subclass was probably in the same Eclipse project as it was used in, Brion. It sounds like the OP wants the subclass to be in a different project. In Eclipse you can have an Android project depend on other Java projects. The classes get packaged in. If you have an Android project

[android-developers] Re: Dotted line in 2D graphics API

2010-01-13 Thread Lance Nanek
Never tried them before, but these might do it: http://developer.android.com/intl/fr/reference/android/graphics/DashPathEffect.html http://developer.android.com/intl/fr/reference/android/graphics/Paint.html#setPathEffect%28android.graphics.PathEffect%29 On Jan 13, 4:21 pm, Matt Oakes

[android-developers] Re: getDrawable() Resourses$NotFoundException

2010-01-13 Thread Lance Nanek
I don't see any field named target in android.R.drawable. Are you sure there is a system drawable resource with that name? If you are using your own package's R class, then you should be using your activity's resources. They are available via getResources() on the activity. Resources.getSystem()

[android-developers] Re: getDrawable() Resourses$NotFoundException

2010-01-13 Thread Lance Nanek
wrote: OK.  I'm not in an Activity though, I'm in the overlay class. You can't call getResources() from there.  Also, I printed the resource id to the log to verify that there is an actual value there.  It matches the one in the R file. On Jan 13, 9:47 pm, Lance Nanek lna...@gmail.com wrote

[android-developers] Re: Suggestion: Math floating point library for Android

2010-01-12 Thread Lance Nanek
There are a couple methods that have been changed to take float instead of double here: http://developer.android.com/intl/fr/reference/android/util/FloatMath.html I've actually been doing my trig and other complex calculations using fixed point integers myself. You can find a lot of

[android-developers] Interleaved buffer in OpenGL incompatible with GLLogWrapper?

2010-01-11 Thread Lance Nanek
I'm getting exceptions when I try to use an interleaved buffer in OpenGL with android.opengl.GLLogWrapper. Has anyone else run into this? Everything works fine if I disable GLLogWrapper by removing this line: mGLSurfaceView.setDebugFlags(GLSurfaceView.DEBUG_CHECK_GL_ERROR |

[android-developers] Re: Finding direction using compass

2010-01-11 Thread Lance Nanek
http://developer.android.com/intl/fr/reference/android/hardware/Sensor.html#TYPE_ORIENTATION On Jan 11, 9:57 am, Avanish avani...@gmail.com wrote: Hi all, I need to know if there is an interface to access the direction in which the phone is pointing. Thanks Avanish -- You received this

[android-developers] Re: Continuously update trackball coordinates

2010-01-10 Thread Lance Nanek
Each trackball event represents a little bit of movement, possibly part of a longer continuous movement by the user. They are not added up for you. You can see some neat code for collecting trackball movement from unhandled trackball events and converting it into d-pad presses in Android's

[android-developers] Re: apk is being downloaded as zip file in IE

2010-01-10 Thread Lance Nanek
This is something that your web server includes when the file is downloaded. If you are just serving the file out of a directory via Apache web server, then one way you could set it is to add this line to a .htaccess file in the same directory: AddType application/vnd.android.package-archive apk

[android-developers] Re: Multiple versions of app with different package names

2010-01-08 Thread Lance Nanek
I managed to do it without updating the imports, but it is pretty nasty besides that. I have two projects, lets call them A and B. All the directories in project B are actually just SVN externals that reference the directories of project A: http://svnbook.red-bean.com/en/1.0/ch07s03.html

[android-developers] Re: Designing a UI for Board Game

2010-01-05 Thread Lance Nanek
One way to do it is to have the game pieces be Drawable instances. Those can be positioned using the setBounds method: http://developer.android.com/intl/zh-TW/reference/android/graphics/drawable/Drawable.html#setBounds%28android.graphics.Rect%29 And drawn to a Canvas using the draw method:

[android-developers] Re: Android Books?...

2010-01-05 Thread Lance Nanek
Pro Android Games, published by Apress, came out recently and might make a good addition for that list: http://apress.com/book/view/1430226471 I haven't tried it, however. Well, except for going through the free source code, anyway. On Jan 5, 9:09 pm, Mark Murphy mmur...@commonsware.com wrote:

[android-developers] Re: What does targetSdkVersion do?

2010-01-05 Thread Lance Nanek
Can change defaults for supports-screens. Can also disable compatibility features, like reporting a smaller size than the actual display and scaling your app up. See: http://developer.android.com/intl/zh-TW/guide/practices/screens_support.html On Jan 5, 9:15 pm, Matt Kanninen

[android-developers] Re: ERROR: Application requires API version 6. Device API version is 5 (Android 2.0)

2010-01-04 Thread Lance Nanek
Is there anything else where I have to make the change API 4 - 3 other than the project properties? Yes, the uses-sdk element in AndroidManifest.xml: http://developer.android.com/intl/zh-TW/guide/topics/manifest/uses-sdk-element.html Changing the build target in the project properties doesn't

[android-developers] Re: Reliable GPS location

2010-01-04 Thread Lance Nanek
You can call Location#getTime to see when the fix returned by LocationManager#getLastKnownLocation was taken. The getLastKnownLocation method doesn't start the GPS, so the fix may be from a long time ago, and not be a good indicator of the current location. The accuracy of the fix refers to the

[android-developers] Re: ListActivity not updating on Database update.

2010-01-04 Thread Lance Nanek
Have you tried calling requery on the underlying Cursor? On Jan 4, 8:00 pm, mac-systems jens.h...@gmx.de wrote: Hello, i update a value in my Database in a Listview using a Context Menu. The code so far seems to be ok. But everything i try to make the update visible in the View failed.

[android-developers] Re: Query on releasing to sony app store

2010-01-02 Thread Lance Nanek
Build.MANUFACTURER is only available on Android 1.6 up. You can use reflection or check against the SDK level before using a class that accesses it, however. On Jan 2, 12:04 pm, karthikr karthik.scintill...@gmail.com wrote: I am getting an VerifyError on trying to access

[android-developers] Re: Is there any issues bugs or upgrade to Android kernal?

2010-01-02 Thread Lance Nanek
If it has to be something kernel related you might be better off asking in other groups: http://groups.google.com/group/android-platform http://groups.google.com/group/android-kernel If just framework related is OK, I can recall some comments re zipalign and large resource support:

[android-developers] Re: How to keep GPS active until more accurate location is provided?

2010-01-02 Thread Lance Nanek
Wouldn't you just register for updates with a shorter minTime parameter and then remove that one when you want to go back to the longer one? I've never tried it with intents, but it works fine with listeners: http://groups.google.com/group/android-developers/msg/7c1856b30811e7e8 On Jan 2, 8:43 

[android-developers] Re: Android drivers programming

2009-12-31 Thread Lance Nanek
http://pdk.android.com/online-pdk/guide/index.html On Dec 31, 2:58 pm, ikram engr.ik...@gmail.com wrote: Dear all, Could you kindly let me know Android drivers programming links or helping material? Thanks and best wishes, Ikram -- You received this message because you are subscribed to

[android-developers] Re: startActivityForResult question

2009-12-31 Thread Lance Nanek
Those methods only have meaning to Android on Activity classes, not View classes. If you have a custom view that needs to know when startActivityForResult is being run on the activity that manages the view, then you would have to override the startActivityForResult method on that activity, call a

[android-developers] Re: Android drivers programming

2009-12-31 Thread Lance Nanek
It came up in a Google search one day when I was looking into a USB issue. It doesn't seem related to application development with the SDK, so I can see why it isn't linked from areas with just that in mind at least. On Dec 31, 4:45 pm, Mark Murphy mmur...@commonsware.com wrote: Lance Nanek

[android-developers] Re: When the new activity starts, the data of previous activity is gone.

2009-12-30 Thread Lance Nanek
http://developer.android.com/guide/appendix/faq/framework.html#3 On Dec 30, 7:49 am, android09 pranav.jaja...@gmail.com wrote: Hi, I am developing an application in which the user require to register first and than got the user page. For that i have made layout and the layout consist many

[android-developers] Re: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Lance Nanek
Fixed point can still fit a good 30 seconds or so worth of whole milliseconds, can't it? Are you ever going to have updates more than 30 seconds apart? Even if you are, you can just convert to seconds. Use the integer representing portion of the fixed point from 116 up for whole seconds. Use the

[android-developers] Re: Texture compression

2009-12-27 Thread Lance Nanek
Hmm, the OpenGL ES 1.0 spec says OES_compressed_paletted_texture is a required extension in both Common and Common-Lite profiles: https://www.khronos.org/registry/gles/specs/1.0/opengles_spec_1_0.pdf Looks like the method/constants are there too:

[android-developers] Re: Droid AVD (2.0, WVGA854) resolution hell

2009-12-23 Thread Lance Nanek
will 1.6-2.0.1 know that it has to touch the nodpi folder and not the original drawable folder? It seems to me that it is not possible to support 1.5-2.0.1 in native resolution in one app version. Do you still think it is possible? Thank you for your time! On Dec 23, 6:33 am, Lance Nanek

[android-developers] Re: onActivityResult is called immediately after startActivityForResult

2009-12-23 Thread Lance Nanek
I've seen onActivityResult get called immediately once before as well. The activity getting started by startActivityForResult had launchMode set to singleTask in the manifest. There was a message in the logs from the ActivityManager saying: Activity is launching as a new task, so cancelling

[android-developers] Re: Droid AVD (2.0, WVGA854) resolution hell

2009-12-23 Thread Lance Nanek
Re the version qualifiers: Here is an example. If you want to force Android 1.5 to never select the drawable-nodpi folder, then you have to actually name it drawable- nodpi-v4 or some other higher version qualifier. Older versions of Android understand version qualifiers even if they don't

[android-developers] Re: Droid AVD (2.0, WVGA854) resolution hell

2009-12-23 Thread Lance Nanek
I actually tested that and hdpi Android 1.6 (and on, presumably) AVDs scaled up drawables from the drawable folder rather than using unscaled ones from drawable-nodpi when they were in both folders. On Dec 23, 1:57 pm, Streets Of Boston flyingdutc...@gmail.com wrote: What about putting the same

<    1   2   3   4   5   >