5.Extensions

5.1 Open activity page

Android

com.vigame.Activity.open();

iOS

[IOSLoader openActivityPage];

Unity

Wb.CoreManager.Instance.OpenActivityPage();

5.2 Open notice page

Android

Notice.open();

iOS

[IOSLoader openNoticePage];

Unity

Wb.CoreManager.Instance.OpenActivityNotice();

5.3 Submit rank data

Android

Rank.submit(level,score,usedCoins,leftCoins);

iOS

 [IOSLoader submitRankInfoWithUserId:@"userId" level:level score:score usedCoins:usedCoins leftCoins:leftCoins];

Unity

Wb.CoreManager.Instance.SumbitRankData(string userId, int level, int score, int usedCoins, int leftCoins);

Parameters:

  • userId:user identifier

  • level:level identifier

  • score:current score in level

  • usedCoins:the coins of used

  • leftCoins:the coins left

5.4 Open rank view

Android

Rank.open();

iOS

[IOSLoader openRank];

Unity

Wb.CoreManager.Instance.OpenRank();

5.5 Open feedback page

Android

Feedback.open();

iOS

[IOSLoader openGM];

Unity

Wb.CoreManager.Instance.OpenFeedback();

5.6 Open privacy policy page

Android

ProtocolUtil.openPrivacyPolicy();

iOS

[IOSLoader openPrivacyPolicy];

Unity

Wb.CoreManager.Instance.OpenPrivacyPolicy();

Note:The company name is associated with the CompanyIndex item of assets/VigameConfig.xml file.

5.7 Open user agreement

Android

CoreManagerNative.openUserAgreementByWeb();

iOS

[IOSLoader openUserAgreement];

Unity

Wb.CoreManager.Instance.OpenUserAgreementByWeb();

5.8 Use CDKey

5.8.1 Is Support CDKey

Android

CDKey.isSupport();

iOS

[IOSLoader isSupportExchangeCode];

Unity

Wb.CoreManager.Instance.CDKeyIsSupport()

返回值:

true:support CDKey

false:not support CDKey

5.8.2 Use CDKey

Android

CDKey.use(String dhm);
CDKey.use(String dhm,DhmCallback callback);

Example:

String dhm = "111111";
CDKey.use(dhm,new CDKey.DhmCallback() {

    @Override
    public void onFinish(CDKey.DhmData data) {
        // TODO Auto-generated method stub
        showToast(data.message);
    }
});

Parameters:

  • dhm:CDKey code

  • callback:the callback of use result

iOS

//use CDKey
[IOSLoader userExchangeCode:@“code”];

Parameters:

  • code:the CDKey for use.

Unity

Wb.CoreManager.Instance.UseCDKey(string dhm)

Parameters:

  • dhm:the CDKey for use.

5.9 Local notification(Only iOS)

iOS

 [IOSLoader pushLocalNotification:@“alertBody” fireDate:@“fireDate” noticeId:@”noticeId“];

//cancle single notification
[IOSLoader cancelPushWithId:@”noticeId“];
//cancle all notification
[IOSLoader cancelAllPush];

Parameters:

  • alertBody:the content of notification

  • fireDate:the date of notification fired,Accurate to second

  • noticeId:the identifier of notification(for cancel notification)

Unity

Wb.CoreManager.Instance.NotifyNotification(int id, string body, long fireDate, int unitInterval,Dictionary<string, string> userinfo);

Parameters:

  • id:the identifier of notification(for cancel notification)

  • body:the content of notification

  • fireDate:the date of notification fired,Accurate to second

  • unitInterval:interval time for enum

  • userinfo:custom info

5.10 Fast mark(Only iOS)

iOS

[IOSLoader fastmark]

5.11 Jump comment(Only iOS)

iOS

[IOSLoader jumpComment];

最后更新于