public class ABC extends Activity{
public void foo(int val)
{
}
...
public static class Receive extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
....
}
}
...
}
任何人都可以帮助我如何从接收课程的foo()
拨打onReceive()
答案 0 :(得分:1)
int compare(T o1, T o2);
boolean equals(Object obj); // inherited from Object class
// and a lot of concrete methods more
答案 1 :(得分:0)
将public void foo(int val)
移至班级Receive
答案 2 :(得分:0)
如果你不能使foo方法静态,那么你可以从接收类中删除静态。
public class Receive extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
}
}