forked from github/cordova-android
Update for getActivity().
This commit is contained in:
parent
0d32115c3f
commit
441785b51d
@ -69,9 +69,9 @@ public class ActivityPlugin extends Plugin {
|
|||||||
|
|
||||||
public void startActivity(String className) {
|
public void startActivity(String className) {
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent().setClass(this.ctx, Class.forName(className));
|
Intent intent = new Intent().setClass(this.ctx.getActivity(), Class.forName(className));
|
||||||
LOG.d(TAG, "Starting activity %s", className);
|
LOG.d(TAG, "Starting activity %s", className);
|
||||||
this.ctx.startActivity(intent);
|
this.ctx.getActivity().startActivity(intent);
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
LOG.e(TAG, "Error starting activity %s", className);
|
LOG.e(TAG, "Error starting activity %s", className);
|
||||||
|
Loading…
Reference in New Issue
Block a user