2013-06-06 22 views
0

我正在LBS上做一个应用程序,我想要做的是如果用户在特定地理点的一公里内做出弹出窗口。Multiple Proximity Intents

我使用的代码

Intent intent = new Intent(PROX_ALERT_INTENT); 
    PendingIntent proximityIntent = PendingIntent.getBroadcast(this, 0, intent, 0); 

    locationManager.addProximityAlert(
     latitude, // the latitude of the central point of the alert region 
     longitude, // the longitude of the central point of the alert region 
     POINT_RADIUS, // the radius of the central point of the alert region, in meters 
     PROX_ALERT_EXPIRATION, // time for this proximity alert, in milliseconds, or -1 to indicate no expiration 
     proximityIntent // will be used to generate an Intent to fire when entry to or exit from the alert region is detected 
    ); 

Throgh这个我可以设置快讯一个位置我要创建它的多个位置。

回答

1

对于这种情况,您必须使用广播接收器

this可能会帮到你..