Hi, I’m trying to use https://github.com/starburst997/extension-adcolony
I’m trying to implement V4VC reward system, I’ve created handler for :
onAdColonyAdAttemptFinished( shown:Bool, notShown:Bool, skipped:Bool, canceled:Bool, noFill:Bool ):Void
but after first call to show ad ( i have button for that) i get:
false,true,true,false,false
second click give me
false,true,false,false,true
second one I can understand, because ad is not rdy or something, but first one is like skipped, but i did’nt skip anything it’s like instant response.
please help.
Does the test project work?
not rly,
just displaying red screen:
I made haxelib upgrade but it wasn’t any help
sry,
on android it’s working. but my code is not. and I have no idea whats wrong.
my handlers class:
class AdcolonyHandlers implements IAdColony {
public function new(){}
public function onAdColonyV4VCReward( success:Bool, name:String, amount:Float ):Void {
if(success)
Main.traps +=2;
}
public function onAdColonyAdStarted():Void{
trace('onAdColonyAdStarted');
};
public function onAdColonyAdAttemptFinished( shown:Bool, notShown:Bool, skipped:Bool, canceled:Bool, noFill:Bool ):Void {
trace('onAdColonyAdAttemptFinished',shown, notShown, skipped, canceled, noFill );
};
public function onAdColonyAdAvailabilityChange( available:Bool, name:String ):Void {
trace('onAdColonyAdAvailabilityChange',available, name);
Main.ad_avilable=available;
};
}
than i configure plugin:
AdColony.configure( "app62db201a80644ac580", ['vz242fdb43bf0641819a'], new AdcolonyHandlers());
and button:
var adbtn = new FlxButton(350, 335 , " show ad " , function(){
AdColony.showV4VCAd("vz242fdb43bf0641819a");
});
but i get:
false,true,true,false,false
from
onAdColonyAdAttemptFinished
also becouse of lack of documentation I’m not sure what is rly important in test project.
test have:
<set name="openfl-legacy" if="android||ios" />
in project.xml it is mandatory to work? becouse with haxeflixel on android aplication stop working just after launch.
also it use templates…not sure what it is or it is important.
a moved template dir to my project and it’s working like a charm, thx ![:smile: :smile:](//community.openfl.org/images/emoji/twitter/smile.png?v=5)
You should not need legacy to use Android extensions, but if they rely on very specific project templates (for example) then an extension may need legacy until it is updated ![:slight_smile: :slight_smile:](//community.openfl.org/images/emoji/twitter/slight_smile.png?v=5)