mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
@@ -73,7 +73,7 @@ public class WebIntent extends Plugin {
|
||||
if (args.length() != 1) {
|
||||
return new PluginResult(PluginResult.Status.INVALID_ACTION);
|
||||
}
|
||||
Intent i = ((DroidGap)this.cordova.getContext()).getIntent();
|
||||
Intent i = cordova.getActivity().getIntent();
|
||||
String extraName = args.getString(0);
|
||||
return new PluginResult(PluginResult.Status.OK, i.hasExtra(extraName));
|
||||
|
||||
@@ -81,7 +81,7 @@ public class WebIntent extends Plugin {
|
||||
if (args.length() != 1) {
|
||||
return new PluginResult(PluginResult.Status.INVALID_ACTION);
|
||||
}
|
||||
Intent i = ((DroidGap)this.cordova.getContext()).getIntent();
|
||||
Intent i = cordova.getActivity().getIntent();
|
||||
String extraName = args.getString(0);
|
||||
if (i.hasExtra(extraName)) {
|
||||
return new PluginResult(PluginResult.Status.OK, i.getStringExtra(extraName));
|
||||
@@ -93,7 +93,7 @@ public class WebIntent extends Plugin {
|
||||
return new PluginResult(PluginResult.Status.INVALID_ACTION);
|
||||
}
|
||||
|
||||
Intent i = ((DroidGap)this.cordova.getContext()).getIntent();
|
||||
Intent i = cordova.getActivity().getIntent();
|
||||
String uri = i.getDataString();
|
||||
return new PluginResult(PluginResult.Status.OK, uri);
|
||||
} else if (action.equals("onNewIntent")) {
|
||||
@@ -184,6 +184,6 @@ public class WebIntent extends Plugin {
|
||||
intent.putExtra(key, value);
|
||||
}
|
||||
|
||||
((DroidGap)this.cordova.getContext()).sendBroadcast(intent);
|
||||
cordova.getActivity().sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user