0

(追加)近接アラートからブロードキャストレシーバーにインテントを取得する方法は?onreceiveメソッドを機能させる方法は?

Intent locationNotific = new Intent("SendProximityIntent");
    locationNotific.putExtra("RowID", id);
    sendBroadcast(locationNotific);
    PendingIntent lPendingIntent = PendingIntent.getActivity(this, 0, locationNotific, 0);

       IntentFilter filter = new IntentFilter("SendProximityIntent"); 

       registerReceiver(new ProximityIntentReceiver(), filter);


    lm.addProximityAlert((double) locationAlertGeoP.getLatitudeE6(),(double) locationAlertGeoP.getLongitudeE6(), (float) 999999999,(long) 100000,lPendingIntent);
4

1 に答える 1

1

(追加)近接アラートからブロードキャストレシーバーにインテントを取得する方法は?

getBroadcast()の代わりに使用し、マニフェスト登録済みgetActivity()の識別情報を提供します。IntentBroadcastReceiver

于 2011-11-26T14:02:41.980 に答える