[android-developers] Can I update an apk over the air programatically ?

2010-01-19 Thread TAKEphONE
Hi,

I have an application I wrote for Android (lat's call it MyMainApp).

My contractor wants me to write another utility (service) to
periodically check his website for newer versions of MyMainApp, and if
there is one - download it and install.

I know this is handled by the Market app, but my contractor wants to
do it in his own utility (he does not want the user to be bothered
with the update process).

Of course - the user will be notified and agree to this feature.

Can this be done ?

TIA
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: How to increase FPS (now ~20, desired ~40-50)

2010-01-19 Thread Kevin Duffey
Was just watching the video from back in May by Chris Pruett. He had a
performance slide comparing canvas to opengl and as he noted there, canvas
is much slower. I am sure you know this, but getting 30fps on a Canvas with
more than a dozen or so sprites might be difficult when you factor in game
logic, collision detections, etc. I didn't realize you were running this on
the emulator as well. For sure you'll see much faster fps on a real device.

On Tue, Jan 19, 2010 at 10:55 PM, Dan Sherman  wrote:

> > I run my app on emulator, and currently have
> > not tested it on real device.
>
> The emulator is not, in any way, going to run the same speed as a real
> device.
>
> Run it on a real device and see what FPS you get.  Or if you want, publish
> an APK and someone here will run it I'm sure (I'll do it =P)
>
> - Dan
>
> On Wed, Jan 20, 2010 at 1:44 AM, Andre  wrote:
>
>> Hi,
>>
>> Yesterday, I've changed my code, to work with the matrix more
>> effectively...
>>
>> My GameEntity class now looks like this:
>>
>> --GAME ENTITY--
>>
>> public class GameEntity {
>>public Bitmap mBitmap;
>>private Rect mBounds;
>>private Matrix mMatrix;
>>public int mWidth;
>>public int mHeight;
>>public boolean mAlive;
>>public float mX, mY;
>>public float mVelocityX, mVelocityY;
>>public float mMoveAngle, mFaceAngle;
>>public float mRotationVelocity;
>>
>>public GameEntity(Bitmap bitmap) {
>>mBitmap = bitmap;
>>mBounds = new Rect();
>>mMatrix = new Matrix();
>>mWidth = bitmap.getWidth();
>>mHeight = bitmap.getHeight();
>>mAlive = false;
>>mX = 0.0f;
>>mY = 0.0f;
>>mVelocityX = 0.0f;
>>mVelocityY = 0.0f;
>>mMoveAngle = 0.0f;
>>mFaceAngle = 0.0f;
>>mRotationVelocity = 0.0f;
>>}
>>
>>public void draw(Canvas canvas, float angle) {
>>Matrix m = mMatrix;
>>m.reset();
>>m.postTranslate(mX - mWidth / 2, mY - mHeight / 2);
>>m.postRotate(angle, mX, mY);
>>canvas.drawBitmap(mBitmap, m, null);
>>}
>>
>> public Rect getBounds() {
>>mBounds.left = (int)(mX - mWidth / 2);
>>mBounds.top = (int)(mY - mHeight / 2);
>>mBounds.right = (int)(mX + mWidth / 2);
>>mBounds.bottom = (int)(mY + mHeight / 2);
>>return mBounds;
>>}
>> }
>>
>> And "draw" methods in GameView class:
>>
>> --GAME VIEW--
>>
>> private void drawSpaceship(Canvas canvas) {
>> mSpaceship.draw(canvas, mSpaceship.mFaceAngle);
>> }
>>
>> private void drawAsteroids(Canvas canvas) {
>>GameEntity[] asteroids = mAsteroids;
>>GameEntity asteroid;
>>for(int i = 0; i < MAX_ASTEROIDS; i++) {
>>asteroid = asteroids[i];
>> if(asteroid.mAlive) {
>>asteroid.draw(canvas, asteroid.mMoveAngle);
>> }
>>}
>> }
>>
>> private void drawBullets(Canvas canvas) {
>>GameEntity[] bullets = mBullets;
>> GameEntity bullet;
>>for(int i = 0; i < MAX_BULLETS; i++) {
>>bullet = bullets[i];
>>if(bullet.mAlive) {
>>bullet.draw(canvas, bullet.mMoveAngle + 90);
>>}
>>}
>> }
>>
>> This gives me an extra 4-5 FPS, and now I have ~25 FPS.
>> It worth to mention, that I run my app on emulator, and currently have
>> not tested it on real device.
>>
>> I decide to go little further with testing and commented out
>> m.postTranslate() method call, and got +4 FPS, after that I commented
>> out m.postRotate(), and got +12-15 FPS, it seems that rotation (with
>> pivot points) is very costly...
>>
>> Best Regards, Andre
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send e

[android-developers] Re: question about Market

2010-01-19 Thread Seni Sangrujee
I believe the Tattoo is small-class device, did you specify small-
class support in your manifest?


Support for additional screen resolutions and densities in Android
http://android-developers.blogspot.com/2009/10/support-for-additional-screen.html

Devices with small-class screens, however, will only be shown apps
which explicitly declare (via the AndroidManifest) that they will run
properly on small screens. In our studies, we found that "squeezing"
an app designed for a larger screen onto a smaller screen often
produces a bad result. To prevent users with small screens from
getting a bad impression of your app (and reviewing it negatively!),
Android Market makes sure that they can't see it until you upload a
new version that declares itself compatible.



On Jan 19, 9:22 pm, Zhihong GUO  wrote:
> Hi All,
>
> I got two devices, HTC G1 and Tattoo, both running 1.6 ROM. When searching
> "flashcode" in both of Market application on the two devices, only G1 return
> matched applications, while Tattoo can't, why
>
> Thanks,
>
> James
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: How to increase FPS (now ~20, desired ~40-50)

2010-01-19 Thread Dan Sherman
> I run my app on emulator, and currently have
> not tested it on real device.

The emulator is not, in any way, going to run the same speed as a real
device.

Run it on a real device and see what FPS you get.  Or if you want, publish
an APK and someone here will run it I'm sure (I'll do it =P)

- Dan

On Wed, Jan 20, 2010 at 1:44 AM, Andre  wrote:

> Hi,
>
> Yesterday, I've changed my code, to work with the matrix more
> effectively...
>
> My GameEntity class now looks like this:
>
> --GAME ENTITY--
>
> public class GameEntity {
>public Bitmap mBitmap;
>private Rect mBounds;
>private Matrix mMatrix;
>public int mWidth;
>public int mHeight;
>public boolean mAlive;
>public float mX, mY;
>public float mVelocityX, mVelocityY;
>public float mMoveAngle, mFaceAngle;
>public float mRotationVelocity;
>
>public GameEntity(Bitmap bitmap) {
>mBitmap = bitmap;
>mBounds = new Rect();
>mMatrix = new Matrix();
>mWidth = bitmap.getWidth();
>mHeight = bitmap.getHeight();
>mAlive = false;
>mX = 0.0f;
>mY = 0.0f;
>mVelocityX = 0.0f;
>mVelocityY = 0.0f;
>mMoveAngle = 0.0f;
>mFaceAngle = 0.0f;
>mRotationVelocity = 0.0f;
>}
>
>public void draw(Canvas canvas, float angle) {
>Matrix m = mMatrix;
>m.reset();
>m.postTranslate(mX - mWidth / 2, mY - mHeight / 2);
>m.postRotate(angle, mX, mY);
>canvas.drawBitmap(mBitmap, m, null);
>}
>
> public Rect getBounds() {
>mBounds.left = (int)(mX - mWidth / 2);
>mBounds.top = (int)(mY - mHeight / 2);
>mBounds.right = (int)(mX + mWidth / 2);
>mBounds.bottom = (int)(mY + mHeight / 2);
>return mBounds;
>}
> }
>
> And "draw" methods in GameView class:
>
> --GAME VIEW--
>
> private void drawSpaceship(Canvas canvas) {
> mSpaceship.draw(canvas, mSpaceship.mFaceAngle);
> }
>
> private void drawAsteroids(Canvas canvas) {
>GameEntity[] asteroids = mAsteroids;
>GameEntity asteroid;
>for(int i = 0; i < MAX_ASTEROIDS; i++) {
>asteroid = asteroids[i];
> if(asteroid.mAlive) {
>asteroid.draw(canvas, asteroid.mMoveAngle);
> }
>}
> }
>
> private void drawBullets(Canvas canvas) {
>GameEntity[] bullets = mBullets;
> GameEntity bullet;
>for(int i = 0; i < MAX_BULLETS; i++) {
>bullet = bullets[i];
>if(bullet.mAlive) {
>bullet.draw(canvas, bullet.mMoveAngle + 90);
>}
>}
> }
>
> This gives me an extra 4-5 FPS, and now I have ~25 FPS.
> It worth to mention, that I run my app on emulator, and currently have
> not tested it on real device.
>
> I decide to go little further with testing and commented out
> m.postTranslate() method call, and got +4 FPS, after that I commented
> out m.postRotate(), and got +12-15 FPS, it seems that rotation (with
> pivot points) is very costly...
>
> Best Regards, Andre
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to increase FPS (now ~20, desired ~40-50)

2010-01-19 Thread Andre
Hi,

Yesterday, I've changed my code, to work with the matrix more
effectively...

My GameEntity class now looks like this:

--GAME ENTITY--

public class GameEntity {
public Bitmap mBitmap;
private Rect mBounds;
private Matrix mMatrix;
public int mWidth;
public int mHeight;
public boolean mAlive;
public float mX, mY;
public float mVelocityX, mVelocityY;
public float mMoveAngle, mFaceAngle;
public float mRotationVelocity;

public GameEntity(Bitmap bitmap) {
mBitmap = bitmap;
mBounds = new Rect();
mMatrix = new Matrix();
mWidth = bitmap.getWidth();
mHeight = bitmap.getHeight();
mAlive = false;
mX = 0.0f;
mY = 0.0f;
mVelocityX = 0.0f;
mVelocityY = 0.0f;
mMoveAngle = 0.0f;
mFaceAngle = 0.0f;
mRotationVelocity = 0.0f;
}

public void draw(Canvas canvas, float angle) {
Matrix m = mMatrix;
m.reset();
m.postTranslate(mX - mWidth / 2, mY - mHeight / 2);
m.postRotate(angle, mX, mY);
canvas.drawBitmap(mBitmap, m, null);
}

 public Rect getBounds() {
mBounds.left = (int)(mX - mWidth / 2);
mBounds.top = (int)(mY - mHeight / 2);
mBounds.right = (int)(mX + mWidth / 2);
mBounds.bottom = (int)(mY + mHeight / 2);
return mBounds;
}
}

And "draw" methods in GameView class:

--GAME VIEW--

private void drawSpaceship(Canvas canvas) {
mSpaceship.draw(canvas, mSpaceship.mFaceAngle);
}

private void drawAsteroids(Canvas canvas) {
GameEntity[] asteroids = mAsteroids;
GameEntity asteroid;
for(int i = 0; i < MAX_ASTEROIDS; i++) {
asteroid = asteroids[i];
if(asteroid.mAlive) {
asteroid.draw(canvas, asteroid.mMoveAngle);
}
}
}

private void drawBullets(Canvas canvas) {
GameEntity[] bullets = mBullets;
GameEntity bullet;
for(int i = 0; i < MAX_BULLETS; i++) {
bullet = bullets[i];
if(bullet.mAlive) {
bullet.draw(canvas, bullet.mMoveAngle + 90);
}
}
}

This gives me an extra 4-5 FPS, and now I have ~25 FPS.
It worth to mention, that I run my app on emulator, and currently have
not tested it on real device.

I decide to go little further with testing and commented out
m.postTranslate() method call, and got +4 FPS, after that I commented
out m.postRotate(), and got +12-15 FPS, it seems that rotation (with
pivot points) is very costly...

Best Regards, Andre
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Webview - fill out an HTTP Form and submit programatically?

2010-01-19 Thread Kevin Duffey
An alternative approach might be to use HttpClient and submit directly to
the URL the form does, passing in the form attributes with your call and
correct values. You will probably have to look at the page source of the
site you are trying to get into tho.

On Tue, Jan 19, 2010 at 9:55 PM, Maps.Huge.Info (Maps API Guru) <
cor...@gmail.com> wrote:

> When using a webview, you have to realize that it's really a sort of
> dedicated browser object that you have a lot of control over. If you
> want to do a form submission programmatically, just think how you
> would do it in JavaScript, it's the exact same. Reporting the results
> or even initiating such an event can be handled directly in
> JavaScript, through a Java-JavaScript interface or through user input,
> your choice. I suggest reading Mark Murphy's excellent books on
> Android, there's a chapter (or two?) on webview programming that's
> very useful.
>
> http://wares.commonsware.com/
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How enable AVD Camera?

2010-01-19 Thread Jang, Sun-Jin
Hi~ there~

I'm really want Camera Control in AVD.
But I don't know how enable AVD Camera settings.

So, who know it, please teach me.

Thanks~ :-)
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Webview - fill out an HTTP Form and submit programatically?

2010-01-19 Thread Maps.Huge.Info (Maps API Guru)
When using a webview, you have to realize that it's really a sort of
dedicated browser object that you have a lot of control over. If you
want to do a form submission programmatically, just think how you
would do it in JavaScript, it's the exact same. Reporting the results
or even initiating such an event can be handled directly in
JavaScript, through a Java-JavaScript interface or through user input,
your choice. I suggest reading Mark Murphy's excellent books on
Android, there's a chapter (or two?) on webview programming that's
very useful.

http://wares.commonsware.com/

-John Coryat

"Radar Now!"

"What Zip Code?"
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Service within a Thread? Thread within a Service?

2010-01-19 Thread jotobjects
Ouch!  You can't do blocking operations in the event loop thread of
either an Activity or a Service without the component becoming non-
responsive.  You can't send messages to an Activity by broadcasting a
message because an Activity is not a BroadcastReceiver.  You can run
one foreground Activity at a time and many Services at the same time
(theoretically) in a single process.  They all have active event
loops.

On Jan 19, 4:17 pm, Kevin Duffey  wrote:
> Interesting. I've got to read up on services more. I thought when you start
> a service it's a new application that is running along with other background
> apps. Essentially, I thought you'd have the foreground app PLUS a background
> app running. When the foreground app closes, the background keeps on
> running. I also read somewhere where you have the background service start
> when the phone boots by listening for some intent or broadcast message.
> Again I have to refer to Mark Murphy's books.. he explains this really well,
> I just read most of it but haven't practiced it yet so it is escaping me.
>
> If you can start a background service and it polls, then you probably need
> that background service to broadcast a message so that when the foreground
> app is actually in the foreground and running, it can respond to the message
> to get the data. I am not sure (again) how that is accomplished, but that
> should be the basic idea.
>
> On Tue, Jan 19, 2010 at 3:37 PM, Nathan  wrote:
> > I haven't implemented something like yours yet, but I plan to.
>
> > From all I've read, an activity starting a service will launch it on
> > the main thread. That's probably why it seems to lock the UI.
>
> > So what you probably need is a Service that starts an AsyncTask. The
> > service's status could still be accessed by the Activity's main thread
> > while it's open, and the service could potentially live on.
>
> > Nathan
>
> > On Jan 19, 3:23 pm, Flapjack  wrote:
> > > Thanks for the replies. Kevin, what I'm trying to accomplish is
> > > [seemingly] very common in the mobile world:
>
> > > 1) User starts app
> > > 2) App retrieves info from remote server based on the User's
> > > interaction with the app
> > > 3) When app is not in focus (or closed) a background service continues
> > > to retrieve updates from remote server
>
> > > For point number 2), I understand that I could simply use a background
> > > thread (eg. AsyncTask), since the data is to be returned to the
> > > current activity. But for point number 3), a simple background thread
> > > is not appropriate.
>
> > > My question is this: Since I will need to write a service to perform
> > > [much of] the same functionality in point 3) as my background service
> > > will be performing in point 2), wouldn't it just make more sense to
> > > skip the background thread and perform all of my polling through the
> > > service - and simply call that service from within whatever activity
> > > may need it at the time? But that raises another question: calling a
> > > service from an activity seems to lock the UI - so when polling remote
> > > servers, shouldn't the service either be run in a new thread, or
> > > rather, shouldn't the service spawn its own thread?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] hi

2010-01-19 Thread Kevin Duffey
I am watching this now. Pretty kewl. This guy talks really fast tho. :D

On Tue, Jan 19, 2010 at 10:34 AM, Miguel Morales wrote:

> Hey Rakesh,
>
> I have yet to see any good complete tutorials on making an android game.
> I think this is because there is more than one way to make a game in
> android.
> For example, you can make it a flash game and have it run on the
> browser.  Or you can use the Canvas classes provided, which makes
> things like animation, and scene handling.
> But, this is at a price to performance.  I  am writing a 2d game for
> android and I had to put in a good amount of thought as to how to make
> the game before I began.
>
> If you have a real-time/graphic intensive game, I'd recommend using
> openGL ES.   I found this presentation to be extremely helpful:
>
> http://code.google.com/events/io/2009/sessions/WritingRealTimeGamesAndroid.html
>
> It shows a break down of  various methods of drawing to the screen.
>
> I also recommend looking at source code, for example the LunarLander
> sample in the SDK or the Sprite Method Test, mentioned in the
> presentation above.
>
> Miguel.
>
> On Tue, Jan 19, 2010 at 2:47 AM, rakesh rapaka 
> wrote:
> > hi,
> > iam into mobile game development. i have been developing games in j2me.
> now
> > i want to develop for android can anyone suggest best tutorial for
> android
> > game development. where to start and how to start is my big confusion.
> >
> > thanks in advance
> >
> > --
> > rakesh rapaka
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
> >
>
>
>
> --
> http://diastrofunk.com, http://developingthedream.blogspot.com/,
> http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] question about Market

2010-01-19 Thread Zhihong GUO
Hi All,

I got two devices, HTC G1 and Tattoo, both running 1.6 ROM. When searching
"flashcode" in both of Market application on the two devices, only G1 return
matched applications, while Tattoo can't, why

Thanks,

James
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Nexus one reporting 533 as Height!?!

2010-01-19 Thread Jason Arora
You need to include the supports-screens tag and probably the
anyDensity tag.

http://developer.android.com/intl/zh-TW/guide/practices/screens_support.html

On Jan 19, 1:39 pm, "Mark Murphy"  wrote:
> > I'm testing an app on the nexus one at the moment and notice the get
> > height of display function is returning 533 is this some sort of
> > compatibility mode resolution?
>
> Probably, if you don't have  set up.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Table Layout Fixed Header row

2010-01-19 Thread Sonic..

Okay, so I've got this TableLayout, and its full of data - with all of
the rows added programmatically. I've got the TableLayout inside of a
HorizontalScrollView, which in turn is inside a ScrollView - this
gives me scrolling both horizontally and vertically. What I'm trying
to do now is add a header row to it that will not scroll. I've tried
moving things around so that both of my scroll views were actually
inside of the TableLayout and adding the TableRows to the
HorizontalScrollView; my hope was to be able to then add the header
row outside of the scroll views.

The only other thing I can think of is having a second table layout
just for the header row, but getting the columns to line up seems like
it would be difficult, and also moving both the table rows
horizontally simultaneously is not feasible. Any ideas?

Thanks in advance
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Problems for Canadian developers

2010-01-19 Thread ian
Hey Candroid developers:

Now I hope I'm wrong but it appears as an Android developer in Canada
I cannot sell my apps through the |Market, nor can a Canadian customer
purchase my paid apps.

Are these dire concerns valid?

Maybe somebody from the Google mothership could clarify this important
matter as soon as possible.

The Android Market accepted my developer fee of $25 no problem.  And I
don't recall any restrictions mentioned for Canadian developers or for
paid apps in Canada.

I worry that  hundreds of hours of my work may have been wasted.

Like most Canadian Android developers who share these concerns, I am
considering putting my Android development on hold immediately and
perhaps permanently, and porting my apps to iPhone and/or Pre.

Any other Canucks feel the same way?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Workaround for Gallery recycling bug?

2010-01-19 Thread Romain Guy
The easiest thing to do is to create a LRU cache for your images,
using SoftReferences. You can find an example of such a cache in my
app Shelves: code.google.com/p/shelves. I use this technique to load
hundreds of book covers.

On Tue, Jan 19, 2010 at 8:53 PM, Nerdrow  wrote:
> I've read in a few posts that there was an bug in the how the Gallery
> widget recycles views, that it was targeted for Eclair, but it looks
> like it's still an issue.  I'm trying to use an extended Gallery (all
> I do is override getChildStaticTransformation).  The Gallery items are
> all simple custom views that simply draw a FastBitmapDrawable, the
> images are pre-scaled, very lean and very basic.  All items are
> 280x320 jpg's, so not huge individually.
>
> As I scroll through the gallery, I get to the same point each time and
> when I call BitmapFactory.decodeFlie(path) I get the "bitmap size
> exceeds VM budget" error.  I've offset the start point in the list and
> it's not a specific image causing the issue, it's when I've decoded a
> certain number of images from disk.  The other posts indicate that
> it's cumulative; multiple bitmaps are being held in memory instead of
> being recycled, and I assumed this was because the Gallery views
> aren't being recycled properly and hanging on to their bitmaps.  I've
> tried paging the image set to 10-20 images at a time, this works but
> after a few pages I get the same exception.
>
> Is there any workaround for this?  Even if it's addressed in an
> update, it's not really viable to wait since all phones aren't going
> to just instantly upgrade once an upgrade is released (judging by how
> slowly 2.0/2.1 is rolling out).  Without a fix or workaround, the
> Gallery seems pretty much useless for images (unless there's only a
> few).
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Workaround for Gallery recycling bug?

2010-01-19 Thread Nerdrow
I've read in a few posts that there was an bug in the how the Gallery
widget recycles views, that it was targeted for Eclair, but it looks
like it's still an issue.  I'm trying to use an extended Gallery (all
I do is override getChildStaticTransformation).  The Gallery items are
all simple custom views that simply draw a FastBitmapDrawable, the
images are pre-scaled, very lean and very basic.  All items are
280x320 jpg's, so not huge individually.

As I scroll through the gallery, I get to the same point each time and
when I call BitmapFactory.decodeFlie(path) I get the "bitmap size
exceeds VM budget" error.  I've offset the start point in the list and
it's not a specific image causing the issue, it's when I've decoded a
certain number of images from disk.  The other posts indicate that
it's cumulative; multiple bitmaps are being held in memory instead of
being recycled, and I assumed this was because the Gallery views
aren't being recycled properly and hanging on to their bitmaps.  I've
tried paging the image set to 10-20 images at a time, this works but
after a few pages I get the same exception.

Is there any workaround for this?  Even if it's addressed in an
update, it's not really viable to wait since all phones aren't going
to just instantly upgrade once an upgrade is released (judging by how
slowly 2.0/2.1 is rolling out).  Without a fix or workaround, the
Gallery seems pretty much useless for images (unless there's only a
few).

Thanks in advance.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] how to verify whether an application is lauched or not

2010-01-19 Thread pradeep
Hi All,

I have a basic question regarding how to verify whether an application
is lauched or not.

I am running monkey to test stability of phone. I also want to verify
through monkey or any other

tool whether a particular screen like contacts, messages is lauched or
not.

How can I do that. Please suggest if you have any idea.


Regards,
Pradeep
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: adding voice search

2010-01-19 Thread schwiz
yep and here is an example in my open source project let me know if
you have questions
http://code.google.com/p/schwiz-android-apps/source/browse/trunk/WolframQuickLaunch/src/net/schwiz/wolfram/walauncher.java

On Jan 19, 6:01 pm, Achanta  wrote:
> Did you happen to figure this out?
>
> Can someone point to the correct resource or example regarding voice
> search.
>
> Thank you.
>
> On Dec 1 2009, 5:01 pm, schwiz  wrote:
>
>
>
> > I have seen plenty of other apps do this can anyone at all please
> > point me to the documentation for this!!
>
> > On Dec 1, 2:22 pm, schwiz  wrote:
>
> > > bump
>
> > > On Dec 1, 12:53 am, schwiz  wrote:
>
> > > > I want to add avoicesearchbutton to one of my apps but I can't seem
> > > > to find documentation on it anywhere.  Can someone give me an example
> > > > or point me to one?
> > > > Thanks!
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Unable to start download in default android Browser

2010-01-19 Thread schwiz
looks like the link is broken did you try emailing the developer?

On Jan 19, 9:14 am, mariush  wrote:
> Hi,
> I want to download and install widget from page widgets.opera.com,
> i enter to this site:http://widgets.opera.com/general/getopera/3529/1.6/
> and i am trying to download widget by pressing "Get Files Button".
> But instead of starting download, the site is only reloading...
> I`ve checked with wireshark, that serwer gives in response desired
> widget file
> with correct mime type.
> Any ideas why download isn`t started?
> Regards
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Saving the contents of an array

2010-01-19 Thread schwiz
you could use the xmlSerializer class to write an xml file and sax to
read it back in

On Jan 19, 9:23 pm, Charlie Collins  wrote:
> If your array is not too large, I agree with theSmith, using
> SharedPreferences is very easy if you are not sure about how to use
> other data storage approaches. If you store it as a String you could
> then parse it and rebuild the array.
>
> If you have a lot of data, you might want to go ahead and check out
> using a database. Here is a quick database example I wrote recently,
> in case it helps:http://www.screaming-penguin.com/node/7742.
>
> Also, here are some examples of writing and reading to 
> files:http://unlocking-android.googlecode.com/svn/chapter5/trunk/FileStorag
> See "CreateFile" for writing to a file, and "ReadFile" for reading the
> data back. These are a bit simplified, and the process is pretty raw,
> but the concepts are there.
>
> HTH
>
> On Jan 19, 8:25 pm, Jeffrey  wrote:
>
>
>
> > How do I save the contents of an array to a file and then read it
> > again later? I have a small amount of data that will need to be stored
> > and since I have no idea where to start on using a SQLite database, I
> > think this will work a lot better.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Webview - fill out an HTTP Form and submit programatically?

2010-01-19 Thread Mark
Hi there,

I'm trying to automatically sign my application into a website which
uses an http form based authentication.

Is it possible to create a webview and then programatically fill out
the form and submit it, then show the user the result?

Sub-question; is it possible to read the HTML straight out of a
Webview Object?

Regards,
Mark England
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: is AndroidHttpClient deprecated?

2010-01-19 Thread Charlie Collins
Android began including HttpClient 4 around version 1.1 or so. The
org.apache.http package is usually the one you will want for HTTP
(java.net is still available, but that is a much lower level).

http://developer.android.com/reference/org/apache/http/package-summary.html

On Jan 19, 12:26 am, eli  wrote:
> Are most of the classes in android.net.http.* deprecated? There is no
> javadoc except for SslCertificate and SslError but most classes are
> still in the sdk? Can I still use it or java.net.* is the way to go?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Gridview loads in reverse on onConfigurationChanged

2010-01-19 Thread Streets Of Boston
The animation is not necessary to make it happen. It just makes it
really easy to actually see the issue :-)

On Jan 19, 6:06 pm, Mike M  wrote:
> yeah,
> I get the same on Droid 2.0, Although I get it without having
> animation applied to the gridview...
>
> I wish there was a uniform / sequential way that getView() was
> called...
>
> On Jan 18, 5:29 pm, Streets Of Boston  wrote:
>
>
>
> > Hi Roman,
>
> > It does happen. :-)
>
> > I can reproduce it almost every time like this:
> > - Just create an activity with a Grid View with quite a few images (or
> > grid-items) and attach a grid-layout-animator to the grid-view.
> > Configure the grid-view-animator in such a way that you see how the
> > grid-view-items are laid-out. E.g. columns first, rows later.
> > - Create an (empty) sub-activity that can be launched from the one
> > having the grid-view.
>
> > - Start your grid-view's activiy in portrait orientation.
> > - Start your sub-activity.
> > - Rotate your phone into landscape orientation.
> > - Press back to finish the sub-activity.
> >   The grid-view's activity is shown again and...
>
> > ... 9 out of 10 times, i see the grid-view being built up in reverse
> > mode (i'm running on 2.1, Nexus One).
>
> > In my app, the 'getView()' method does not rely on the order in which
> > the 'getView()' is called at all.
>
> > On Jan 18, 2:15 am, Romain Guy  wrote:
>
> > > I have never noticed such an issue. The only way I can think of that
> > > would cause this to happen would be if your adapter relies on the
> > > order of the getView() calls. Note there is absolutely no guarantee
> > > about the order in which getView() will be called (the position
> > > argument will not necessarily be sequential, incrementing or
> > > decrementing.)
>
> > > On Sun, Jan 17, 2010 at 8:57 PM, Mike M  wrote:
> > > > Streets of Boston,
>
> > > > Thanks for the reply.  I do have an animation on my GridView, but I
> > > > took it off and still notice the problem.
>
> > > > Any ideas?
>
> > > > Thanks
>
> > > > On Jan 17, 1:23 pm, Streets Of Boston  wrote:
> > > >> I've seen this too in my app.
>
> > > >> If you add a layout-animation, that animates the grid-view children
> > > >> (i.e. the grid-items), you can clearly see this reverse order.
>
> > > >> On Jan 17, 4:03 am, Mike M  wrote:
>
> > > >> > Hey everyone,
>
> > > >> > I have a gridview of images that I load from the internet.  When the
> > > >> > phone rotates (or some other config change), onConfigurationChanged()
> > > >> > is called.  When that happens, the items in the gridview are reversed
> > > >> > (meaning, the 1st image is the last; they are in reverse order).
>
> > > >> > Does anyone know why this is or how to change it?   I'm hoping 
> > > >> > someone
> > > >> > has run into this before...
>
> > > >> > Sorry if I don't share any code.  I don't think It'd help; it's more
> > > >> > of a conceptual question.
>
> > > >> > Thanks,
>
> > > >> > Mike
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > romain...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them- Hide quoted 
> > > text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to disable user interaction arising from a long press to an EditText

2010-01-19 Thread grace
hi,

add android:longClickable="false" attribute to your  tag in
the layout xml file.
then it will not show any options on long press

On Jan 19, 5:35 pm, MMC2  wrote:
> A long press on an EditText brings up a menu of options that the user
> can select. The only messages or options that I want users of my apps
> to get, I want to come from me via the app. How do you disable this so
> that nothing happens when you long press the EditText? What other
> situations like this should I be aware of?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Saving the contents of an array

2010-01-19 Thread Charlie Collins
If your array is not too large, I agree with theSmith, using
SharedPreferences is very easy if you are not sure about how to use
other data storage approaches. If you store it as a String you could
then parse it and rebuild the array.

If you have a lot of data, you might want to go ahead and check out
using a database. Here is a quick database example I wrote recently,
in case it helps: http://www.screaming-penguin.com/node/7742.

Also, here are some examples of writing and reading to files:
http://unlocking-android.googlecode.com/svn/chapter5/trunk/FileStorage/src/com/msi/manning/chapter5/filestorage/.
See "CreateFile" for writing to a file, and "ReadFile" for reading the
data back. These are a bit simplified, and the process is pretty raw,
but the concepts are there.

HTH


On Jan 19, 8:25 pm, Jeffrey  wrote:
> How do I save the contents of an array to a file and then read it
> again later? I have a small amount of data that will need to be stored
> and since I have no idea where to start on using a SQLite database, I
> think this will work a lot better.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] G1 microphone being Overdriven when trying to use AudioRecord

2010-01-19 Thread Tanmay
Hey guys,
By following an entry on Hashirs Blog on AudioRecorder Class (http://
hashspeaks.wordpress.com/2009/06/18/audiorecord-part-4/), I have made
a project  which should be recording PCM audio for 20 seconds and
storing it in a file on the SD Card.
It seems to be doing its job, executing everything properly, but when
I listen to the audio recorded by my android G1 phone on a raw audio
player, I find that the Microphone has been really over sensitive and
I mainly listen to noise when I am speaking but only from a distance
does it record some audio.

Could someone please test this on their G1, by loading up this simple
program on their Device, recording 20 seconds audio and when the
HelloWorld text appears on the screen..the file can be taken out of
the SD card and played in any simple player which can play raw PCM
data.

Just want to know if this problem is something to do with my project/
phone or I am missing a step...
Or if someone has a working code  to do this, would like to have a
look and learn/

Would appreciate any help with this

Cheers
Tanmay
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Saving the contents of an array

2010-01-19 Thread theSmith
You may want to consider using the shared preferences instead of
writing to a file, its pretty simple to use.
http://developer.android.com/reference/android/content/SharedPreferences.html

-theSmith

On Jan 19, 8:25 pm, Jeffrey  wrote:
> How do I save the contents of an array to a file and then read it
> again later? I have a small amount of data that will need to be stored
> and since I have no idea where to start on using a SQLite database, I
> think this will work a lot better.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Dialog sizing question

2010-01-19 Thread Zsolt Vasvari
I have a pop-up dialog with a handful of views.  When I test it on a
high-res, medium density screen (480x800x160dpi), the dialog is very
small, about half of the available screen width.  I define the layout
as such:


http://schemas.android.com/apk/res/
android"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical"
  android:paddingLeft="5dip"
  android:paddingRight="5dip">

   :
   :



I hoped that by not defining an a particular width, the system would
take care of sizing it to the available screen real estate, and I need
not to worry about the different display metrics.  This doesn't appear
to be the case.  Am I missing something here?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Using the AlarmManager as a timing service.

2010-01-19 Thread Android Development
Yes Mark. The GUI wont be running when the alarm goes off. On receipt
of the alarm, i want to start an activity.

So, i think i will need to use alarm manager as the choice, as i want
the device to wake up when the alarm goes off.

On 1/19/10, Mark Murphy  wrote:
>> Interesting Mark... is there no way to have something wake/start an app up
>> when a condition occurs?
>
> Define "condition". The OP was inquiring about time, which I would not
> call a "condition".
>
>> I was reading the blog on Screebl, it seemed like
>> with the Location support they can activate based on the location or other
>> conditions of the device. I wasn't under the impression that app was
>> running
>> all the time.. or that it might be a service running in the background?
>
> I do not know off the top of my head if and when GPS position changes will
> wake up the device.
>
>> On a slightly different note, if you do run a service all the time, that
>> basically either waits for a timer, or waits for some condition, such as a
>> GPS location, does that drain battery much?
>
> The key to battery life is that you want the phone in sleep mode. Hence,
> depending on how the service is "waiting", it may need to force the device
> to stay awake, which is awful for battery life.
>
> If you are interested in this subject, you really should watch Jeff
> Sharkey's "Coding for Life...Battery Life, That Is" presentation from the
> 2009 Google I/O conference. There's a YouTube video of it out there.
>
>> I've not looked into the
>> Location api, but it sounded like Location would send out a message that a
>> service could listen for.. as if you could say "when the location of this
>> device is 'around' this location.. call me". Something like that?
>
> That certainly exists, but I have not experimented with it recently, let
> alone with the device in sleep mode.
>
> Again, the OP was inquiring about timers, so my reply was focused on timers.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: ATTENTION ANDROID TEAM: Take back control of Android.

2010-01-19 Thread Kevin Duffey
I suppose it's too late, or perhaps too many wouldn't have joined up with
google if they had done this, but it would have been nice if there was a
guarantee from all devices that any app that runs on the emulator will run
on devices. I've read not just in these emails, but on other forums as well
the frustration of developers that get complaints and refunds or negative
feedback because an app doesn't work on one device, but yet it works on
others. It's impossible for developers to test their app on every device. I
sure don't have thousands laying around to buy each device as it comes out
to ensure that it works correctly. The emulator only goes so far and
apparently not nearly far enough since many apps fail on some devices yet
work fine on others. Is it because of device drivers for these devices that
things are failing, or is it their custom build of Android for their device
that is causing things to fail. How do we find out and/or avoid these
issues? Like some said here, some sort of testing facility would be great..
but then I am required to pay air fair to fly to where ever they have one..
or pay a premium for testers to test it on those devices. Since the market
allows for so little text, you can't really say much like "app works on
devices 1,2,3,4..but not 5,6,7 yet". It's really too bad a detailed message
can't be left and updated.. even better a forum like this where you can
respond back and forth like we do here... limit it to 512 characters per
response or something. It's all server stored, and users can scroll thru the
responses, expand/hide, or choose to ignore them. It would go a long way in
making it better for developers and the end users alike. But like I said
before, Market is an android app as far as I know.. I've not really seen
much in the way of updates in the past few months to it. Is it that hard for
one developer at google or on the android team to continue to update the
market app? Hell, open source that sucker and let us contribute to it.


On Tue, Jan 19, 2010 at 5:24 PM, Alberto  wrote:

> I'm not alone when it comes to the updating issue, check this article
> out "Android’s Next Challange? iTunes | Linux Magazine -
> http://goo.gl/gPzw";
>
> However as Dianne explained yesterday there's not much Google can do
> about this, since only manufacturers can release the updates for the
> phones, after that, getting it from manufacturers to users is
> relatively simple, so until the day comes that users can update the
> phones on their own, like we do with PCs or iPhones there's not much
> Google can do.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] trouble processing "java/lang/Object.class"

2010-01-19 Thread Sébastien Canart
On Jan 19, 2010 7:06 PM, "JJS"  wrote:

I received the following message and found several others who had seen
it but no solution.  So I have included how I finally fixed it.  (I'm
using Eclipse version 3.4.2 and Android 1.5.)

trouble processing "java/lang/Object.class":
[2010-01-17 14:32:29 - whatever]
Attempt to include a core VM class in something other than a core
library. It is likely that you have attempted to include the core
library from adesktop virtual machine into an application, which will
most assuredly not work.  If you really intend to build a core library
-- which is only appropriate as part of creating a full virtual
machine binary, as opposed to compiling an application -- then use the
"--core-library" option to suppress this error message. If you go
ahead and use "--core-library" but are in fact building an
application, then please be aware that your build will still fail at
some point; you will simply be denied the pleasure of reading this
helpful error message.

The fix for me was to go to my project's properties, select:

 Java Build Path -> Libraries (tab)

Somehow, the android.jar had been added, and when I deleted it, all
was good.  Note that the android.jar is included as part of the
Android 1.5 library, so this was a duplication.

How did this happen? I certainly didn't do it.  But my app has blown
up a lot in the emulator, so who knows.

Later . . .   Jim

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: myTouch 3G developer phone

2010-01-19 Thread Jeffrey
No, it does not need service so it should work in it's current state.
There are quite a few posts on getting dev phones to work, so with
some searching I'm sure you can find one and get the issue resolved.

On Jan 18, 12:49 pm, heretic619  wrote:
> I have a myTouch 3G that currently is not connected to any service. I
> have been trying to use it as a dev phone but eclipse wont see it as
> proper target device. Does it need service for it to work?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Installing app on android device

2010-01-19 Thread Jeffrey
Also, exporting an UNSIGNED package is the main problem. Packages must
be signed in order to install. It's not hard to sign them as Android
allow self-signed packages. Just use the android tools menu and click
on export SIGNED package.

On Jan 19, 1:43 pm, Robert Nekic  wrote:
> Now that I think about it...I seem to recall having trouble getting
> Astro to launch an apk.  I eventually installed a different file
> manager app from the Market, cleverly called "File Manager".  I don't
> like the app very much but it does launch my apk.
>
> On Jan 19, 2:35 pm, Robert Nekic  wrote:
>
>
>
> > I've heard Archos killed some functionality regarding debugging/
> > development with the Archos 5 Internet Tablet.  If you go to Settings,
> > Applications, do you see a checkbox  at the top of the list for
> > "Unknown sources"?  You probably have to uncheck that to get your apk
> > to run.   Also, does that same Application settings list have a
> > Development option at the bottom of the list?
>
> > On Jan 19, 1:14 pm, fourk xav  wrote:
>
> > > Thanks guys !
> > > I manage to copy the apk already into my Archos, but when I launch it, it
> > > won't install. Error message saying, the application can not be installed 
> > > on
> > > this device... but it works perfectly on the emulator...
> > > any ideas?
>
> > > On Tue, Jan 19, 2010 at 7:07 PM, String 
> > > wrote:
>
> > > > On Jan 19, 2:43 pm, fourk xav  wrote:
>
> > > > > What about if you want to run the application on your DISCONNECTED
> > > > device?
>
> > > > You need to get the APK to the device somehow. By far the most direct
> > > > method is via USB, but if this isn't an option for some reason, you
> > > > still need to bridge that gap. Some possibilities:
>
> > > > - Copy the APK to an SD card on your development computer, then mount
> > > > that card on your phone and open th APK file using a File Manager app.
> > > > - Upload the APK file to a web server, then browse to its URL using
> > > > the browser on the device.
>
> > > > There are probably other means, but you will need to get the APK file
> > > > to the device one way or another.
>
> > > > String
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com > > >  cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] findViewById doesnt work directly after inflate() !! Why?

2010-01-19 Thread Jason Proctor
override onFinishInflate() and cache your subviews there. the view 
constructor is too early for findViewById().





I have an activity defined as:

public class FlipperDemo extends Activity
{
@Override
public void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
setContentView( R.layout.main );
}
}

With this in main.xml


  http://schemas.android.com/apk/res/android";
android:layout_width="wrap_content"
android:layout_height="wrap_content"  />

MyFlipper.java contains

class MyFlipper extends View
{
public MyView( Context context, AttributeSet attrs )
{
super( context, attrs );
ViewFlipper flipper1 = (ViewFlipper) LayoutInflater.from
( context ).inflate( R.layout.myflipper, null );
ViewFlipper flipper2 = (ViewFlipper) findViewById
( R.id.flipper );
}
}

And myflipper.xml contains


http://schemas.android.com/apk/res/
android"
android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >







The problem is that in the MyView() constructor flipper1 gets set, but
flipper2 is null!  Why cant i get flipper by Id here?




--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
jason.vp.engineering.particle
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Saving the contents of an array

2010-01-19 Thread Jeffrey
How do I save the contents of an array to a file and then read it
again later? I have a small amount of data that will need to be stored
and since I have no idea where to start on using a SQLite database, I
think this will work a lot better.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ATTENTION ANDROID TEAM: Take back control of Android.

2010-01-19 Thread Alberto
I'm not alone when it comes to the updating issue, check this article
out "Android’s Next Challange? iTunes | Linux Magazine - http://goo.gl/gPzw";

However as Dianne explained yesterday there's not much Google can do
about this, since only manufacturers can release the updates for the
phones, after that, getting it from manufacturers to users is
relatively simple, so until the day comes that users can update the
phones on their own, like we do with PCs or iPhones there's not much
Google can do.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] findViewById doesnt work directly after inflate() !! Why?

2010-01-19 Thread ClarkBattle
I have an activity defined as:

public class FlipperDemo extends Activity
{
@Override
public void onCreate( Bundle savedInstanceState )
{
super.onCreate( savedInstanceState );
setContentView( R.layout.main );
}
}

With this in main.xml


  http://schemas.android.com/apk/res/android";
android:layout_width="wrap_content"
android:layout_height="wrap_content"  />

MyFlipper.java contains

class MyFlipper extends View
{
public MyView( Context context, AttributeSet attrs )
{
super( context, attrs );
ViewFlipper flipper1 = (ViewFlipper) LayoutInflater.from
( context ).inflate( R.layout.myflipper, null );
ViewFlipper flipper2 = (ViewFlipper) findViewById
( R.id.flipper );
}
}

And myflipper.xml contains


http://schemas.android.com/apk/res/
android"
android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >







The problem is that in the MyView() constructor flipper1 gets set, but
flipper2 is null!  Why cant i get flipper by Id here?



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: JOB OFFER--developing the Android SMS application

2010-01-19 Thread Jack Hsu
Dear All

My email is m0929420...@gmail.com.

Jack


On 1月15日, 下午3時35分, Jack Hsu  wrote:
> HI ALL
>
> I am looking for the SMS solution in Android cell phone to have the
> following functions (but not limited), would any one like to help me
> to develop this application? Payment can discuss.
>
> 1. can send and receive the SMS with encryption
>
> 2. can automatically store the receiving SMS in Security SD card (in
> flash memory area) -This security SD card is the micro SD card type
> which embed a smart card.-we will offer this.
>
> 3. via the PIN (key password) ( for the smart card) to access the
> special SMS platform and decryption and encryption (using the private
> key stored in this SD card -smart card area ) the SMS to see or to
> send.
>
> 4. can setup  or receive different key value for different SMS which
> sent by different person.
>
> It would need the one who is well know the PKI, smart card (7816),
> java and Android 1.5, 1.6, and 2.01 . we will pay for this
> application. if you are interesting in this job, please contact us
> directly. Jack Hsu, m092942...@gmail.com
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: JOB OFFER--developing the Android SMS application

2010-01-19 Thread Jack Hsu
Hi Lorys

Sorry, my email is m0929420...@gmail.com
I will send a email to you.

thanks!
Jack



On 1月16日, 上午7時01分, Lorys Pognon  wrote:
> Hi
> Your mail is not working. Your project is interesting and I would like to
> work on it.
> this is my email -   pognonlo...@yahoo.com
>
> cheers
>
> LP
>
>
>
> On Fri, Jan 15, 2010 at 8:35 AM, Jack Hsu  wrote:
> > HI ALL
>
> > I am looking for the SMS solution in Android cell phone to have the
> > following functions (but not limited), would any one like to help me
> > to develop this application? Payment can discuss.
>
> > 1. can send and receive the SMS with encryption
>
> > 2. can automatically store the receiving SMS in Security SD card (in
> > flash memory area) -This security SD card is the micro SD card type
> > which embed a smart card.-we will offer this.
>
> > 3. via the PIN (key password) ( for the smart card) to access the
> > special SMS platform and decryption and encryption (using the private
> > key stored in this SD card -smart card area ) the SMS to see or to
> > send.
>
> > 4. can setup  or receive different key value for different SMS which
> > sent by different person.
>
> > It would need the one who is well know the PKI, smart card (7816),
> > java and Android 1.5, 1.6, and 2.01 . we will pay for this
> > application. if you are interesting in this job, please contact us
> > directly. Jack Hsu, m092942...@gmail.com
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Best Server for Android MultiPlayer Games?

2010-01-19 Thread Miguel Morales
Thinking about it, if you already know Java.  And opt not to use an
out-of-the-box server, you can look into Clojure or Scala.


Miguel.

-- 
http://diastrofunk.com, http://developingthedream.blogspot.com/,
http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Update individual item in listview

2010-01-19 Thread ls02
There is notifyDataSetChanged that seems to update al litems. I still
don't see how I force refresh of only particular item(s) in the view.

On Jan 19, 4:17 pm, Carl Whalley  wrote:
> You need to be familiar with the ListAdapter. Try 
> here:http://developerlife.com/tutorials/?p=327
>
> --
> Android Academyhttp://www.androidacademy.com
>
> On Jan 19, 8:28 pm, ls02  wrote:
>
>
>
> > How do I update individual row in listview?- Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Best Server for Android MultiPlayer Games?

2010-01-19 Thread Miguel Morales
We're probably confusing the original poster at this point.

I agree that if you're going to be writing your server you should
avoid learning a new language unless it's absolutely necessary.
I tend to dislike Ruby, and Python in favor of Perl.  But this is
because I have everything I need in Perl via CPAN.
However, none of these languages are known for their speed, or for
their ability to scale.
You can of course add things like events, or message queuing, but this
only mimics things found in Erlang.

I definitely recommend Erlang to write your server.  However, it's not
something for the faint of heart.
But if you're going be learning a new language and are worried about
scalability and (soft) real-time speed you should check out Erlang fer
sure.

Once you get a hang of it.  Implementing things that would be
difficult in other languages becomes a breeze.
Not to mention you can do hot code updates on a running system!

I'm an Erlang advocate, so I thought it deserved a mention.  Not to
mention it's been working wonderfully for me so far for my android
game.

However, if you already know Java and you don't need any of the above
I strongly recommend you stick to a platform written in that language.

About hosting, this really shouldn't be a concern.  Shop around
datacenters, I'm sure you can get a dedicated hosting server
relatively cheap.

I tend to stay away from cloud hosting (like EC2 or Rackspace) because
it's a lot slower than having a dedicated machine in a datacenter.

Google Apps Engine, is ok.  If you want your stuff hosted by google,
and if you want to your server permanently married to them.  (Which I
wouldn't)
Not to mention that it'll still be somewhat slower than having a
dedicated server.

Miguel.

On Tue, Jan 19, 2010 at 4:11 PM, Kevin Duffey  wrote:
> Hey Robert,
> Love your online stuff.. read it all. Still got it bookmarked in hopes of
> using some of it for some game ideas.
> That said, I think the Ruby language is quite a bit more difficult at least
> in syntax than Java is. If you already know the Java language, why learn
> another language for the server component? Unless you have lots of time or
> it's a requirement, I would stick with Java over Ruby. I am probably one of
> the few that look at Rails as more difficult than Java. For me, having taken
> a stab at Ruby for a short bit, the language syntax reminds me of Perl..
> which is God awful. It's more difficult to read and even with the Rails
> framework, you still have to learn the basic concepts of MVC design, ORM,
> and such. If you haven't seen JEE 6 with EJB 3.1 and the Jersey REST stuff,
> you really owe it to yourself to check it out. It's quite amazing how fast
> it is to develop with. I installed GlassFish v3 and had a simplified RESTful
> API with back end ejb -> mysql ORM mapping in an hours time. I do know a lot
> about the REST server side, but the EJB stuff was fairly new to me and the
> most difficult part was figuring out how to connect GlassFish to mySql and
> accessing that via the EJB context. There has been a vast number of
> improvements especially in the area of developer productivity with JEE6 that
> I think compares favorably with anything RoR offers, and you get a lot more
> to boot.. not having to learn a new language, more frameworks and so forth.
> If you've got time, and want to pick up another language, go for it. For me,
> I can do more in Java than I can with Rails, and for me it's quite a bit
> faster too. I am one of the few that argues against going to RoR, Python or
> PhP for server solutions, although I am going to pick up on python as it's a
> very interesting language and is used quite a bit in scripting and other
> solutions. I used to be in the camp for learning everything new under the
> sun.. but now that Java is more than fast enough to handle heavy loads on
> the server side, handle any sort of Desktop application you can imagine
> (ooh..with the exception of high-end games and high-end low latency music
> apps), and you can use the same language for Android mobile too, I
> personally say stick with the one language you know already, learn some more
> of it (server side in the OPs case) and keep it all one language.
> Like I said, JEE6 comes bundled with Jersey, making it only a couple lines
> of code with no xml configuration to get a RESTful service in place, and a
> few entity pojos with annotations to have the ORM done as well. It's
> impressively easy to work with now.
> No matter what solution he goes with, he's still stuck figuring out how to
> host it. If he went RoR, JEE6, PhP, python, etc.. he still has to figure out
> where to host it, how to get it working for his game, etc.
>
> On Tue, Jan 19, 2010 at 3:38 PM, Robert Green  wrote:
>>
>> I'll mention it once more because it seems to be overlooked but for
>> any kind of turn-based game, I have to recommend:
>>
>> Server side:
>> Ruby on Rails as the platform
>> Phusion Passenger on Apache as the deployment manager
>> REST as 

[android-developers] how to implement search within the app?

2010-01-19 Thread Achanta
How do we implement search within an application.

I need my application to handle the search menu button click and
handle the text to search data from my application's database.

I have looked at the SearchManager but could not figure out how to
handle the search to query my database. i could not find any related
examples either on the net.

Can someone point me to an example or related resources on how to do
this?

Thank you.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Starting Google Maps at pre-specified location

2010-01-19 Thread Zsolt Vasvari
I am doing:

new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + address))



On Jan 20, 3:04 am, Brion Emde  wrote:
> Take a look at the Google Map Intents in this document. It is possible
> to construct location string and business search strings, as well as
> location based queries:
>
> http://developer.android.com/guide/appendix/g-app-intents.html
>
> On Jan 17, 2:46 pm, Denis <87elem...@gmail.com> wrote:
>
>
>
> > Hi Group,
>
> > I have one problem with Google Maps, while opening them at some
> > location. How could that be possible for user to specify city first
> > (e.g. type in EditText field "London") then press a button and see
> > London on the map? I've succeded in opening GMaps at some pre-
> > specified location, but only using coordinates:(. Cannot find anything
> > on topic.
>
> > Thanks in advance!
>
> > Denis- Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Service within a Thread? Thread within a Service?

2010-01-19 Thread Kevin Duffey
Interesting. I've got to read up on services more. I thought when you start
a service it's a new application that is running along with other background
apps. Essentially, I thought you'd have the foreground app PLUS a background
app running. When the foreground app closes, the background keeps on
running. I also read somewhere where you have the background service start
when the phone boots by listening for some intent or broadcast message.
Again I have to refer to Mark Murphy's books.. he explains this really well,
I just read most of it but haven't practiced it yet so it is escaping me.

If you can start a background service and it polls, then you probably need
that background service to broadcast a message so that when the foreground
app is actually in the foreground and running, it can respond to the message
to get the data. I am not sure (again) how that is accomplished, but that
should be the basic idea.

On Tue, Jan 19, 2010 at 3:37 PM, Nathan  wrote:

> I haven't implemented something like yours yet, but I plan to.
>
> From all I've read, an activity starting a service will launch it on
> the main thread. That's probably why it seems to lock the UI.
>
> So what you probably need is a Service that starts an AsyncTask. The
> service's status could still be accessed by the Activity's main thread
> while it's open, and the service could potentially live on.
>
> Nathan
>
>
>
> On Jan 19, 3:23 pm, Flapjack  wrote:
> > Thanks for the replies. Kevin, what I'm trying to accomplish is
> > [seemingly] very common in the mobile world:
> >
> > 1) User starts app
> > 2) App retrieves info from remote server based on the User's
> > interaction with the app
> > 3) When app is not in focus (or closed) a background service continues
> > to retrieve updates from remote server
> >
> > For point number 2), I understand that I could simply use a background
> > thread (eg. AsyncTask), since the data is to be returned to the
> > current activity. But for point number 3), a simple background thread
> > is not appropriate.
> >
> > My question is this: Since I will need to write a service to perform
> > [much of] the same functionality in point 3) as my background service
> > will be performing in point 2), wouldn't it just make more sense to
> > skip the background thread and perform all of my polling through the
> > service - and simply call that service from within whatever activity
> > may need it at the time? But that raises another question: calling a
> > service from an activity seems to lock the UI - so when polling remote
> > servers, shouldn't the service either be run in a new thread, or
> > rather, shouldn't the service spawn its own thread?
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Best Server for Android MultiPlayer Games?

2010-01-19 Thread Kevin Duffey
Hey Robert,

Love your online stuff.. read it all. Still got it bookmarked in hopes of
using some of it for some game ideas.

That said, I think the Ruby language is quite a bit more difficult at least
in syntax than Java is. If you already know the Java language, why learn
another language for the server component? Unless you have lots of time or
it's a requirement, I would stick with Java over Ruby. I am probably one of
the few that look at Rails as more difficult than Java. For me, having taken
a stab at Ruby for a short bit, the language syntax reminds me of Perl..
which is God awful. It's more difficult to read and even with the Rails
framework, you still have to learn the basic concepts of MVC design, ORM,
and such. If you haven't seen JEE 6 with EJB 3.1 and the Jersey REST stuff,
you really owe it to yourself to check it out. It's quite amazing how fast
it is to develop with. I installed GlassFish v3 and had a simplified RESTful
API with back end ejb -> mysql ORM mapping in an hours time. I do know a lot
about the REST server side, but the EJB stuff was fairly new to me and the
most difficult part was figuring out how to connect GlassFish to mySql and
accessing that via the EJB context. There has been a vast number of
improvements especially in the area of developer productivity with JEE6 that
I think compares favorably with anything RoR offers, and you get a lot more
to boot.. not having to learn a new language, more frameworks and so forth.

If you've got time, and want to pick up another language, go for it. For me,
I can do more in Java than I can with Rails, and for me it's quite a bit
faster too. I am one of the few that argues against going to RoR, Python or
PhP for server solutions, although I am going to pick up on python as it's a
very interesting language and is used quite a bit in scripting and other
solutions. I used to be in the camp for learning everything new under the
sun.. but now that Java is more than fast enough to handle heavy loads on
the server side, handle any sort of Desktop application you can imagine
(ooh..with the exception of high-end games and high-end low latency music
apps), and you can use the same language for Android mobile too, I
personally say stick with the one language you know already, learn some more
of it (server side in the OPs case) and keep it all one language.

Like I said, JEE6 comes bundled with Jersey, making it only a couple lines
of code with no xml configuration to get a RESTful service in place, and a
few entity pojos with annotations to have the ORM done as well. It's
impressively easy to work with now.

No matter what solution he goes with, he's still stuck figuring out how to
host it. If he went RoR, JEE6, PhP, python, etc.. he still has to figure out
where to host it, how to get it working for his game, etc.

On Tue, Jan 19, 2010 at 3:38 PM, Robert Green  wrote:

> I'll mention it once more because it seems to be overlooked but for
> any kind of turn-based game, I have to recommend:
>
> Server side:
> Ruby on Rails as the platform
> Phusion Passenger on Apache as the deployment manager
> REST as the method
> JSON as the high level protocol
>
> This is free, VERY easy to work with and will be able to work with
> most design requirements.  Android ships with JSON parsers and RoR has
> built in ORM->JSON support, so it'll effectively dump the results of
> queries directly into JSON without you having to add any code.
>
> I recommend using Aptana Studio with RADRails as the dev environment.
> You can start up a local Mongrel server and test directly against it
> with your device via WiFi, then just copy the rails app to your server
> to move it into production.
>
> I use these technologies extensively.  Try the full version of Wixel
> if you want to see how it works for online play.  It has been 99.999%
> reliable and has handled peaks in traffic just fine.
>
> On Jan 19, 5:15 pm, polyclefsoftware  wrote:
> > A couple of months ago I started looking into options for converting
> > some of my single-player turn-based games into online multiplayer
> > versions...it's the number one request I get from end users. I
> > investigated SmartFoxServer since they do have support for Android. I
> > set up a test server and worked through some of the tutorials. It
> > actually worked quite well, but of course there is the cost of the
> > server software in addition to the cost and logistics of hosting (as
> > Kevin just mentioned).
> >
> > A friend of mine mentioned the possibility of using Google App Engine
> > as a possible server solution. It makes a lot of sense (at least on
> > paper), since GAE:
> >
> > 1) Is free (up to a limit, a very high limit)
> > 2) Scales very nicely
> > 3) Uses a Google account for authentication, so ideally authentication
> > from an Android phone should be seamless, right?
> >
> > Well, I've spent a fair amount of time getting the authentication
> > working (search this forum if you're going this route). Our first GAE/
> > An

[android-developers] Contact List With Header

2010-01-19 Thread licorna
Hello,

I want to create a Contact List with a navigation header. I'll
explain, my application contains a navigation menu bar with 3 options,
one of those is Contacts. I want the user to be able to click on
Contacts, going to contacts section preserving the same navigation
menu bar.

So far I can not do this because the way SimpleCursorAdapter and
setAdapter works. When I try I get my navigation menu bar repeated for
each contact.

I'm using the example from the following URL:

http://androidforums.com/android-developers/5315-contact-list.html

Thanks in advance!

Rodrigo
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: adding voice search

2010-01-19 Thread Achanta
Did you happen to figure this out?

Can someone point to the correct resource or example regarding voice
search.

Thank you.

On Dec 1 2009, 5:01 pm, schwiz  wrote:
> I have seen plenty of other apps do this can anyone at all please
> point me to the documentation for this!!
>
> On Dec 1, 2:22 pm, schwiz  wrote:
>
> > bump
>
> > On Dec 1, 12:53 am, schwiz  wrote:
>
> > > I want to add avoicesearchbutton to one of my apps but I can't seem
> > > to find documentation on it anywhere.  Can someone give me an example
> > > or point me to one?
> > > Thanks!
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] SMS inbox

2010-01-19 Thread abhi
How do I access the SMS inbox in android? I am able to receive new
messages. However I could not find a straightforward tutorial on
accessing the SMS inbox. I know I have to use content provider.

If you know how to use content provider to access SMS inbox, please
let me know. Thanks.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread windstorm
The problem is if you want to filter the acc to get rid of the car
shaking, you first need to decide what's the frequency range of "real
value" and what's the frequency range of "shaking". It's kind of
tricky to set the threshold for the filter.

Any one got good method?

PhoenixofMT wrote:
> I can't provide much on this. I'm not a developer, but I may be able
> to provide some insight. I've been wanting to find a way to calibrate
> the accelerometers on my droid since I installed the tricorder app. It
> bugs me that the X and Y axes are off by about .2 ms^-2 in both
> orientations. In my searches for such a calibration method, I came
> across this post.
>
> The reason the accelerometers never measure zero is that there is
> always at least one axis being pulled by gravity. If the device is
> lying flat, the Z axis is pointing at (roughly) the center of the
> earth and should measure acceleration due to gravity (9.8 ms^-2). The
> other axes should be near zero, but the shoddy factory calibration
> makes this difficult. The company I work for manufactures marine
> inertial navigation systems that use accelerometers, gyros and a 3-
> axis electronic compass and I get to calibrate them from time to
> time.The way I do this (using a built in program that I've had nothing
> to do with) is to set the box on each side and have the calibration
> program take 10 readings from the relevant accelerometer, (it also
> takes readings from the electronic compass to help with those
> measurements, in case you're also working on a compass program). What
> I assume, is that the calibration program sets the reading from each
> orientation of each axis at +/- 9.2ms^-2. It probably also compares
> the differences in magnitudes of the signals from each sensor to
> further sharpen the accuracy, since I do not set these things
> perfectly vertical for the calibration. As long as the device is held
> in the same orientation within the calibration box and the outside of
> the box is square, the calibration program can figure it out.
>
> As for using the accelerometers to measure speed changes, I've been
> thinking about that to. It would be cool to, perhaps, augment a GPS
> speedometer with the accelerometers. Maybe to provide higher
> resolution without taxing the GPS receivers? In any case, its pretty
> complicated, I'd have to dig out my physics textbook to find the
> formulas. Even then it would probably take me a while to wrap my head
> around a combination of three axes. Then there is filtering out noise
> from, say, the vibrations of a car
>
> Any way, I hope I've been of some help. Good luck, I look forward to
> trying out your app.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Best Server for Android MultiPlayer Games?

2010-01-19 Thread Robert Green
I'll mention it once more because it seems to be overlooked but for
any kind of turn-based game, I have to recommend:

Server side:
Ruby on Rails as the platform
Phusion Passenger on Apache as the deployment manager
REST as the method
JSON as the high level protocol

This is free, VERY easy to work with and will be able to work with
most design requirements.  Android ships with JSON parsers and RoR has
built in ORM->JSON support, so it'll effectively dump the results of
queries directly into JSON without you having to add any code.

I recommend using Aptana Studio with RADRails as the dev environment.
You can start up a local Mongrel server and test directly against it
with your device via WiFi, then just copy the rails app to your server
to move it into production.

I use these technologies extensively.  Try the full version of Wixel
if you want to see how it works for online play.  It has been 99.999%
reliable and has handled peaks in traffic just fine.

On Jan 19, 5:15 pm, polyclefsoftware  wrote:
> A couple of months ago I started looking into options for converting
> some of my single-player turn-based games into online multiplayer
> versions...it's the number one request I get from end users. I
> investigated SmartFoxServer since they do have support for Android. I
> set up a test server and worked through some of the tutorials. It
> actually worked quite well, but of course there is the cost of the
> server software in addition to the cost and logistics of hosting (as
> Kevin just mentioned).
>
> A friend of mine mentioned the possibility of using Google App Engine
> as a possible server solution. It makes a lot of sense (at least on
> paper), since GAE:
>
> 1) Is free (up to a limit, a very high limit)
> 2) Scales very nicely
> 3) Uses a Google account for authentication, so ideally authentication
> from an Android phone should be seamless, right?
>
> Well, I've spent a fair amount of time getting the authentication
> working (search this forum if you're going this route). Our first GAE/
> Android online multiplayer game is coming together, but we're still
> working through some issues. I think the bottom line is that if you're
> not knowledgeable about how to implement server/client applications,
> you're going to have to learn quite a bit, no matter what solution you
> implement.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Service within a Thread? Thread within a Service?

2010-01-19 Thread Nathan
I haven't implemented something like yours yet, but I plan to.

>From all I've read, an activity starting a service will launch it on
the main thread. That's probably why it seems to lock the UI.

So what you probably need is a Service that starts an AsyncTask. The
service's status could still be accessed by the Activity's main thread
while it's open, and the service could potentially live on.

Nathan



On Jan 19, 3:23 pm, Flapjack  wrote:
> Thanks for the replies. Kevin, what I'm trying to accomplish is
> [seemingly] very common in the mobile world:
>
> 1) User starts app
> 2) App retrieves info from remote server based on the User's
> interaction with the app
> 3) When app is not in focus (or closed) a background service continues
> to retrieve updates from remote server
>
> For point number 2), I understand that I could simply use a background
> thread (eg. AsyncTask), since the data is to be returned to the
> current activity. But for point number 3), a simple background thread
> is not appropriate.
>
> My question is this: Since I will need to write a service to perform
> [much of] the same functionality in point 3) as my background service
> will be performing in point 2), wouldn't it just make more sense to
> skip the background thread and perform all of my polling through the
> service - and simply call that service from within whatever activity
> may need it at the time? But that raises another question: calling a
> service from an activity seems to lock the UI - so when polling remote
> servers, shouldn't the service either be run in a new thread, or
> rather, shouldn't the service spawn its own thread?
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Service within a Thread? Thread within a Service?

2010-01-19 Thread Flapjack
Thanks for the replies. Kevin, what I'm trying to accomplish is
[seemingly] very common in the mobile world:

1) User starts app
2) App retrieves info from remote server based on the User's
interaction with the app
3) When app is not in focus (or closed) a background service continues
to retrieve updates from remote server

For point number 2), I understand that I could simply use a background
thread (eg. AsyncTask), since the data is to be returned to the
current activity. But for point number 3), a simple background thread
is not appropriate.

My question is this: Since I will need to write a service to perform
[much of] the same functionality in point 3) as my background service
will be performing in point 2), wouldn't it just make more sense to
skip the background thread and perform all of my polling through the
service - and simply call that service from within whatever activity
may need it at the time? But that raises another question: calling a
service from an activity seems to lock the UI - so when polling remote
servers, shouldn't the service either be run in a new thread, or
rather, shouldn't the service spawn its own thread?


On Jan 19, 4:22 pm, Kevin Duffey  wrote:
> One thing you haven't indicated is if you need this remote access when the
> app starts, or if you actually need to periodically "wake up" and poll the
> remote service? If you only need to have a user start your app.. and at that
> point it requests to the remote service once.. or while the app is running,
> then using AsyncTask is the way to go. If you need your app to periodically
> poll the remote service, than a service may be the way to go. A service
> would not require a separate thread that I know of because it is not tied to
> a UI. It's a background task, with no UI.
>
> On Tue, Jan 19, 2010 at 1:14 PM, jotobjects  wrote:
> > I don't think it will accomplish anything to start a service in a
> > thread.  That doesn't make the service run in the thread where it is
> > started.  So you are down to one of the options you are considering.
> > Ti si also possible to start a service in a separate process but it
> > still should not block on its main thread.
>
> > Possibly android.os.AsyncTask will be useful for you.
>
> > On Jan 18, 5:17 pm, Flapjack  wrote:
> > > Please forgive my ignorance, I am new to Java and Android.
>
> > > I would like to retrieve remote data and display it within my
> > > activity. To prevent tying up to UI, I understand that I can do this
> > > in another thread. (I thought I could just-as-well fetch this remote
> > > data from within a service, but that appears to tie up the UI thread
> > > also). So now I'm beginning to think I need to either run the logic
> > > from a new thread within a service, or run a service within a new
> > > thread. But which? I have found many examples online of running new
> > > threads or services, but I have yet to find an example of both at the
> > > same time.
>
> > > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] File Dialog?

2010-01-19 Thread Nathan
Is there something like a FileDialog available? From previous threads,
it appears there isn't one.

If not, has someone written one?

I want to allow a user to
a) Specify a folder/filename on storage for creating an SQLite
database.
b) Specify an existing file/folder on storage card for opening as an
SQLite Database.

Thanks

Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Best Server for Android MultiPlayer Games?

2010-01-19 Thread polyclefsoftware
A couple of months ago I started looking into options for converting
some of my single-player turn-based games into online multiplayer
versions...it's the number one request I get from end users. I
investigated SmartFoxServer since they do have support for Android. I
set up a test server and worked through some of the tutorials. It
actually worked quite well, but of course there is the cost of the
server software in addition to the cost and logistics of hosting (as
Kevin just mentioned).

A friend of mine mentioned the possibility of using Google App Engine
as a possible server solution. It makes a lot of sense (at least on
paper), since GAE:

1) Is free (up to a limit, a very high limit)
2) Scales very nicely
3) Uses a Google account for authentication, so ideally authentication
from an Android phone should be seamless, right?

Well, I've spent a fair amount of time getting the authentication
working (search this forum if you're going this route). Our first GAE/
Android online multiplayer game is coming together, but we're still
working through some issues. I think the bottom line is that if you're
not knowledgeable about how to implement server/client applications,
you're going to have to learn quite a bit, no matter what solution you
implement.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: SensorManager.registerListener gives unexpected results

2010-01-19 Thread TonyDoc
Thanks dan, this fixed it, sorry for not getting back sooner...

On Dec 13 2009, 9:57 pm, dan raaka  wrote:
> the IK series have the fix.
>
> -Dan
>
> On Thu, Dec 10, 2009 at 12:28 AM, TonyDoc  wrote:
> > I'm running firmware 1.5,
> > baseband I7500XXII5,
> > kernel 2.6.27.35,
> > build no 76XXCSDCBALUM6375
>
> > On Dec 10, 4:51 am, dan raaka  wrote:
> > > what is the full version name ?
> > > -Dan
>
> >  > On Wed, Dec 9, 2009 at 10:41 AM, TonyDoc  wrote:
> > > > Thanks Dan,
> > > > I see K4 is out in the wild now. But not yet on NPS. Is it this
> > > > firmware you speak of?
>
> > > > On Dec 9, 8:15 am, TonyDoc  wrote:
> > > > > Hi, I have firmware I5on my device (latest I think). Do you know
> > which
> > > > > firmware gives correct sensor updates?
>
> > > > > On Dec 8, 6:31 pm, dan raaka  wrote:
>
> > > > > > If you use NPS studio - it allows you to update your device
> > software
> > > > tonewer
> > > > > > builds.
> > > > > > -Dan
>
> > > > > > On Tue, Dec 8, 2009 at 3:24 AM, TonyDoc  wrote:
> > > > > > > What do you mean? Newer builds? Do you mean 1,6, 2.0? I'm using
> > 1.5
> > > > > > > SDK to try this...
>
> > > > > > > On Dec 7, 5:45 pm, dan raaka  wrote:
> > > > > > > > The newer versions of the build dont exhibit this problem ..
> > > > > > > > -Dan
>
> > > > > > > > On Mon, Nov 30, 2009 at 6:30 AM, TonyDoc 
> > > > wrote:
> > > > > > > > > I'm registering a sensor listener with this line of code.
>
> > > > mSensorManager.registerListener(this,mSensorManager.getDefaultSensor
> > > > > > > > > (Sensor.TYPE_ACCELEROMETER),
> > SensorManager.SENSOR_DELAY_FASTEST);
>
> > > > > > > > > The rate is set to SENSOR_DELAY_FASTEST with the expectation
> > that
> > > > I
> > > > > > > > > would receive events roughly every 20-30ms. It turns out that
> > I
> > > > > > > > > receive events only every 200-220ms (just now, my event code
> > > > simply
> > > > > > > > > logcats the system time).
>
> > > > > > > > > No matter which rate I use, SENSOR_DELAY_NORMAL,
> > SENSOR_DELAY_UI,
> > > > > > > > > SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST, I get the same
> > > > result?
>
> > > > > > > > > Any ideas to what am I doing wrong?
>
> > > > > > > > > --
> > > > > > > > > You received this message because you are subscribed to the
> > > > Google
> > > > > > > > > Groups "Android Developers" group.
> > > > > > > > > To post to this group, send email to
> > > > > > > android-developers@googlegroups.com
> > > > > > > > > To unsubscribe from this group, send email to
> > > > > > > > > android-developers+unsubscr...@googlegroups.com
> > 
>
> > > > 
> > 
>
> > > > > > > 
> > 
>
> > > > 
> > 
>
> > > > > > > > > For more options, visit this group at
> > > > > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > > > > --
> > > > > > > You received this message because you are subscribed to the
> > Google
> > > > > > > Groups "Android Developers" group.
> > > > > > > To post to this group, send email to
> > > > android-developers@googlegroups.com
> > > > > > > To unsubscribe from this group, send email to
> > > > > > > android-developers+unsubscr...@googlegroups.com
> > 
>
> > > > 
> > 
>
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > 
>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Gridview loads in reverse on onConfigurationChanged

2010-01-19 Thread Mike M
yeah,
I get the same on Droid 2.0, Although I get it without having
animation applied to the gridview...

I wish there was a uniform / sequential way that getView() was
called...



On Jan 18, 5:29 pm, Streets Of Boston  wrote:
> Hi Roman,
>
> It does happen. :-)
>
> I can reproduce it almost every time like this:
> - Just create an activity with a Grid View with quite a few images (or
> grid-items) and attach a grid-layout-animator to the grid-view.
> Configure the grid-view-animator in such a way that you see how the
> grid-view-items are laid-out. E.g. columns first, rows later.
> - Create an (empty) sub-activity that can be launched from the one
> having the grid-view.
>
> - Start your grid-view's activiy in portrait orientation.
> - Start your sub-activity.
> - Rotate your phone into landscape orientation.
> - Press back to finish the sub-activity.
>   The grid-view's activity is shown again and...
>
> ... 9 out of 10 times, i see the grid-view being built up in reverse
> mode (i'm running on 2.1, Nexus One).
>
> In my app, the 'getView()' method does not rely on the order in which
> the 'getView()' is called at all.
>
> On Jan 18, 2:15 am, Romain Guy  wrote:
>
>
>
> > I have never noticed such an issue. The only way I can think of that
> > would cause this to happen would be if your adapter relies on the
> > order of the getView() calls. Note there is absolutely no guarantee
> > about the order in which getView() will be called (the position
> > argument will not necessarily be sequential, incrementing or
> > decrementing.)
>
> > On Sun, Jan 17, 2010 at 8:57 PM, Mike M  wrote:
> > > Streets of Boston,
>
> > > Thanks for the reply.  I do have an animation on my GridView, but I
> > > took it off and still notice the problem.
>
> > > Any ideas?
>
> > > Thanks
>
> > > On Jan 17, 1:23 pm, Streets Of Boston  wrote:
> > >> I've seen this too in my app.
>
> > >> If you add a layout-animation, that animates the grid-view children
> > >> (i.e. the grid-items), you can clearly see this reverse order.
>
> > >> On Jan 17, 4:03 am, Mike M  wrote:
>
> > >> > Hey everyone,
>
> > >> > I have a gridview of images that I load from the internet.  When the
> > >> > phone rotates (or some other config change), onConfigurationChanged()
> > >> > is called.  When that happens, the items in the gridview are reversed
> > >> > (meaning, the 1st image is the last; they are in reverse order).
>
> > >> > Does anyone know why this is or how to change it?   I'm hoping someone
> > >> > has run into this before...
>
> > >> > Sorry if I don't share any code.  I don't think It'd help; it's more
> > >> > of a conceptual question.
>
> > >> > Thanks,
>
> > >> > Mike
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them- Hide quoted text 
> > -
>
> > - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread TonyDoc
Hi PhoenixofMT,

I've looked into augmenting the accelerometer data with GPS info. The
major hurdle is not the physics, it's the resolution of the GPS data
provided, which is only timestamped to the nearest second! This makes
it extremely difficult the calculate any sort of realistic figures
without a lot of assumptions.
The accelerometer though, after proper calibration, does provide
figures that allow for pretty accurate calculation of acceleration/
speed/distance/power/torque...

On Jan 17, 11:51 pm, PhoenixofMT  wrote:
> I can't provide much on this. I'm not a developer, but I may be able
> to provide some insight. I've been wanting to find a way to calibrate
> the accelerometers on my droid since I installed the tricorder app. It
> bugs me that the X and Y axes are off by about .2 ms^-2 in both
> orientations. In my searches for such a calibration method, I came
> across this post.
>
> The reason the accelerometers never measure zero is that there is
> always at least one axis being pulled by gravity. If the device is
> lying flat, the Z axis is pointing at (roughly) the center of the
> earth and should measure acceleration due to gravity (9.8 ms^-2). The
> other axes should be near zero, but the shoddy factory calibration
> makes this difficult. The company I work for manufactures marine
> inertial navigation systems that use accelerometers, gyros and a 3-
> axis electronic compass and I get to calibrate them from time to
> time.The way I do this (using a built in program that I've had nothing
> to do with) is to set the box on each side and have the calibration
> program take 10 readings from the relevant accelerometer, (it also
> takes readings from the electronic compass to help with those
> measurements, in case you're also working on a compass program). What
> I assume, is that the calibration program sets the reading from each
> orientation of each axis at +/- 9.2ms^-2. It probably also compares
> the differences in magnitudes of the signals from each sensor to
> further sharpen the accuracy, since I do not set these things
> perfectly vertical for the calibration. As long as the device is held
> in the same orientation within the calibration box and the outside of
> the box is square, the calibration program can figure it out.
>
> As for using the accelerometers to measure speed changes, I've been
> thinking about that to. It would be cool to, perhaps, augment a GPS
> speedometer with the accelerometers. Maybe to provide higher
> resolution without taxing the GPS receivers? In any case, its pretty
> complicated, I'd have to dig out my physics textbook to find the
> formulas. Even then it would probably take me a while to wrap my head
> around a combination of three axes. Then there is filtering out noise
> from, say, the vibrations of a car
>
> Any way, I hope I've been of some help. Good luck, I look forward to
> trying out your app.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] InputStream.read

2010-01-19 Thread Business Talk
When downloading a file from the net in the emulator all is fine, no
exception is thrown



HttpURLConnection httpURLConnection = (HttpURLConnection)
_URL.openConnection();

httpURLConnection.setRequestMethod("GET");
httpURLConnection.setDoOutput(true);
httpURLConnection.connect();

InputStream _InputStream = httpURLConnection.getInputStream();



yet, when reading the input stream into a buffer it returns 0 (zero)
length.

_InputStream.read(buffer, 0, buffer.length)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread TonyDoc
Hi,

As PhoenixofMT said, calibration from factory is poor, but sufficient
for most games and the like. I had to write a similar calibration
routine into my software before I managed to get any realistic figures
from the accelerometer. The user is required to sit the device in the
various orientations, then you need to scale the device provided
accelerometer readings proportionally with your calibrated ranges. I
also found that changes in temperature affects calibration, so I
recommend the user to calibrate the device every time they use the
application :( .

On Jan 17, 11:51 pm, PhoenixofMT  wrote:
> I can't provide much on this. I'm not a developer, but I may be able
> to provide some insight. I've been wanting to find a way to calibrate
> the accelerometers on my droid since I installed the tricorder app. It
> bugs me that the X and Y axes are off by about .2 ms^-2 in both
> orientations. In my searches for such a calibration method, I came
> across this post.
>
> The reason the accelerometers never measure zero is that there is
> always at least one axis being pulled by gravity. If the device is
> lying flat, the Z axis is pointing at (roughly) the center of the
> earth and should measure acceleration due to gravity (9.8 ms^-2). The
> other axes should be near zero, but the shoddy factory calibration
> makes this difficult. The company I work for manufactures marine
> inertial navigation systems that use accelerometers, gyros and a 3-
> axis electronic compass and I get to calibrate them from time to
> time.The way I do this (using a built in program that I've had nothing
> to do with) is to set the box on each side and have the calibration
> program take 10 readings from the relevant accelerometer, (it also
> takes readings from the electronic compass to help with those
> measurements, in case you're also working on a compass program). What
> I assume, is that the calibration program sets the reading from each
> orientation of each axis at +/- 9.2ms^-2. It probably also compares
> the differences in magnitudes of the signals from each sensor to
> further sharpen the accuracy, since I do not set these things
> perfectly vertical for the calibration. As long as the device is held
> in the same orientation within the calibration box and the outside of
> the box is square, the calibration program can figure it out.
>
> As for using the accelerometers to measure speed changes, I've been
> thinking about that to. It would be cool to, perhaps, augment a GPS
> speedometer with the accelerometers. Maybe to provide higher
> resolution without taxing the GPS receivers? In any case, its pretty
> complicated, I'd have to dig out my physics textbook to find the
> formulas. Even then it would probably take me a while to wrap my head
> around a combination of three axes. Then there is filtering out noise
> from, say, the vibrations of a car
>
> Any way, I hope I've been of some help. Good luck, I look forward to
> trying out your app.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ZipFile

2010-01-19 Thread Business Talk
Thanks John

On Jan 19, 5:25 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> This should work for you...
>
>         InputStream is = conn.getInputStream();
>         ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is));
>         ZipEntry entry;
>
>         while ((entry = zis.getNextEntry()) != null) {
>                 int size = 0 ;
>                 byte[] buffer = new byte[2048];
>
>                 FileOutputStream fos = openFileOutput(entry.getName(),
> Activity.MODE_WORLD_WRITEABLE);
>                 while ((size = zis.read(buffer, 0, buffer.length)) != -1) {
>                         fos.write(buffer, 0, size) ;
>                 }
>                 filesProcessed++ ;
>                 if ( fileHash.get(entry.getName()) != null ) {
>                         fos.flush();
>                         fos.close();
>                 }
>         }
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: ATTENTION ANDROID TEAM: Take back control of Android.

2010-01-19 Thread Kevin Duffey
Couple thoughts on this. TreKing has a good idea. I've seen this done
before. The only thing I would be worried about is as a user of the app,
having to pass thru all this content to get to the app. Sure, you probably
allow them to skip it. A different idea.. is this even worthy..is to provide
a link to your site and let all the info in there. That way your app is
smaller, the user can go to your site when they want or if they want, and
you can provide more info and details, feedback form, etc. Of course, I
would guess a lot less people will actually go to the site tho.

It would be great if there was some sort of Android Developers Info site
that google provided where we could get some questions answered, and info
about when things will be available posted. For example, a rough idea when
OpenGL/CL will be distributed, a JIT in the JVM, and more markets that
developers can sell to. As well, if the Market is just an Android app, why
can't that be updated fairly quickly? I know some things take time, like
getting into other markets..although a year with not many added does seem
very long. But the market app is basically a pointer to server side data..
filtering it and such. Why not make it more robust, allow longer comments, a
forum like comment system, more screen shots, and so forth? That would
greatly benefit developers and users alike.



On Tue, Jan 19, 2010 at 12:48 PM, Greg Donald  wrote:

> On Tue, Jan 19, 2010 at 2:31 PM, TreKing  wrote:
> > 2 screenshot limit ...
>
> No option for landscape orientation on those two screen shots either.
> To assume everyone will build a portrait oriented app is very short
> sighted.
>
> > 3 - Reminds users that there are so many variations of phones and Android
> > versions that it's pretty much impossible for me test everything
>
> It's like reliving the past decade of fighting browser compatibility
> issues.  Only this time around I don't know where to put my ie6.css
> file.
>
>
> --
> Greg Donald
> destiney.com | gregdonald.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: ZipFile

2010-01-19 Thread Maps.Huge.Info (Maps API Guru)
This should work for you...


InputStream is = conn.getInputStream();
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is));
ZipEntry entry;

while ((entry = zis.getNextEntry()) != null) {
int size = 0 ;
byte[] buffer = new byte[2048];

FileOutputStream fos = openFileOutput(entry.getName(),
Activity.MODE_WORLD_WRITEABLE);
while ((size = zis.read(buffer, 0, buffer.length)) != -1) {
fos.write(buffer, 0, size) ;
}
filesProcessed++ ;
if ( fileHash.get(entry.getName()) != null ) {
fos.flush();
fos.close();
}
}

-John Coryat

"Radar Now!"

"What Zip Code?"
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] ZipFile

2010-01-19 Thread Business Talk
I am trying to download a zip file from the net and I don't seem to be
able to create a ZipFile passing the InputStream

 ( httpURLConnection.getInputStream()  ).

 I really don't want to create a temp zip file and then create the
ZipFile using the File object pointing the test zip file. Any  ideas?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: setContentView fails when creating a new activity

2010-01-19 Thread Robert Nekic
My replies on Android Beginners simply refuse to go through.

oregonduckman: looking at the XML you replied with on Android
Beginners, your opening RelativeLayout tag is not closed.



On Jan 19, 3:53 pm, Robert Nekic  wrote:
> I've tried to reply to this thread twice today but it refuses to show
> up here.  Maybe the third time will work:
>
> I find that, for me, exceptions triggered by setContentView are often
> simple oversights in the layout file, such as a missing layout_width
> or layout_height on one of my view declarations in the xml.
>
> On Jan 19, 3:34 pm, schwiz  wrote:
>
>
>
> > what else is going on in onCreate?  are you hiding the title bar?
>
> > On Jan 19, 12:12 pm, oregonduckman  wrote:
>
> > > My code is calling setContentView(R.layout.someLayoutID); from an
> > > activities' onCreate method. The activity is launched with the
> > > following:
> > >                         Intent myIntent = new Intent(this,
> > > myClass.class);
> > >                         try
> > >                         {
> > >                                 this.startActivity(myIntent);
> > >                         }
> > >                         catch(ActivityNotFoundException e)
> > >                         {
> > >                                 e.toString();
> > >                         }
> > > The activity is declared in the manifest file as
> > > 
>
> > > The call to setContentView results in the following:
> > > DalvikVM[localhost:8656]
> > >         Thread [<3> main] (Suspended (exception RuntimeException))
> > >                 ActivityThread.performLaunchActivity(ActivityThread
> > > $ActivityRecord,
> > > Intent) line: 2481
> > >                 ActivityThread.handleLaunchActivity(ActivityThread
> > > $ActivityRecord,
> > > Intent) line: 2497
> > >                 ActivityThread.access$2200(ActivityThread,
> > > ActivityThread
> > > $ActivityRecord, Intent) line: 119
> > >                 ActivityThread$H.handleMessage(Message) line: 1848
> > >                 ActivityThread$H(Handler).dispatchMessage(Message)
> > > line: 99
> > >                 Looper.loop() line: 123
> > >                 ActivityThread.main(String[]) line: 4338
> > >                 Method.invokeNative(Object, Object[], Class, Class[],
> > > Class, int,
> > > boolean) line: not available [native method] [local variables
> > > unavailable]
> > >                 Method.invoke(Object, Object...) line: 521
> > >                 ZygoteInit$MethodAndArgsCaller.run() line: 860
> > >                 ZygoteInit.main(String[]) line: 618
> > >                 NativeStart.main(String[]) line: not available [native
> > > method]
> > >         Thread [<13> Binder Thread #2] (Running)
> > >         Thread [<11> Binder Thread #1] (Running)
> > >         Thread [<15> Binder Thread #3] (Running)- Hide quoted text -
>
> > - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Best Server for Android MultiPlayer Games?

2010-01-19 Thread Kevin Duffey
Wow..where to start. First..I never heard of or looked up those servers you
mentioned. But more importantly, exactly what do you need from the server
side component for your game? Is it to keep track of player locations in the
game world, store all their info, profile, achievements, scores, etc? Give a
little more detail on what you plan to do.

As for doing your own server.. not knowing how as the above post said..it's
not terribly hard if you know one of the server side favorites, like Rails,
php, or Java. The main problem you face is.. where do you host it? If you
run the server at your home.. you run into a number of issues. Does your ISP
allow you to run servers (do they have a policy that says you cant.. do they
run bots to scan all ports to see if you are serving.. etc). If they do
allow you to, now you face the problem of using a static IP, a dynamic IP
routed thru a service like dynDns or no-ip, or actually buying a domain name
and assigning it your static ip (or the dyndns/no-ip info) to route to your
server.

Now once you get it to your server, you've got to worry about scale.. should
you need it. If at all possible you want to remain stateless on the server
side so that you can avoid having to worry about a user that has say a
session (via cookie perhaps) on a server that goes down.. and loses any/all
data they have that was not stored. If you got hundreds of users on a server
like that..you're going to have a lot of pissed of players. So assuming you
remain stateless, then you mostly have to worry about a load balancer (and
that needs to be fault tolerant as well) to round robin between two or more
servers as you scale up.

But, that is all stuff you need to think about once you figure out if you're
going to do your own server side. Remaining stateless a basic server with 4
core cpu and 16GB ram should be able to handle thousands of simultaneous
player accesses.. depending on the data coming in on each request.

As for the right "protocol" to use.. I personally prefer REST. It is the
easiest thing out there to implement on the server side, and at least for
Java, Jersey (bundled with Java Enterprise 6) is very easy to use. It even
supports automatic conversion of json or xml into JAXB objects, so that you
as the developer on the server side do not need to deal with xml or json at
all. AS well, there is a java client library that comes with Jersey that can
be used by clients to send xml or json by turning JAXB objects into xml or
json, depending on the Content-Type heading. I am not sure about Rails, I've
read that it's quite easy to do this as well. Being that I've worked within
the Java server side for years and have been directly working with REST the
past almost two years, it's a real pleasure to be able to work with and it
provides a very solid and yet easy to use API for clients. Even better,
you're not tied to one platform. You can easily make REST calls from
Android, iPhone, Palm, Blackberry, and any other client side technology.

If your game is doing well and you are interested in pursuing this, shoot me
an email directly.




On Tue, Jan 19, 2010 at 1:07 PM, Miguel Morales wrote:

> Hello Atif,
>
> I'm developing my own server for a multi-player game, so I think I can
> weight in with a degree of 'expertise.'
> To start off, I've never heard of any of the servers you mentioned, so
> I'm not going by first hand experience, but rather from the
> information they have on their website.  So, please don't take
> anything I say to be 100% true.
>
> Red5 - Seems overly complex for such a simple project.  Do you need
> streaming?  It seems that's one of its main features.
> It has java examples and bindings so that'll make coding the client
> and server a bit easier since your brain doesn't have to switch
> between Java and something else.
> I don't see anything that would actually help in creating a
> multi-player game, beside mapping data.
> (That is, being able to send data from the android client and the
> server being able to interpret it and something useful with the data.)
> I really can't recommend this for any game development.
>
> Not to mention that there are no specifications as to how efficient it
> is, or how low its latency can be.
>
> ElectroServer 4 - Seems to be primarily an ActionScript/Flash server.
> According to the site: "The ElectroServer API acts as a liaison
> between the game developer and ElectroServer – formatting and
> initializing all transactions that occur between the client and the
> socket-server."
>
> As you can see, this can add a significant amount of overhead/latency
> if this formatting isn't done fast.
>
> "Flash clients written using ActionScript 3 gain even higher
> performance and reduce message size further by using the binary
> protocol."
> So, for ES4, it seems using the binary protocol is the best way to go.
>
> It actually looks fairly simply and complete and just might do the job.
>
> SmartFox - Looks pretty stunning.  Not to mention they had 

[android-developers] Re: Website to app

2010-01-19 Thread Maps.Huge.Info (Maps API Guru)
I would suggest purchasing a subscription to Mark Murphy's excellent
books on Android. There are code examples that do exactly what you're
trying to do, although you will still have to install Eclipse,
download the SDK, etc. in order to run and modify them.

http://wares.commonsware.com/

The subscription is something like $35 and worth every penny.

-John Coryat

"Radar Now!"

"What Zip Code?"
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: AdWhirl - any experience with it?

2010-01-19 Thread Seni Sangrujee
One thing I wish AdMob would do for Android ads is offer House Ads,
which they do for iPhone and mobile web ads.

A House Ad is basically an unpaid ad that you can provide that will
show up in the app during the xx% of the time when AdMob doesn't
provide an ad.  Some use it to advertise other apps they've written,
but I generally use it for an ad saying "upgrade to the paid version
and remove ads" in my free, ad-supported version.

As for Fill Rates, I have almost identical versions of one of my apps
for both Android and the iPhone, and I've noticed that Fill Rates
fluctuate wildly on Android while remaining pretty consistent (and
higher) for my iPhone apps.

App.Date.Fill Rate
Prayers to Share (Android)..1/17.77.63%
Prayers to Share (Android)..1/18.85.20%
Prayers to Share (Android)..1/19.92.32%

Christian Prayer Journal(iPhone)1/17.98.65%
Christian Prayer Journal(iPhone)1/18.98.52%
Christian Prayer Journal(iPhone)1/19.99.47%
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Playing RAW audio on Android from a network stream

2010-01-19 Thread Tanmay
Hey Guys,

I am working on streaming RAW audio from a network location, but
finding it a bit hard. So here is a description on what I am trying to
do :

I want to be listening on a port on my phone for some raw audio data,
that will be sent from a location on my network using netcat. I pretty
much want to perform a netcat listen function on my android and pipe
out the data to the audio hardware. I have looked at the AudioRecord
and AudioTrack classes which give access to raw media and might be
useful in this task.

I was wondering if you could refine the following algorithm for me and
point me to the implementation, as I know a bit of java but not too
confident with using Sockets, Pipes and AudioTrack to do this.

The procedure i am planning to use is:

1) Use a new ServerSocket(port) to listen on particular port.
2) The other side connects to this port using netcat :
3) Make a new Pipe which takes the outputstream from the socket, and
feeds it into the input of the audio hardware.
4) Use methods from AudioTrack to play the raw audio in real time

Any help in this area would be very much appreciated, as I have been
struggling to find anything in this area.

Cheers..
Tanmay

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Need current location long and lat

2010-01-19 Thread Maps.Huge.Info (Maps API Guru)
It's more involved than simply turning on the GPS and getting a
location. You'll have to decide how coarse of a location fix is good
enough too. If you'll accept a location fix of 1000 to 3000 meters,
then you might just skip using GPS and use the network location
service instead. If you need something better than 1000 meters, then
GPS will be the way to go. Another option is a hybrid approach that
uses either depending on which is available and which returns a fix
the fastest. While more complex to setup, the results are worth the
effort.

-John Coryat

"Radar Now!"

"What Zip Code?"
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How long does it take for an application to show up in the Market?

2010-01-19 Thread TreKing
On Tue, Jan 19, 2010 at 3:23 PM, Robert Nekic  wrote:

> I'm guessing it should show up almost immediately since I've
> never read anything about waiting for an approval process.
>

Basically. Usually a few minutes at most.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Nexus one reporting 533 as Height!?!

2010-01-19 Thread Mark Murphy
> I'm testing an app on the nexus one at the moment and notice the get
> height of display function is returning 533 is this some sort of
> compatibility mode resolution?

Probably, if you don't have  set up.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Need current location long and lat

2010-01-19 Thread Frank Weiss
Also, note that getting a fix is intermittent, hence the timestamp.

On Jan 19, 2010 1:23 PM, "TreKing"  wrote:

Have you looked up LocationManager in the documentation?

On Tue, Jan 19, 2010 at 11:05 AM, Nebbie  wrote:

> > > Hi, > > I need the current long and lat. > > getLastKnownLocation will
> not do the job as the inf...
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How long does it take for an application to show up in the Market?

2010-01-19 Thread Robert Nekic
Once you fill out the submission form and upload the apk, assuming the
file is signed properly, etc, how long does it take an application to
show up in the Market?  The Dev Guide doesn't appear to mention this
detail.  I'm guessing it should show up almost immediately since I've
never read anything about waiting for an approval process.





-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Need current location long and lat

2010-01-19 Thread TreKing
Have you looked up LocationManager in the documentation?

On Tue, Jan 19, 2010 at 11:05 AM, Nebbie  wrote:

> Hi,
>
> I need the current long and lat.
>
> getLastKnownLocation will not do the job as the info may be old.
>
> Can someone give me some code examples on how to turn on GPS and get
> the long and lat?
>
> thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Service within a Thread? Thread within a Service?

2010-01-19 Thread Kevin Duffey
One thing you haven't indicated is if you need this remote access when the
app starts, or if you actually need to periodically "wake up" and poll the
remote service? If you only need to have a user start your app.. and at that
point it requests to the remote service once.. or while the app is running,
then using AsyncTask is the way to go. If you need your app to periodically
poll the remote service, than a service may be the way to go. A service
would not require a separate thread that I know of because it is not tied to
a UI. It's a background task, with no UI.

On Tue, Jan 19, 2010 at 1:14 PM, jotobjects  wrote:

> I don't think it will accomplish anything to start a service in a
> thread.  That doesn't make the service run in the thread where it is
> started.  So you are down to one of the options you are considering.
> Ti si also possible to start a service in a separate process but it
> still should not block on its main thread.
>
> Possibly android.os.AsyncTask will be useful for you.
>
> On Jan 18, 5:17 pm, Flapjack  wrote:
> > Please forgive my ignorance, I am new to Java and Android.
> >
> > I would like to retrieve remote data and display it within my
> > activity. To prevent tying up to UI, I understand that I can do this
> > in another thread. (I thought I could just-as-well fetch this remote
> > data from within a service, but that appears to tie up the UI thread
> > also). So now I'm beginning to think I need to either run the logic
> > from a new thread within a service, or run a service within a new
> > thread. But which? I have found many examples online of running new
> > threads or services, but I have yet to find an example of both at the
> > same time.
> >
> > Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Update individual item in listview

2010-01-19 Thread Carl Whalley
You need to be familiar with the ListAdapter. Try here:
http://developerlife.com/tutorials/?p=327

--
Android Academy http://www.androidacademy.com

On Jan 19, 8:28 pm, ls02  wrote:
> How do I update individual row in listview?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Service within a Thread? Thread within a Service?

2010-01-19 Thread jotobjects
I don't think it will accomplish anything to start a service in a
thread.  That doesn't make the service run in the thread where it is
started.  So you are down to one of the options you are considering.
Ti si also possible to start a service in a separate process but it
still should not block on its main thread.

Possibly android.os.AsyncTask will be useful for you.

On Jan 18, 5:17 pm, Flapjack  wrote:
> Please forgive my ignorance, I am new to Java and Android.
>
> I would like to retrieve remote data and display it within my
> activity. To prevent tying up to UI, I understand that I can do this
> in another thread. (I thought I could just-as-well fetch this remote
> data from within a service, but that appears to tie up the UI thread
> also). So now I'm beginning to think I need to either run the logic
> from a new thread within a service, or run a service within a new
> thread. But which? I have found many examples online of running new
> threads or services, but I have yet to find an example of both at the
> same time.
>
> Thanks!
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Nexus one reporting 533 as Height!?!

2010-01-19 Thread Loki117
Hey Guys,

I'm testing an app on the nexus one at the moment and notice the get
height of display function is returning 533 is this some sort of
compatibility mode resolution?

Tom
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Best Server for Android MultiPlayer Games?

2010-01-19 Thread Miguel Morales
Hello Atif,

I'm developing my own server for a multi-player game, so I think I can
weight in with a degree of 'expertise.'
To start off, I've never heard of any of the servers you mentioned, so
I'm not going by first hand experience, but rather from the
information they have on their website.  So, please don't take
anything I say to be 100% true.

Red5 - Seems overly complex for such a simple project.  Do you need
streaming?  It seems that's one of its main features.
It has java examples and bindings so that'll make coding the client
and server a bit easier since your brain doesn't have to switch
between Java and something else.
I don't see anything that would actually help in creating a
multi-player game, beside mapping data.
(That is, being able to send data from the android client and the
server being able to interpret it and something useful with the data.)
I really can't recommend this for any game development.

Not to mention that there are no specifications as to how efficient it
is, or how low its latency can be.

ElectroServer 4 - Seems to be primarily an ActionScript/Flash server.
According to the site: "The ElectroServer API acts as a liaison
between the game developer and ElectroServer – formatting and
initializing all transactions that occur between the client and the
socket-server."

As you can see, this can add a significant amount of overhead/latency
if this formatting isn't done fast.

"Flash clients written using ActionScript 3 gain even higher
performance and reduce message size further by using the binary
protocol."
So, for ES4, it seems using the binary protocol is the best way to go.

It actually looks fairly simply and complete and just might do the job.

SmartFox - Looks pretty stunning.  Not to mention they had mobile
devices in mind when they made it.  So that probably means the
protocol is efficient.
They seem to APIs in a lot of languages.  (Say you want to port your
game to iPhone later.)   This one seems to be the most recommend-able
off-the-shelf server.

However, to me, java and high-performance/low latency don't go
together.  But for your kind of game, it should be more than enough.
There's also nothing like having professional support for a server/platform.

Now, I'm not sure if you even need all those features, or if you
have/are willing to spend the money on them.

I, like a few posters, recommend that you make your own server.  It
really is a lot simpler than you think.
You can do it in php, perl, etc.  It doesn't have to be a new-age language.

You simply encode your data in JSON, send it to the server.
The server performs some basic database operations and returns back
data encoded in JSON.

That's it, doesn't get much simpler than that.  However, you'll have
to code a lot of the logic and be dealing with databases.  (Which is
not a bad skill to have.)

Android has excellent support for JSON.

I say this because sometimes, it's a real headache dealing with
commercial products, specially if it's just a simple card game.  Also,
you'll be keeping most/all the profits.  (Depending on the server's
pricing scheme.)

Scalability, yes it's an issue.  But a lot of the time it's just an
issue of knowing how to break down your game rooms.
For example, you don't expect to have 200,000 users in the same room
at the same time, do you?
200,000 players overall should be feasible using simple JSON.

It's sort of hard to recommend something without knowing more about
your game, but I hope that helps you in some way.

Miguel.



On Mon, Jan 18, 2010 at 9:52 PM, Atif Gulzar  wrote:
> Hi All,
>
> I am developing a multiplayer card game. And currently looking for best
> server. I have R&D on three servers RED5, SmartFox and Elctro Server.
>
> RED5 is open source but you have to right midle tier for android to
> communicate with server.
> SmartFox has inherent Android support.
>
> Would you please share your expert thoughts or point me some other servers.
> Thanks
>
>
>
> --
> Best Regards,
> Atif Gulzar
>
> I  Unicode, ɹɐzlnƃ ɟıʇɐ
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
http://diastrofunk.com, http://developingthedream.blogspot.com/,
http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: JDBC Driver for SQLiteDatabase

2010-01-19 Thread jotobjects
You can just include the Android driver in your application if you
want to be sure that it is available on every device.  You can find
the Android SQLLite driver at this location -

http://android.git.kernel.org/?p=platform/dalvik.git;a=blob;f=libcore/sql/src/main/java/SQLite/JDBCDriver.java;h=63b95ee7197416e41f670b8f5bcb60539a4c48a1;hb=HEAD


On Jan 18, 1:49 am, kristianlm  wrote:
> Hi folks,
>
> I guess we've concluded that the built-in JDBC for Android should not
> be used (even though it's there). Those of you who still want to use
> JDBC on Android can check out the JDBC driver I started myself for
> precisely this reason:
>
> http://code.google.com/p/sqldroid/
>
> It's a relatively simple implementation but does its job: offer jdbc
> access to android sqlite db.
>
> And thanks for all the constructive feedback!
> Kris
>
> On Jan 12, 10:53 pm, jotobjects  wrote:
>
> > On Jan 11, 9:14 pm, Elliott Hughes  wrote:
>
> > > On Dec 19 2009, 2:05 am, kristianlm  wrote:
>
> > > > hi Elliott,
>
> > > > what exactly does it mean that the driver is unsupported and that
> > > > it shouldn't be used?
>
> > > > areyousaying thatJDBCshould not be used at all?
>
> > >youcanuseJDBC,thoughitisn'twelltested.butwedopublicly
> > >supportthejava.sqlAPI.
>
> > Hi Elliott -
>
> > YoucannotuseJDBCifyoucan't get a Connection. Andyoucannot get
> > a Connection unless there is some documented way for the DriverManager
> > to find the SQLite driver.  ASFAIK this would be done by the platform
> > registering the driver, or it is done in a static initializer in the
> > driver class, hence theuseof Class.forName().
>
> > This is the pattern thatyouapparently say is NOT supported -
>
> >             String db = "jdbc:sqlite:" + getFilesDir() + "/test.db";
> >             Class.forName("SQLite.JDBCDriver");
> >             Connection conn = DriverManager.getConnection(db);
>
> > So then what is the correct supported way to get a Connection object?
> > If there is no documented way then maybe it is true thatJDBCis NOT
> > usable on Android currently?
>
> > I don't thinkJDBCis that critical to the platformbutit would be
> > nice to clarify if it is even usable.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Website to app

2010-01-19 Thread TreKing
On Mon, Jan 18, 2010 at 11:47 AM, codeninja  wrote:

> OK, so I have a mobile site I built specifically for his purpose,
> which is sitting online as we speak, but I want to put it in an app..
> so basically I want to have something with a browser in it that will
> only load my site (hiding teh URL off course creating the illusion of
> an app).
>

If you want an app that does nothing but load your website you're going to
have to make an app that does nothing but load your website ...


>  Is there any way to do this quickly and easily with having to install
> eclipse and all that? Maybe a freestanding application that can just
> "frame" a site like that?
>

Um ... not really. How would a "freestanding" application know to load your
site and nothing else? Why would someone make and distribute an app that
loads someone else's website? This really doesn't make any sense.

I hope I'm not asking too much..
>
Sorry, you might be.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to factor code for Free/Paid app versions?

2010-01-19 Thread DulcetTone
I have a project which I want to split into a paid and a free version.

I do not care to double my management of the res/ folder and would
even like the AndroidManifest.xml to be the same file except for the
package line.   Worrying little about hacking (at this stage -- my app
is not copyprotected anyhow so other avenues of vulnerability are
already open), it might be sufficient for me to have all the logic in
the free app, and to enable/disable functions based on the app's own
package info.

What strategies have others used in this regard?

I have soft-linked the source from a new Android Eclipse project
folder tree to the existing one (the new is to become the paid version
and the old one will become the free one with some logic paths being
conditionally stubbed at runtime), reserving the new source file
hierarchy in the new one to the sole purpose of containing an
MyMainActivity.java file (as it will need to be in a different package-
folder than the one for the free app's).   But the res folder appears
as though it might be more difficult.

Ideas?

tone
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Best way to launch Messaging app via intent

2010-01-19 Thread Steve
On Jan 19, 8:47 pm, "dye...@wivsys.com"  wrote:
> When setting the action to ACTION_VIEW and type to "vnd.android-dir/
> mms-sms" on the calling intent, multiple phone numbers can be passed
> via the address attribute using a semi-colon delimited list:

Yes, I am familiar with using the address attribute (set by
intent.putExtra) to specify one or more phone numbers.  It's not
documented, however, so it's not guaranteed to work in the future.
That said, neither is the "body_text" attribute or the mms: / mmsto:
scheme documented either.  I'll raise a request to get these added to
the API documentation and an additional intent filter created so that
there will be an officially documented way to send MMS, supplying
defaults for the addressee list, body text and attachment.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: setContentView fails when creating a new activity

2010-01-19 Thread Robert Nekic
I've tried to reply to this thread twice today but it refuses to show
up here.  Maybe the third time will work:

I find that, for me, exceptions triggered by setContentView are often
simple oversights in the layout file, such as a missing layout_width
or layout_height on one of my view declarations in the xml.




On Jan 19, 3:34 pm, schwiz  wrote:
> what else is going on in onCreate?  are you hiding the title bar?
>
> On Jan 19, 12:12 pm, oregonduckman  wrote:
>
>
>
> > My code is calling setContentView(R.layout.someLayoutID); from an
> > activities' onCreate method. The activity is launched with the
> > following:
> >                         Intent myIntent = new Intent(this,
> > myClass.class);
> >                         try
> >                         {
> >                                 this.startActivity(myIntent);
> >                         }
> >                         catch(ActivityNotFoundException e)
> >                         {
> >                                 e.toString();
> >                         }
> > The activity is declared in the manifest file as
> > 
>
> > The call to setContentView results in the following:
> > DalvikVM[localhost:8656]
> >         Thread [<3> main] (Suspended (exception RuntimeException))
> >                 ActivityThread.performLaunchActivity(ActivityThread
> > $ActivityRecord,
> > Intent) line: 2481
> >                 ActivityThread.handleLaunchActivity(ActivityThread
> > $ActivityRecord,
> > Intent) line: 2497
> >                 ActivityThread.access$2200(ActivityThread,
> > ActivityThread
> > $ActivityRecord, Intent) line: 119
> >                 ActivityThread$H.handleMessage(Message) line: 1848
> >                 ActivityThread$H(Handler).dispatchMessage(Message)
> > line: 99
> >                 Looper.loop() line: 123
> >                 ActivityThread.main(String[]) line: 4338
> >                 Method.invokeNative(Object, Object[], Class, Class[],
> > Class, int,
> > boolean) line: not available [native method] [local variables
> > unavailable]
> >                 Method.invoke(Object, Object...) line: 521
> >                 ZygoteInit$MethodAndArgsCaller.run() line: 860
> >                 ZygoteInit.main(String[]) line: 618
> >                 NativeStart.main(String[]) line: not available [native
> > method]
> >         Thread [<13> Binder Thread #2] (Running)
> >         Thread [<11> Binder Thread #1] (Running)
> >         Thread [<15> Binder Thread #3] (Running)- Hide quoted text -
>
> - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: ATTENTION ANDROID TEAM: Take back control of Android.

2010-01-19 Thread Greg Donald
On Tue, Jan 19, 2010 at 2:31 PM, TreKing  wrote:
> 2 screenshot limit ...

No option for landscape orientation on those two screen shots either.
To assume everyone will build a portrait oriented app is very short
sighted.

> 3 - Reminds users that there are so many variations of phones and Android
> versions that it's pretty much impossible for me test everything

It's like reliving the past decade of fighting browser compatibility
issues.  Only this time around I don't know where to put my ie6.css
file.


-- 
Greg Donald
destiney.com | gregdonald.com
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Unable to run emulators with SDKs 2.0, 2.0.1, or 2.1 - all hang on startup

2010-01-19 Thread Matt
Hi, I'm having a problem.  I had the regular 1.6 SDK installed and
have been developing using Eclipse 3.5 on Windows XP with no
problems.  Using the Android ADB manager, I installed newer SDKs:

SDK Platform Android 2.0, API 5 (tools rev: 3)
SDK Platform Android 2.0.1, API 6 (tools rev: 4)
SDK Platform Android 2.1, API 7 (tools rev: 4)

Now, I create a new Virtual Device with any of the above targets.  No
emulator will start, no matter if I change the skin, use an SD card or
not.  Nor will using "emulator -avd" from the command line have any
difference with starting it via Eclipse.  And of course I have also
tried to restart my computer as well.

Most emulators never get past the "A N D R O I D _" text, and give no
logcat output.  The one emulator that will actually give me logcat
output (due to it going online, according to the device manager) is
2.0.1

For the 2.0.1 emulator, it does show the flashing ANDROID logo, but
never makes it to the Android desktop.  The last logcat output that
appears with 2.0.1 is:

DEBUG/dalvikvm(98): No JNI_OnLoad found in /system/lib/libwnndict.so
0x43b74718
DEBUG/dalvikvm(98): +++ not scanning '/system/lib/libwebcore.so' for
'createWnnWork' (wrong CL)
DEBUG/dalvikvm(98): +++ not scanning '/system/lib/libmedia_jni.so' for
'createWnnWork' (wrong CL)
...
(about 40 lines of "not scanning /system/lib/* for various methods
such as setApproxPattern)
...
DEBUG/dalvikvm(98): +++ not scanning '/system/lib/libsrec_jni.so' for
'getRightPartOfSpeechSpecifiedType' (wrong CL)
DEBUG/dalvikvm(58): GC freed 1129 objects / 76048 bytes in 266ms

Can anyone offer any advice on why no emulator past 1.6 will startup
on my machine?  I will provide more info if anyone is curious, I just
didn't want to spam a whole bunch of log files.

Thanks!
-Matt
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: setContentView fails when creating a new activity

2010-01-19 Thread schwiz
what else is going on in onCreate?  are you hiding the title bar?

On Jan 19, 12:12 pm, oregonduckman  wrote:
> My code is calling setContentView(R.layout.someLayoutID); from an
> activities' onCreate method. The activity is launched with the
> following:
>                         Intent myIntent = new Intent(this,
> myClass.class);
>                         try
>                         {
>                                 this.startActivity(myIntent);
>                         }
>                         catch(ActivityNotFoundException e)
>                         {
>                                 e.toString();
>                         }
> The activity is declared in the manifest file as
> 
>
> The call to setContentView results in the following:
> DalvikVM[localhost:8656]
>         Thread [<3> main] (Suspended (exception RuntimeException))
>                 ActivityThread.performLaunchActivity(ActivityThread
> $ActivityRecord,
> Intent) line: 2481
>                 ActivityThread.handleLaunchActivity(ActivityThread
> $ActivityRecord,
> Intent) line: 2497
>                 ActivityThread.access$2200(ActivityThread,
> ActivityThread
> $ActivityRecord, Intent) line: 119
>                 ActivityThread$H.handleMessage(Message) line: 1848
>                 ActivityThread$H(Handler).dispatchMessage(Message)
> line: 99
>                 Looper.loop() line: 123
>                 ActivityThread.main(String[]) line: 4338
>                 Method.invokeNative(Object, Object[], Class, Class[],
> Class, int,
> boolean) line: not available [native method] [local variables
> unavailable]
>                 Method.invoke(Object, Object...) line: 521
>                 ZygoteInit$MethodAndArgsCaller.run() line: 860
>                 ZygoteInit.main(String[]) line: 618
>                 NativeStart.main(String[]) line: not available [native
> method]
>         Thread [<13> Binder Thread #2] (Running)
>         Thread [<11> Binder Thread #1] (Running)
>         Thread [<15> Binder Thread #3] (Running)
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[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  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
> visualization wallpapers, but I'm not sure there's an API to get the
> audio output data from the device. I know you can use AudioRecords to
> get this sort of data from microphones. Anyone know if there's a way
> to manage it for a device's output?
>
> Thanks!
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: ATTENTION ANDROID TEAM: Take back control of Android.

2010-01-19 Thread TreKing
Very interesting thread so far. I completely agree with the sentiment that
continuing to develop and support an app on Android with all the differences
in platforms and versions available is making a developer's life difficult.
Especially with the complete lack of basic but essential functionality in
the Android Market (no way to see comments in the console, no way respond to
comments, STILL stuck with 325 character limit, 2 screenshot limit ... the
list goes on and on).

Regarding the issue of getting low ratings on the Market because of all
these variations: personally, I've given up on waiting for the Market team
to address these issues and have, instead, used the only means I have to
communicate with users - the app itself. With each update I show users a
series of dialogs that:

1 - Provide a detailed account of what's new in each release with clear
instructions on how to use the new features or what bugs were fixed
(something that, as a user, annoys me that more developers don't do). This
also saves me from wasting any of my precious 325 characters on what's new.

2 - Lists all negative comments on the market with a response from me for
each so users know I take that feedback seriously and am aware of their
issue. Yeah, you can respond to the the latest comment on the market with
your own, but you can only leave one comment at any given time and that
leaves others unaccounted for. Plus, many people leave comments and never
bother updating or checking in again. This way it's in their face so to
speak when they update and serves as a reminder to update their comments
(assuming they haven't un-installed and moved on).

3 - Reminds users that there are so many variations of phones and Android
versions that it's pretty much impossible for me test everything, that I
have no way of responding to these market comments, and if they have any
issues or questions they should email me and give me the chance to fix their
issues before leaving comments.

I find this to work very well. I don't have a single "Force Closed.
Uninstalled" 1 star comment on my apps. In fact, quite the opposite, I get
quite a few high ratings for providing good support.

Remember, most users have no idea what we as developers have to deal with.
All they know is whether your app works or not on their particular device
and that the market is the quickest and easiest way to leave you feedback
(especially if they're having issues). Ideally Google would have all these
issues ironed out but that's obviously not realistic so it's up to you to
educate them on the limitations you have to work with.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Update individual item in listview

2010-01-19 Thread ls02
How do I update individual row in listview?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[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  wrote:
> I am currently trying to make my app compliant with all screen sizes /
> api levels.
>
> I have this mostly working, however there is 1 issue i cannot resolve:
>
> Layouts in the "layout-hdpi" folder are used by and any phone on 1.5
> (API level 3).  - Which i dont want, i want API level 3 phones to use
> the "layout" folder.  So to resolve this I added "-v4" onto the folder
> also, this works, the folder is no longer used by 1.5 phones.
>
> However, now the folder is also not used on API Level 6 phones, for
> example the droid.  The droid only picks up the folder if i name the
> folder: "layout-hdpi-v6".  (Also if i put "-v3" on a folder, the
> layout folder is not used by API level 4 phones)
>
> My understanding is that the -v qualifer allows you to
> exclude phones on an API level that is too low, so -v4 should mean
> that the folder will be used by all phones on API level 4 and above.
> I am finding a folder is only used for that specific API level.
>
> Has anybody else ran into this same issue? And does anybody know of
> any possible solutions?
>
> I hope that makes sense.
>
> Marc
>
> My current manifest file has the following:
>
> 
>
> and my resources folder list is:
>
> drawable
> drawable-hdpi
> drawable-ldpi
> layout
> layout-hdpi-v4
> layout-ldpi-v4
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: UPnP

2010-01-19 Thread Abhi
Anyone has any clue about this?

On Jan 19, 10:01 am, Abhi  wrote:
> Hi,
>
> Does anyone have any idea on implementing UPnP in Android? I am
> working on a Project for which I need my Android phone to talk to UPnP
> devices directly.
>
> Thanks,
>
> Abhi
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Help with Camera.Parameters.getFlashMode()

2010-01-19 Thread tikky
All,
I am developing an app that uses the phone camera, and I want to set
the Flash Mode, if flash exists.
>From documentation, it looks like I need to call
Camera.Parameters.getFlashMode() and check if it returns null to
determine if flash exists.
Note: getFlashMode() is supported from API level 5

However, when I try to run this app on a phone with cupcake, I get an
error:
01-19 14:02:43.404: ERROR/dalvikvm(18891): Could not find method
android.hardware.Camera$Parameters.getFlashMode, referenced from
method ...

I tried to call this code based on SDK version as follows, but that
does not work either. Looks like there is a class verification  thats
fails at init:

import android.os.Build.VERSION;

  int mSdkVersion = VERSION.SDK_INT;
  Camera.Parameters params = mCamera.getParameters();
  if (mSdkVersion >=5 && params.getFlashMode()!=null){

params.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO);//set auto
flash
  }

So now I am wondering if there is any other way to check if flash
exists? or is there a way to conditionally compile code based on
mSdkVersion?



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Regarding SharedPreferences

2010-01-19 Thread Brion Emde
I gave an answer to your questions in your earlier question on this
topic, a few threads back.

On Jan 19, 5:49 am, pranav09  wrote:
> Hi,
>
> Can you give me an example with the use of SharedPrefereneces which
> store and retrieve the email and password by calling .net web service?
>
> Thanks.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Best way to launch Messaging app via intent

2010-01-19 Thread jotobjects

On Jan 17, 4:42 pm, Steve  wrote:

> Is there a more appropriate forum to make requests for Android
> platform enhancements?

Yes, add a feature request here -

http://code.google.com/p/android/issues/entry?template=Developer%20defect%20report

Bear in mind the followup might not be what you want - for instance
the reply might be a description of why the feature is not possible or
not high priority, etc.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Installing app on android device

2010-01-19 Thread Robert Nekic
Now that I think about it...I seem to recall having trouble getting
Astro to launch an apk.  I eventually installed a different file
manager app from the Market, cleverly called "File Manager".  I don't
like the app very much but it does launch my apk.





On Jan 19, 2:35 pm, Robert Nekic  wrote:
> I've heard Archos killed some functionality regarding debugging/
> development with the Archos 5 Internet Tablet.  If you go to Settings,
> Applications, do you see a checkbox  at the top of the list for
> "Unknown sources"?  You probably have to uncheck that to get your apk
> to run.   Also, does that same Application settings list have a
> Development option at the bottom of the list?
>
> On Jan 19, 1:14 pm, fourk xav  wrote:
>
>
>
> > Thanks guys !
> > I manage to copy the apk already into my Archos, but when I launch it, it
> > won't install. Error message saying, the application can not be installed on
> > this device... but it works perfectly on the emulator...
> > any ideas?
>
> > On Tue, Jan 19, 2010 at 7:07 PM, String 
> > wrote:
>
> > > On Jan 19, 2:43 pm, fourk xav  wrote:
>
> > > > What about if you want to run the application on your DISCONNECTED
> > > device?
>
> > > You need to get the APK to the device somehow. By far the most direct
> > > method is via USB, but if this isn't an option for some reason, you
> > > still need to bridge that gap. Some possibilities:
>
> > > - Copy the APK to an SD card on your development computer, then mount
> > > that card on your phone and open th APK file using a File Manager app.
> > > - Upload the APK file to a web server, then browse to its URL using
> > > the browser on the device.
>
> > > There are probably other means, but you will need to get the APK file
> > > to the device one way or another.
>
> > > String
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Installing app on android device

2010-01-19 Thread Robert Nekic
I've heard Archos killed some functionality regarding debugging/
development with the Archos 5 Internet Tablet.  If you go to Settings,
Applications, do you see a checkbox  at the top of the list for
"Unknown sources"?  You probably have to uncheck that to get your apk
to run.   Also, does that same Application settings list have a
Development option at the bottom of the list?



On Jan 19, 1:14 pm, fourk xav  wrote:
> Thanks guys !
> I manage to copy the apk already into my Archos, but when I launch it, it
> won't install. Error message saying, the application can not be installed on
> this device... but it works perfectly on the emulator...
> any ideas?
>
> On Tue, Jan 19, 2010 at 7:07 PM, String wrote:
>
>
>
> > On Jan 19, 2:43 pm, fourk xav  wrote:
>
> > > What about if you want to run the application on your DISCONNECTED
> > device?
>
> > You need to get the APK to the device somehow. By far the most direct
> > method is via USB, but if this isn't an option for some reason, you
> > still need to bridge that gap. Some possibilities:
>
> > - Copy the APK to an SD card on your development computer, then mount
> > that card on your phone and open th APK file using a File Manager app.
> > - Upload the APK file to a web server, then browse to its URL using
> > the browser on the device.
>
> > There are probably other means, but you will need to get the APK file
> > to the device one way or another.
>
> > String
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: ATTENTION ANDROID TEAM: Take back control of Android.

2010-01-19 Thread Dan Sherman
Check google for "Android Remote Stacktrace".

On Tue, Jan 19, 2010 at 12:41 PM, Laszlo Szucs  wrote:

> I think it would be a great help for the developers to create an
> Automated Crash Report System for published applications.
>
> When an application crashes, and the message dialog pops up with the
> famous "Force Close" button, there could be one another button with
> text: "Send Report", like in other applications, we saw before (for
> example: FireFox), and when the user presses the "Send Report" button,
> the system would open up the default mail application, and would
> precompose a message to the author of the application, with subject:
> ANDROID CRASH REPORT -  - Device Type.
> The body of the e-mail would be the Exception's stack trace, or a more
> detailed log about the current activities, like the one, which the
> third party SendLog creates.
>
> Most user won't click on the  "Send Report" button, but if some do,
> they still have the control over if they want to send the report or
> not, and what does it contains actually about their phone's state.
>
> Naturally this Automated Crash Report System could only help in the
> most fatal cases.
> For testing on actual devices I would prefer a subscription based
> Device Anywhere kind of service.
>
> L
>
> On jan. 19, 09:32, String  wrote:
> > Problem is, half the time we don't know. Users post 1* Market comments
> > saying "Force closes on Droid" or "Doesn't work on Samsung Moment",
> > and unless you have that specific handset to test on, you're SOL. You
> > "sanity check" on an emulator instance of the same resolution and OS
> > version, and nothing is obviously broken, so where do you go?
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Starting Google Maps at pre-specified location

2010-01-19 Thread Brion Emde
Take a look at the Google Map Intents in this document. It is possible
to construct location string and business search strings, as well as
location based queries:

http://developer.android.com/guide/appendix/g-app-intents.html


On Jan 17, 2:46 pm, Denis <87elem...@gmail.com> wrote:
> Hi Group,
>
> I have one problem with Google Maps, while opening them at some
> location. How could that be possible for user to specify city first
> (e.g. type in EditText field "London") then press a button and see
> London on the map? I've succeded in opening GMaps at some pre-
> specified location, but only using coordinates:(. Cannot find anything
> on topic.
>
> Thanks in advance!
>
> Denis
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

  1   2   3   >