tapsellorg/TapsellSDK-UnitySample

Error While getting Ad

Closed this issue · 7 comments

Hi there ,
thanks for creating this repository !
here is my code :
`using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TapsellSDK;
using UnityEngine.UI;

public class adInit : MonoBehaviour {

public static bool avaliable = false;
public static TapsellAd ad = null;
public static string zoneId = "MY_ZONE_ID(Don't worry about this , i just changed it here)";

public Text Label;


void Start() {
	Label.text = "AWOKE";
	Tapsell.initialize ("MY_APP_ID_ON_TAPSELL_PLATFORM(Don't worry about this , i just changed it here)");
	Tapsell.setDebugMode (true);
	Tapsell.setPermissionHandlerConfig (Tapsell.PERMISSION_HANDLER_AUTO);
}


private void requestAd(string zone , bool cached) {
	Tapsell.requestAd (
		zone, 
		cached,
		(TapsellAd result) => {
			// Avaliable
			Debug.Log("Avaliable");
			Label.text = "Avaliable => Showing Add!";
			adInit.avaliable = true;
			adInit.ad = result;
		} ,
		(string zoneId) => {
			// Not Avaliable
			Label.text = "Not Avaliable!";
			Debug.Log("Not Avaliable");
		} ,
		(TapsellError error) => {
			// Error
			Label.text = "Error Occured! => " + error.error.ToString();
			Debug.Log(error.error);
		} ,
		(string zoneId) => {
			// No Internert
			Label.text = "No INTERNET";
			Debug.Log("No Internet" + zoneId);
		},
		(TapsellAd result) => {
			// Expire
			Debug.Log("Expring");
			Label.text = "Session Expired!";
			adInit.avaliable = false;
			adInit.ad = null;
			requestAd(result.zoneId , false);
		}
	);
}

public void adBtn() {
	if (adInit.avaliable) {
			adInit.avaliable = false;
			TapsellShowOptions options = new TapsellShowOptions ();
			options.backDisabled = false;
			options.immersiveMode = false;
			options.rotationMode = TapsellShowOptions.ROTATION_LOCKED_LANDSCAPE;
			options.showDialog = true;
			Tapsell.showAd (ad, options);
	}

	requestAd (zoneId , false);
} 

}`

in which i assigned the "adBtn" void to a button in my game!
the problem is => When i hit the button an it comes up with an error of "Ad with Specified Zone is already being downloaded" and sometimes it says "Failed Getting suggestions from server, code:0 , message: unexpected end of stream onConnection{api.tapsel.ir:443 , proxy=DIRECT hostAddress= 185.105.185.248", any helps appreciated , lots of love !

any body here ????

here is my Zone area in my panel:
joxi_screenshot_1517472235971
it says that requests are been counted , but trust me NO ad shown in the phone ....
what is going on ??????

Hi @ErEllison
Your implementation seem to have no problem.
We're upgrading and maintaining our servers. Thus you may receive timeout, internal server, and other similar errors while requesting from our servers.
We will be back with faster servers and high quality services as soon as possible.
We're thankful for your patience.

Tapsell SDK Team

c'mon man , can you please tell me when ?? how long it will take ??? please , i had a lot of stuff to do ...

one more thing , please please please check your github profile as much as possible , neither as soon as possible as you guys can , i was waiting for your answer for two days !!!!!
probably github rank is increased in alexa because of me ! i haven't checked that yet ! :)

I can't tell you the exact time, but our team is working to fix all the problems.
Maybe 2 days later or 2 weeks later.
For the github account check you mentioned : we have a support chat at dashboard.tapsell.ir that is answered less than 24 hours. This question was mentioned there from another user. Github account is checked less frequently than support chat. Please ask your questions there.

i am that another user !! :)