【发布时间】:2012-01-11 17:17:03
【问题描述】:
我无法在“addProximityAlert”中添加我在意图中添加的额外内容
locationNotific.putExtra("name", "ofek");
// sendBroadcast(locationNotific); (I can get the extras)
PendingIntent lPendingIntent = PendingIntent.getBroadcast(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);
广播接收器:
public void onReceive(Context context, Intent intent) {
IDForNotificationString = intent.getStringExtra("name");
//MA.notification(IDForNotificationString);
【问题讨论】:
-
请不要转发同样的问题。如果您有其他信息,请改为编辑您的原始问题。
标签: java android methods android-intent proximity