的Android
- 绘图的初始化成功完成,纬度和经度也会在调试日志中打印出来。
- 但是在Android 5.1 +中没有触发MyNotificationOpenReceiver。
在清单中:
<receiver android:exported="false" android:name=".MyNotificationOpenReceiver">
<intent-filter>
<action android:name="com.activationmobileapp.ready2ride.plot.OpenNotification" />
</intent-filter>
</receiver>
接收者类:
public class MyNotificationOpenReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
FilterableNotification notification = intent.getParcelableExtra("notification");
if (notification.getData() == null)
return;
Intent openIntent = new Intent(context, MainActivity.class);
openIntent.setAction("com.activationmobileapp.ready2ride.plot.OpenNotification");
openIntent.putExtras(intent.getExtras());
openIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
Log.e("debug", "onReceive: " );
context.startActivity(openIntent);
}
}
主要活动:
Plot.init(this);
的gradle:
compile 'com.plotprojects:plot-android:2.3.0-beta'