How to write cocos2dx method Unity Ads in Android Studio2.2.3.Help me (T T)

How to write cocos2dx method Unity Ads in Android Studio2.2.3.Help me (T T)
0.0 0

#1

I succeeded in implementing advertisements in the iOS version. I would like to implement it in the same way on Android.

What I want to do is

AppController.mm

  • (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {

[[UnityAds sharedInstance] startWithGameId: @ “xxxxxxx” andViewController: viewController];

[[UnityAds sharedInstance] setDelegate: self];

}

  • (void) unityAdsVideoCompleted: (NSString *) rewardItemKey skipped: (BOOL) skipped {
    // callback
    If (skipped == YES)
    {
    SaveData :: saveInt (“skipKey”, 0);

    }
    else
    {
    SaveData :: saveInt (“skipKey”, 1);
    }
    }

I would like to rewrite these to AppActivity.java. And I would like to call those methods from the .cpp side. please tell me.