如何在一个静态方法中使用startactivity(intent)?
想在一个子线程中开启一个新的activity,但是这个子线程的方法是静态的,无法使用非静态方法startactivity()。Cannot make a static reference to the non-static method startActivity(Intent) from the type Activity。
th = new Thread() {
public void run() {
这里面定时扫描得到一个数据
};
th.start();
handler = new Handler() {
@Override
public void handleMessage(Message msg) {
Bundle bundle = msg.getData();
现在想得到这个数据之后就startactivity开启一个新的activity,但是startactivity是一个非静态方法
};