コード例 #1
0
    // Use this for initialization
    void Start()
    {
        AF_RGBA backgroundColor, textColor;

        //
        numberOfNotifications = 0;

        // af ad sdk - enable debug mode to see an ad each time
        // we suggest you to only keep it for debug builds!
        // otherwise, don't forget to comment/remove it before any store submission!!!
                #warning enable it for testing, disable it for store submission!!
        AppsfireAdSDK.SetDebugModeEnabled(true);

        // af sdk - connect with your sdk token / secret key
                #error please enter your sdk token and secret key here!
        AppsfireSDK.ConnectWithSDKTokenAndSecretKey("", "", AFSDKFeature.AFSDKFeatureEngage | AFSDKFeature.AFSDKFeatureMonetization);

        // af engage sdk - handle badge count locally and remotely
        AppsfireEngageSDK.HandleBadgeCountLocallyAndRemotely(true);
                #if UNITY_IPHONE
        UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound);
                #endif

        // af engage sdk - customize background and text colors
        // these values are default colors, you can customize with the colors of your app
        backgroundColor = new AF_RGBA(66.0 / 255.0, 67.0 / 255.0, 69.0 / 255.0, 1.0);
        textColor       = new AF_RGBA(1.0, 1.0, 1.0, 1.0);
        AppsfireEngageSDK.SetBackgroundAndTextColor(backgroundColor, textColor);
    }
コード例 #2
0
 void Start()
 {
     // initialize ad sdk
     Debug.Log("Appsfire Ad SDK - Start");
     AppsfireSDK.ConnectWithAPIKey("YOUR_API_KEY_HERE", AFSDKFeature.AFSDKFeatureMonetization);
     AppsfireAdSDK.SetDebugModeEnabled(true);
     AppsfireAdSDK.Prepare();
 }