InMobi Ads with Tizen Unity

UPDATE:
Seems it may be ready - Here is a new site I found today (11/15/2016), posted 5 days ago about InMobi and Tizen ads:
https://developer.tizen.org/development/tizen-studio/extension-sdk/inmobi-tizen-ad-sdk-programing-guide

I'll be trying this out soon, no telling if it will work or not yet!

(ORIGINAL POST WAS A BUNCHA CONFUSING NONSENSE)

The official Tizen Inapp does not work on Unity store... waste of time also..

The InMobi guys replied, saying they don't support tizen, and linked me here:

https://support.inmobi.com/monetize/integration/monetization-server-to-server-api-integration-guides/api-3.1-server-to-server-integration-guidelines#introduction

Perhaps I can use this to get it working but I'm not sure where to start...

Their exact words:
"As of now we do not support Tizen integration, you can integrate with us as a API. Please find the following link."

EDIT: I asked them to reach out to Samsung and showed them the link that I listed in the first post, asking what's going on, and they replied with:
"Apologies for inconvenience,as we are working with samsung and will shortly support the Tizen integration. Right now work in progress with samsung to support Tizen integration. But for now we are not supporting Tizen."

Perhaps we won't be able to use this for some time still.

Sigh :face_with_spiral_eyes:

Got another email from InMobi:

[quote]
Apologies for this confusion, Samsung and InMobi are in the process of creating a monetization solution for Tizen App developers. This will take a few weeks to get done. We will get back to you as soon as this is launched.

We have also reached out to the Samsung team and informed them about the inconvenience caused to you. They have taken down this onboarding guide, till the time this solution is officially launched.

Thanks for your patience. You will hear from us soon.
[/quote]

Looks like it may be ready to go in the coming weeks, and they took down the page guiding users to install the not-yet-ready sdk.

I gotta hand it to em, good support...

It's been a bit, still no signs of a tizen ad sdk from inmobi, or anybody else it seems.

lol tizen have a long way to go, i doubt this is there priority right now..
I'm still waiting for them to update there official InApp Unity package..

Seems it may be ready - Here is a new site I found today, posted 5 days ago about InMobi and Tizen ads:
https://developer.tizen.org/develop...sion-sdk/inmobi-tizen-ad-sdk-programing-guide

I'll be trying this out soon, no telling if it will work or not yet!

I have made a little progress. I first had to wait for the InMobi/Tizen onboarding team to setup my site ID's manually, and they sent me a set of ID's for banners, and a set for interstitials. I fumbled around with the unity package for the plugin, and edited the example script to set my own site ID, where I noticed they had used only a single site ID, and had all three types of ads initialize (banner big, banner small, interstitial) it seemed. So I tried just using the interstitial site id only.

In the editor, this won't work and produces errors, as I expected. So I used pre processor directives (or whatever it's called, #if !UNITY_EDITOR) to only run it on device.

I fired up the Samsung remote test lab, and uploaded the tpk to a Z3, then it calls the ads it seems, but all I get are white boxes where ads should be showing.

I tried using just the banner site ID, and just calling to display that and no interstitial, and the same thing happens on the RTL.

So now it's the waiting game for an email back from either samsung or inmobi, to figure out where things are going wrong. Hopefully it's some minor errors in the docs on samsungs site, and perhaps they can update that soon to avoid this issue for future users.

EDIT:
I found out the banner is showing "no fill" error message, and the interstitial is showing a "internal error" error message. I set it up to not display the ads unless they receive an ad, and it seems so far in testing, I am not receiving any real ads, perhaps they don't have any yet!

Anyway, I could not figure out a way to do "test" mode ads, and can't confirm that the implementation is correct, but I think it would work on the banner ads if it had some to give the plugin.

I emailed the "tizen ad support" guys, and hope to hear back from either them, or InMobi, or somebody... soon?

1 Like

Somebody try and do this besides me. See this thread going nowhere:

https://samsung.tizenforum.com/sdks/inmobi-ads-unity-app-using-both-banner-and-interstitial/

No useful info from Samsung or InMobi or that thread. I need a wingman.

Well, if you go onto the InMobi Ads network, you can't select Tizen as a platform, so I doubt the plugin would help... Pity, we have our game 'Hiro in Winterland' featured every single week. DISASTER!

I would be willing to be your wingman, tell me how you got them to set up custom ad ID's for you and maybe we can figure this out together.

OK awesome, this is what you have got to do (you cannot manually setup your own Tizen account with InMobi's site):

1) Go here and email the tizen onboarding team to get "real" site ID's for your app if you want to use this platform in real Tizen devices and make money (Step 1 - Send an email to tizen.onboarding@inmobi.com)
2) While waiting for them to email you back with the signup form (which mind you, you can sign up as an individual) go ahead and start integrating the way they tell you to in the setup page linked in step 1
3) Use the test ID they provide, and try and display a banner or perhaps even an interstitial ad in your unity app
4) Do this from a Remote Test Lab device that is in India, as InMobi have informed me they get real ads there
5) Report back here what you discover! Did the test ads work? After InMobi gets back to you, do your real ads work?

This is the exact script I use, although I cannot confirm or deny it works with the plugin:

using UnityEngine;
using Tizen.AdLib;
using System;

public class AdListener1 : BannerAdListener
{
    private AdProvider adobj;
    public AdListener1(AdProvider adobject)
    {
        adobj = adobject;
    }
    public void OnAdClicked(IntPtr handle, ErrorType error)
    {
        DebugConsole.DC.Log("Ad clicked B"); // I do debuggin ON the tizen device, displaying out to a debug console
    }

    public void OnAdLoadFailed(IntPtr handle, ErrorType error)
    {
        adobj.BannerAdSetVisibility(handle, false); // the ad failed to load, make sure the banner isn't visible
        DebugConsole.DC.Log("Failed to load ad B: " + handle + " | " + error);
    }

    public void OnAdLoadSucceeded(IntPtr handle, ErrorType error)
    {
        adobj.BannerAdSetVisibility(handle, true); // the ad has loaded, show the banner
        DebugConsole.DC.Log("Succeeded to load ad B");
    }
}

public class AdListener : InterstitialAdListener
{
    public void OnAdClosed(IntPtr handle)
    {
        DebugConsole.DC.Log("Ad closed I");
    }

    public void OnAdLoadFailed(IntPtr handle, ErrorType error)
    {
        DebugConsole.DC.Log("Failed to load ad I: " + handle + " | " + error);
    }

    public void OnAdLoadSucceeded(IntPtr handle)
    {
        DebugConsole.DC.Log("Interstitial OnAdLoadSucceeded");
        AdProvider.Instance.InterstitialAdShow();
    }

    public void OnAdOpened(IntPtr handle)
    {
        DebugConsole.DC.Log("Ad opened I");
    }
}

public class AdHandler : MonoBehaviour {

    AdProvider adobject = AdProvider.Instance;

    string siteID = "ACTUAL_INMOBI_BANNER_SITE_ID"; // here I actually use the ID's given by inmobi, removed for privacy/security reasons
    string siteIDInterstitial = "ACTUAL_INMOBI_INTERSTITIAL_SITE_ID";


    // Use this for initialization
    void Start()
    {
        IntPtr handle;//, handle2;
        ErrorType result = adobject.InitAdlib(siteID, "_inmobi", "https://i.l.inmobicdn.net/sdk/jsac/p1/inmobi.js", "inmobi_conf");
        DebugConsole.DC.Log("Init adlib B: " + result);
        AdListener1 adListener_b = new AdListener1(adobject);

        result = adobject.InitAdlib(siteIDInterstitial, "_inmobi", "https://i.l.inmobicdn.net/sdk/jsac/p1/inmobi.js", "inmobi_conf");
        DebugConsole.DC.Log("Init adlib I: " + result);

        // INTERSTITIAL HANDLING
        AdListener adListener_i = new AdListener();
        adobject.AddInterstitialAd();
        adobject.InterstitialAdLoad();
        adobject.SetInterstitialAdListener(adListener_i);

        // BANNER BIG HANDLING
        //ErrorType result = adobject.AddBannerAd(BannerAdSize.BANNER_AD_SIZE_BIG, out handle1);
        //DebugConsole.DC.Log("Handle value:" + handle1 + " | " + result);
        //adobject.BannerAdLoad(handle1);
        //adobject.SetBannerAdListener(handle1, adListener_b);

        // banner small handling
        result = adobject.AddBannerAd(BannerAdSize.BANNER_AD_SIZE_SMALL, out handle);// 2);
        DebugConsole.DC.Log("Init banner:" + handle + " | " + result);// 2);
        adobject.BannerAdLoad(handle);// 2);
        adobject.BannerAdSetPosition(handle, BannerAdPosition.BANNER_AD_POS_BOTTOM_CENTER);
        adobject.SetBannerAdListener(handle, adListener_b);

        result = adobject.BannerAdSetRefreshInterval(handle, 60); // refresh every 60 seconds
        DebugConsole.DC.Log("Set refresh:" + handle + " | " + result);// 2);
    }

    void OnApplicationQuit()
    {
        ErrorType result = adobject.DeinitAdlib(siteID);
        DebugConsole.DC.Log("Quit app, deinit called: " + result);
    }
}

And if you want to see the results as they occur (or modify this script for whatever reason) then use this to display debug information:

using UnityEngine;
using UnityEngine.UI;

public class DebugConsole : MonoBehaviour
{
    public Text DebugText; // ATTACH A DEBUG "TEXT" SETUP TO PRINT SEVERAL LINES!
    public static DebugConsole DC;

    private string currentDebugString;

    void Awake()
    {
        DC = this;
        DC.Log("DC Active!");
    }

    public void Log(string output)
    {
        Debug.Log(output);

        string newString = output + System.Environment.NewLine + currentDebugString;

        currentDebugString = newString;
        DebugText.text = currentDebugString;
    }
}

I use this debug tool like this:

Another note: This won't work properly in the editor, as it is required to actually be in tizen OS for this stuff to work.

And another note: I can't remember exactly, but I am pretty sure you need to move the plugin folder "Tizen" into a folder called "Plugins" manually, as by default it does not go into that folder!

Hope to hear back soon!

A new version was released, I think 1122, and I had to make minor adjustments to the example script I provided above (remove a parameter from an inherited method) and it still gives the same results for me on a US device. For some reason the India test devices wouldn't work for me today, will try there again tomorrow.

EDIT: Note, the new version was 1129, fyi

I am able to integrate the package in my application and able to see the ads coming up, both interstitial and banner ads. one basic info I got from InMobi is ads are shown only in India.

1 Like

Awesome. Did you use the testing site id or a real one (s)?

I used the testing site ID.

1 Like

Okay, thanks I appreciate the info!

I cannot for the life of me get a device in India to work, on the remote test lab, always with the "the server is down or there is a problem with your network connection" message, no matter which of the available devices I choose, z1, z2, or z3, any of the available ones act the same (if I select IN2 or IN4, doesn't change).

I wonder if there are any other countries (available to test in the RTL) that also support ads at this time. InMobi also told me that India does receive ads, but they didn't say explicitly that no other countries do...

Another unrelated thought, how do you check your ads performance? Is there somewhere on InMobi's site where you can see the performance of tizen ads (the ones they manually set up for you)?

I'm still unable to get ads working through this SDK and unity. It has become kind of frustrating, as I get decent downloads on the dang platform, but cannot monetize any users at all.

Latest version I see of the ad SDK as of this post is 1209, which I downloaded here.

To test ads I need to get on an india based device on the remote test lab, so I opened port 2600 through my routers splash page as suggested by samsung RTL support, turned off my local firewall/antivirus, even temporarily tried disabling the router firewall completely just to test it, and built the TPK file using unity 5.4.3f1 (I couldn't get tizen builds working on later versions?). Still can't get on those india based devices.

Sometimes I got an error when trying to install to a remote device in other countries saying "installation failed with com.someCompany.someApp exception cannot push the file on device please check application package for permission" when trying to install on any device (in the RTL) but this error didn't happen when I was testing for submitting to the app challenge, and now all the sudden I couldn't even test on devices remotely it seemed.

I had seen a thread here which says to make sure the device (the remote device) has its time set properly to avoid this error. So I connected to a device, rebooted it, then checked that the time seemed to auto set (which it did) and then I proceeded to (very slowly) install the app to the remote device. Afterwards that error is no longer a problem.

So I moved over to trying some more to get on a India based device (where the ads can show up) and as usual, I cannot connect to India based devices. Every time I get a error just as it is "connecting" to the device, and none of them will even start (z1, z2, z3, in1, in2, doesn't matter...) to allow me to test if the ads show up on real devices.

I am waiting on a friendly tizen developer who lives in India to possibly try and install my TPK and test the ads on a real device, but this obviously isn't an optimal way to rapidly test things, but at the very least I could confirm the ads work that way. We had troubles a couple times in the past where his device wouldn't even let him install the app, so its possible it won't work again, but I am able to get the app running on a RTL device it seems, and hopefully any kinks may have been worked out and I can find out for sure if the ads do show up there or not!

If I am unable to test (whether it won't install for him or if I just can't reach the guy) that way, then I will be pretty much stuck, twiddling my thumbs on this problem while samsung/inmobi/space martians work out a way to help us non-india based developers out... :/

Guess at the rate this is going, other companies might bring a new ad platform to tizen before I get it working :p

Hello all,
I have two game on Tizen store, bus I can't implement ads from any advertiser.
I wonder if somebody could lend me a hand by telling me how it's implement ads feauture for my game