0
如何將(添加)proximityalert的意圖轉化爲廣播接收者? 以及如何使接受方法工作?如何將(添加)proximityalert的意圖轉化爲廣播接收者?
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);