[android-developers] Re: How can I catch screen orientation change in onPause()?

2010-05-10 Thread Lenny
Maybe what you really want is to tell Android that your app will
handle orientation changes on its own, rather than messing around with
onPause
http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges

On Apr 23, 10:01 am, Thom Shutt thomshuttimper...@googlemail.com
wrote:
 Specifically, I need a way of _not_ performing the onPause
 functionality I've implemented when it occurs because of a change in
 screen orientation.

 Thanks -- Thom

 --
 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 
 athttp://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] com.google.gdata.client.GoogleService.setUserToken(android.accounts.AccountManager.getAuthToken(???))

2010-01-13 Thread Lenny
Hello,

I'm new to Android development, but so far enjoying porting an app I'd
previously built in JavaScript using the Google Data API (for
Finance). However, I can't seem to figure out how to authenticate the
Android user's Google account.

I've got code retrieving feeds from a user's Google Finance
portfolios, but I had to use setUserCredentials(username,password).
What I'd like to do is avoid asking the user for their username/
password since the Android device already has access to their Google
account.

I believe I should be able to do this with setUserToken(String), but I
can't figure out how to get the appropriate token from Android. I've
tried AccountManager.get(context).blockingGetAuthToken() but that's
either not the correct call or I'm passing it the wrong arguments.

Manifest file requests the following permissions: android.permission.
{USE_CREDENTIALS|GET_ACCOUNTS}

Has anyone gotten gdata working with the user's existing Google
credentials on the phone?

Thanks in advance, Lenny
-- 
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] Android Service Problem

2009-07-13 Thread Lenny

I'm new to using Services in Android I followed a tutorial, but the
service doesn't seem to be starting.

the problem I'm having is that the onServiceConnected method never
fires so mpInterface never gets assigned.
However, I can't seem to figure out why I've looked at several
examples and they all seem to be doing exactly what I am. What am I
missing?

INFO:

I'm using SDK v1.5

I'm using Eclipse which finds no errors

showAlert is a simple message box function I use for debugging in the
application

The application basically just needs to play audio files, but needs to
keep playing even if the user is doing other things on their phone (if
there is another way to achieve this I'm all ears)


CODE:

AndroidManifest.xml:

service android:name=.NSService /

NSPlayer.java:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

conn = new CounterServiceConnection();
this.bindService(new Intent(NSPlayer.this,NSService.class),
conn, Context.BIND_AUTO_CREATE);


..

private NSSInterface mpInterface;
private CounterServiceConnection conn;

class CounterServiceConnection implements ServiceConnection {
public void onServiceConnected(ComponentName name, IBinder
service) {
// TODO Auto-generated method stub
mpInterface = NSSInterface.Stub.asInterface((IBinder)service);
showAlert(Just so you know,mpInterface was
bound,Ooook!);
}

public void onServiceDisconnected(ComponentName name) {
// TODO Auto-generated method stub
mpInterface = null;
showAlert(Just so you know,mpInterface was
UNbound,Ooook!);
}
};


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---