// Path: android/src/com/marpies/ane/vk/VKExtensionContext.java
// public class VKExtensionContext extends FREContext {
// 
// 	@Override
// 	public Map<String, FREFunction> getFunctions() {
// 		Map<String, FREFunction> functions = new HashMap<String, FREFunction>();
// 
// 		functions.put( "init", new InitFunction() );
// 		functions.put( "auth", new AuthFunction() );
// 		functions.put( "isLoggedIn", new IsLoggedInFunction() );
// 		functions.put( "logout", new LogoutFunction() );
// 		functions.put( "request", new RequestFunction() );
// 		functions.put( "share", new ShareFunction() );
// 		functions.put( "applicationOpenURL", new ApplicationOpenURLFunction() );
// 		functions.put( "sdkVersion", new GetSDKVersion() );
// 
// 		return functions;
// 	}
// 
// 	@Override
// 	public void dispose() {
// 		AIR.stopAccessTokenTracker();
// 		AIR.setContext( null );
// 	}
// }
// 
// Path: android/src/com/marpies/ane/vk/data/AIRVKEvent.java
// public class AIRVKEvent {
// 
// 	public static final String VK_AUTH_ERROR = "vkAuthError";
// 	public static final String VK_AUTH_SUCCESS = "vkAuthSuccess";
// 	public static final String VK_TOKEN_UPDATE = "vkTokenUpdate";
// 	public static final String VK_REQUEST_SUCCESS = "vkRequestSuccess";
// 	public static final String VK_REQUEST_ERROR = "vkRequestError";
// 	public static final String VK_SHARE_COMPLETE = "vkShareComplete";
// 	public static final String VK_SHARE_CANCEL = "vkShareCancel";
// 	public static final String VK_SHARE_ERROR = "vkShareError";
// 
// }


import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import com.marpies.ane.vk.VKExtensionContext;
import com.marpies.ane.vk.data.AIRVKEvent;
import com.vk.sdk.VKAccessToken;
import com.vk.sdk.VKAccessTokenTracker;
		}
		mContext.getActivity().startActivity( intent );
	}

	public static void notifyTokenChange( VKAccessToken newToken ) {
		dispatchTokenChange( null, newToken );
	}

	public static void startAccessTokenTracker() {
		if( mTokenTracker == null ) {
			mTokenTracker = new VKAccessTokenTracker() {
				@Override
				public void onVKAccessTokenChanged( @Nullable VKAccessToken oldToken, @Nullable VKAccessToken newToken ) {
					dispatchTokenChange( oldToken, newToken );
				}
			};
			mTokenTracker.startTracking();
		}
	}

	public static void stopAccessTokenTracker() {
		if( mTokenTracker != null ) {
			mTokenTracker.stopTracking();
			mTokenTracker = null;
		}
	}

	private static void dispatchTokenChange( @Nullable VKAccessToken oldToken, @Nullable VKAccessToken newToken ) {
		AIR.log( "VKAccessTokenTracker::onVKAccessTokenChanged() new: " + newToken + " old: " + oldToken );
		String tokenJSON = (newToken == null) ? "{}" : VKAccessTokenUtils.toJSON( newToken );
// Path: android/src/com/marpies/ane/vk/VKExtensionContext.java
// public class VKExtensionContext extends FREContext {
// 
// 	@Override
// 	public Map<String, FREFunction> getFunctions() {
// 		Map<String, FREFunction> functions = new HashMap<String, FREFunction>();
// 
// 		functions.put( "init", new InitFunction() );
// 		functions.put( "auth", new AuthFunction() );
// 		functions.put( "isLoggedIn", new IsLoggedInFunction() );
// 		functions.put( "logout", new LogoutFunction() );
// 		functions.put( "request", new RequestFunction() );
// 		functions.put( "share", new ShareFunction() );
// 		functions.put( "applicationOpenURL", new ApplicationOpenURLFunction() );
// 		functions.put( "sdkVersion", new GetSDKVersion() );
// 
// 		return functions;
// 	}
// 
// 	@Override
// 	public void dispose() {
// 		AIR.stopAccessTokenTracker();
// 		AIR.setContext( null );
// 	}
// }
// 
// Path: android/src/com/marpies/ane/vk/data/AIRVKEvent.java
// public class AIRVKEvent {
// 
// 	public static final String VK_AUTH_ERROR = "vkAuthError";
// 	public static final String VK_AUTH_SUCCESS = "vkAuthSuccess";
// 	public static final String VK_TOKEN_UPDATE = "vkTokenUpdate";
// 	public static final String VK_REQUEST_SUCCESS = "vkRequestSuccess";
// 	public static final String VK_REQUEST_ERROR = "vkRequestError";
// 	public static final String VK_SHARE_COMPLETE = "vkShareComplete";
// 	public static final String VK_SHARE_CANCEL = "vkShareCancel";
// 	public static final String VK_SHARE_ERROR = "vkShareError";
// 
// }


// Path: android/src/com/marpies/ane/vk/utils/AIR.java
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import com.marpies.ane.vk.VKExtensionContext;
import com.marpies.ane.vk.data.AIRVKEvent;
import com.vk.sdk.VKAccessToken;
import com.vk.sdk.VKAccessTokenTracker;

		}
		mContext.getActivity().startActivity( intent );
	}

	public static void notifyTokenChange( VKAccessToken newToken ) {
		dispatchTokenChange( null, newToken );
	}

	public static void startAccessTokenTracker() {
		if( mTokenTracker == null ) {
			mTokenTracker = new VKAccessTokenTracker() {
				@Override
				public void onVKAccessTokenChanged( @Nullable VKAccessToken oldToken, @Nullable VKAccessToken newToken ) {
					dispatchTokenChange( oldToken, newToken );
				}
			};
			mTokenTracker.startTracking();
		}
	}

	public static void stopAccessTokenTracker() {
		if( mTokenTracker != null ) {
			mTokenTracker.stopTracking();
			mTokenTracker = null;
		}
	}

	private static void dispatchTokenChange( @Nullable VKAccessToken oldToken, @Nullable VKAccessToken newToken ) {
		AIR.log( "VKAccessTokenTracker::onVKAccessTokenChanged() new: " + newToken + " old: " + oldToken );
		String tokenJSON = (newToken == null) ? "{}" : VKAccessTokenUtils.toJSON( newToken );
		AIR.dispatchEvent( AIRVKEvent.VK_TOKEN_UPDATE, tokenJSON );