use of net.osmand.plus.audionotes.AudioVideoNotesPlugin in project Osmand by osmandapp.
the class OsmandAidlApi method registerStartVideoRecordingReceiver.
private void registerStartVideoRecordingReceiver(final MapActivity mapActivity) {
startVideoRecordingReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final AudioVideoNotesPlugin plugin = OsmandPlugin.getEnabledPlugin(AudioVideoNotesPlugin.class);
if (plugin != null) {
double lat = intent.getDoubleExtra(AIDL_LATITUDE, Double.NaN);
double lon = intent.getDoubleExtra(AIDL_LONGITUDE, Double.NaN);
plugin.recordVideo(lat, lon, mapActivity, true);
}
}
};
mapActivity.registerReceiver(startVideoRecordingReceiver, new IntentFilter(AIDL_START_VIDEO_RECORDING));
}
Aggregations