在android中使用透明视图对传入的调用进行活动

时间:2011-12-23 16:32:02

标签: android android-layout

我想在来电屏幕上显示一种弹出窗口。这是我的代码,基本上我正在获取电话号码,制作另一个帖子并在日志中显示它。

public class CustomBroadcastReceiver extends BroadcastReceiver {

private static final String TAG = "CustomBroadcastReceiver";

@Override
public void onReceive(Context context, Intent intent) {
      //  Log.v(TAG, "WE ARE INSIDE!!!!!!!!!!!");
    TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
        CustomPhoneStateListener customPhoneListener = new CustomPhoneStateListener();

    telephony.listen(customPhoneListener, PhoneStateListener.LISTEN_CALL_STATE);
    Bundle bundle = intent.getExtras();
    String phoneNr= bundle.getString("incoming_number");
    Log.v(TAG, "phoneNr: "+phoneNr);
    TestAsyncTask myATask = new TestAsyncTask();
    myATask.execute("one", "two", "three", "four");
    //someActivity some = new someActivity();

}

我被告知我需要处理.Delay()我的方法大约1-2秒,以便让我的应用程序缩放悬停来电屏幕以及我的活动不应该有视图。

我对Android有点新手,是否有人可以提供与我的问题相关的示例或链接?

0 个答案:

没有答案