List of usage examples for org.apache.cordova CordovaInterface setActivityResultCallback
abstract public void setActivityResultCallback(CordovaPlugin plugin);
From source file:br.com.futuring.cordova.plugins.GooglePlayGame.java
License:Apache License
@Override public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); Activity cordovaActivity = cordova.getActivity(); googlePlayServicesReturnCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(cordovaActivity); if (googlePlayServicesReturnCode == ConnectionResult.SUCCESS) { gameHelper = new GameHelper(cordovaActivity, BaseGameActivity.CLIENT_GAMES); gameHelper.setup(this); } else {/*from w w w.ja va 2 s . c o m*/ Log.w(LOGTAG, String.format("GooglePlayServices not available. Error: '" + GooglePlayServicesUtil.getErrorString(googlePlayServicesReturnCode) + "'. Error Code: " + googlePlayServicesReturnCode)); } cordova.setActivityResultCallback(this); }
From source file:com.berriart.cordova.plugins.PlayGamesServices.java
License:Apache License
@Override public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); Activity cordovaActivity = cordova.getActivity(); googlePlayServicesReturnCode = GoogleApiAvailability.getInstance() .isGooglePlayServicesAvailable(cordovaActivity); if (googlePlayServicesReturnCode == ConnectionResult.SUCCESS) { gameHelper = new GameHelper(cordovaActivity, BaseGameActivity.CLIENT_GAMES); gameHelper.setup(this); } else {//from w w w .j av a2s.c o m Log.w(LOGTAG, String.format("GooglePlayServices not available. Error: '" + GoogleApiAvailability.getInstance().getErrorString(googlePlayServicesReturnCode) + "'. Error Code: " + googlePlayServicesReturnCode)); } cordova.setActivityResultCallback(this); }
From source file:com.intel.xdk.facebook.IntelXDKFacebook.java
License:Apache License
@Override public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); //get convenience reference to activity activity = cordova.getActivity();//w w w . ja v a2s. com sharedContext = activity; cordova.setActivityResultCallback(this); /*this.session = Session.getActiveSession(); if (this.session == null) { this.session = new Session(activity); }*/ /* StatusCallback callback = new StatusCallback() { public void call(Session session, SessionState state, Exception exception) { if (exception != null) { } } };*/ //Session.setActiveSession(this.session); this.session = createSession(); /*if (session.getState().equals(SessionState.CREATED_TOKEN_LOADED)) { session.openForRead(new Session.OpenRequest(activity).setCallback(callback)); }*/ }