Hi.
I'm trying to initialize OpenFeint in my game like this:
-
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
OpenFeintSettings settings = new OpenFeintSettings("xxx",
"xxx",
Try this:
create handler as member variable of your activity;
private Handler h = new Handler();
and then in the onCreate method:
h.post(
new Runnable(){
}
);
On Mon, Sep 27, 2010 at 9:38 AM, Kakyoin wrote:
> Hi.
>
> I'm trying to initialize OpenFeint in my game like this:
>
Sorry last solution sent you is wrong since the handler was
instantiated in the UI thread, here's the correct one:
create a subclass MyThread like this:
class MyThread extends Thread{
public Handler h;
private CountDo
class MyThread extends Thread{
public Handler h;
private CountDownLatch wait = new CountDownLatch(1);
@Override
public void run() {
Looper.prepare();
hi,
The problem with this is ur trying to do some manipulations in the thread
which is not allowed hence create a handler and just pass an empty message
from th thread to the handler, where u can write ur code. Thus avoiding the
exception of looper.prepare()
--
You received this message because
5 matches
Mail list logo