{"id":23080872,"url":"https://github.com/appodeal/appodeal-defold-demo","last_synced_at":"2025-08-26T02:04:10.701Z","repository":{"id":89023550,"uuid":"101037962","full_name":"appodeal/appodeal-defold-demo","owner":"appodeal","description":null,"archived":false,"fork":false,"pushed_at":"2017-11-15T10:07:24.000Z","size":13989,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-26T02:03:17.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appodeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-22T08:05:04.000Z","updated_at":"2024-11-27T15:49:04.000Z","dependencies_parsed_at":"2023-06-13T14:30:56.312Z","dependency_job_id":null,"html_url":"https://github.com/appodeal/appodeal-defold-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/appodeal/appodeal-defold-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Fappodeal-defold-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Fappodeal-defold-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Fappodeal-defold-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Fappodeal-defold-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appodeal","download_url":"https://codeload.github.com/appodeal/appodeal-defold-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Fappodeal-defold-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272160241,"owners_count":24883779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T13:17:02.082Z","updated_at":"2025-08-26T02:04:10.687Z","avatar_url":"https://github.com/appodeal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Appodeal Extension Demo for Defold\n\nThis is official Appodeal Extenstion for Defold with iOS and Android support.\n\nIncluded Appodeal SDK:\n+ iOS: v.2.1.7\n+ Android: v.2.1.7\n\nRequirements:\n\n+ Defold Editor or Defold Editor 2 Preview\n+ Min Android API Level: 14 and above\n+ Min iOS Target: iOS 8.0 and above\n\nDownload: [![](https://img.shields.io/badge/version-2.1.7-green.svg)](https://s3.eu-central-1.amazonaws.com/appodeal-defold/Appodeal-Defold-2.1.7-141117-all.zip)\n\n## Demo Setup\n\nTo run demo on iOS download this [libraries](https://s3.eu-central-1.amazonaws.com/appodeal-defold/Appodeal-Defold-iOS-2.1.7-lib.zip), unzip and place it under appodeal/lib folder.\n\n## Extenstion Integration\n\nExtract downloaded archive and unzip it to your project root folder (files should be under [project]/appodeal folder).\n\n### Android Configuration\n\nSet appodeal/AndroidManifest as default manifest for your project or copy all activities under [For Appodeal 2.1.7](https://github.com/appodeal/appodeal-defold-demo/blob/master/appodeal/AndroidManifest.xml#L121) tag following to your manifest:\n\nAppodeal Android SDK requires Google Play Services 8.5 or above, but Defold uses pretty old library, so we have included new one inside this Extension. To exclude defold ones do next:\n+ Create new text file on the project root folder with name *game.appmanifest*\n+ Add there following:\n```platforms:\n    armv7-android:\n        context:\n            excludeJars: [\"(.*)/google-play-services.jar\", \"(.*)/android-support-v4.jar\"]\n```\n\n### iOS Configuration\n\niOS part ready to use, nothing to change.\n\n### Lua Integration\n\nAvailable Ad Types to use:\n+ appodeal.BANNER\n+ appodeal.BANNER_BOTTOM\n+ appodeal.BANNER_TOP\n+ appodeal.INTERSTITIAL\n+ appodeal.REWARDED_VIDEO\n+ appodeal.NON_SKIPPABLE_VIDEO\n\nTo initialize Appodeal SDK use:\n`appodeal.initialize(\"fee50c333ff3825fd6ad6d38cff78154de3025546d47a84f\", appodeal.INTERSTITIAL)`\nWhere:\n+ `fee50c333ff3825fd6ad6d38cff78154de3025546d47a84f` should be changed to your specific Appodeal app key.\n+ `appodeal.INTERSTITIAL` can be changed to any other ad type.\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.BANNER)`\n\n\nTo show ads use:\n`appodeal.show(appodeal.INTERSTITIAL)`\nWhere:\n+ `appodeal.INTERSTITIAL` can be changed to any other ad type.\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n\nTo disable auto caching for ads use:\n`appodeal.setAutoCache(appodeal.INTERSTITIAL, false)`\nWhere:\n+ `false` sets auto cahcing for INTERSTITIAL disabled.\n+ `appodeal.INTERSTITIAL` can be changed to any other ad type.\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n\nTo cache ads use:\n`appodeal.cache(appodeal.INTERSTITIAL)`\nWhere:\n+ `appodeal.INTERSTITIAL` can be changed to any other ad type.\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n\nTo hide BANNER ads use:\n`appodeal.hide(appodeal.BANNER)`\n\nTo disable smart banners use:\n`appodeal.setSmartBanners(false)`\n\nTo enable banner background use:\n`appodeal.setBannerBackground(true)`\n\nTo disable banner refresh animation use:\n`appodeal.setBannerAnimation(false)`\n\nTo disable big banners use:\n`appodeal.setTabletBanners(false)`\n\nTo enable additional logging for debugging use:\n`appodeal.setLogLevel(appodeal.LOG_LEVEL_VERBOSE)`\nAvailable log levels:\n```\nappodeal.LOG_LEVEL_NONE\nappodeal.LOG_LEVEL_DEBUG\nappodeal.LOG_LEVEL_VERBOSE\n```\n\nTo enable test ads use:\n`appodeal.setTesting(true)`\n\nTo disable not child directed ads use:\n`appodeal.setChildDirectedTreatment(false)`\n\nTo enable triggering on loaded callbacks for precache ads use:\n`appodeal.setTriggerOnLoadedOnPrecache(appodeal.INTERSTITIAL, true)`\nWhere:\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n+ `true` sets trigger for interstitial on loaded callback enabled.\n\nTo disable specific network use:\n`appodeal.disableNetwork(\"inmobi\")`\nWhere:\n+ Available parameters: \"adcolony\", \"admob\", \"amazon_ads\", \"applovin\", \"appnext\", \"avocarrot\", \"chartboost\", \"facebook\", \"flurry\", \"inmobi\", \"inner-active\", \"ironsource\", \"mailru\", \"mmedia\", \"mopub\", \"ogury\", \"openx\", \"pubnative\", \"smaato\", \"startapp\", \"tapjoy\", \"unity_ads\", \"vungle\", \"yandex\"\n\nTo disable specific network for specific ad type use:\n`appodeal.disableNetworkForAdType(\"adcolony\", appodeal.INTERSTITIAL)`\nWhere:\n+ Available parameters: \"adcolony\", \"admob\", \"amazon_ads\", \"applovin\", \"appnext\", \"avocarrot\", \"chartboost\", \"facebook\", \"flurry\", \"inmobi\", \"inner-active\", \"ironsource\", \"mailru\", \"mmedia\", \"mopub\", \"ogury\", \"openx\", \"pubnative\", \"smaato\", \"startapp\", \"tapjoy\", \"unity_ads\", \"vungle\", \"yandex\"\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n\nTo disable LocationPermission check for Android use:\n`appodeal.disableLocationPermissionCheck()`\n\nTo disable WriteExternalStoragePermission check for Android use:\n`appodeal.disableWriteExternalStoragePermissionCheck()`\n\nTo mute video ads when calls muted on Android use:\n`appodeal.muteVideosIfCallsMuted(true)`\n\nTo track in app purchase use:\n`appodeal.trackInAppPurchase(50, \"USD\")`\n\nTo use callbacks in Appodeal SDK set it before SDK initialization with:\n`appodeal.setCallback(appodeal_ads_callback)`\nWhere:\n+ appodeal_ads_callback should be a custom function with (self, msg_type) params.\n+ following callbacks available:\n```\nlocal function appodeal_ads_callback(self, msg_type)\n\tif msg_type == appodeal.BANNER_LOADED then\n\t\tprint(\"BANNER_LOADED\")\n\telseif msg_type == appodeal.BANNER_FAILED_TO_LOAD then\n\t\tprint(\"BANNER_FAILED_TO_LOAD\")\n\telseif msg_type == appodeal.BANNER_SHOWN then\n\t\tprint(\"BANNER_FAILED_TO_LOAD\")\n\telseif msg_type == appodeal.BANNER_CLICKED then\n\t\tprint(\"BANNER_CLICKED\")\n\telseif msg_type == appodeal.INTERSTITIAL_LOADED then\n\t\tappodeal.show(appodeal.INTERSTITIAL)\n\t\tprint(\"INTERSTITIAL_LOADED\")\n\telseif msg_type == appodeal.INTERSTITIAL_FAILED_TO_LOAD then\n\t\tprint(\"INTERSTITIAL_FAILED_TO_LOAD\")\n\telseif msg_type == appodeal.INTERSTITIAL_SHOWN then\n\t\tprint(\"INTERSTITIAL_SHOWN\")\n\telseif msg_type == appodeal.INTERSTITIAL_CLOSED then\n\t\tprint(\"INTERSTITIAL_CLOSED\")\n\telseif msg_type == appodeal.INTERSTITIAL_CLICKED then\n\t\tprint(\"INTERSTITIAL_CLICKED\")\n\telseif msg_type == appodeal.REWARDED_VIDEO_LOADED then\n\t\tprint(\"REWARDED_VIDEO_LOADED\")\n\telseif msg_type == appodeal.REWARDED_VIDEO_FAILED_TO_LOAD then\n\t\tprint(\"REWARDED_VIDEO_FAILED_TO_LOAD\")\n\telseif msg_type == appodeal.REWARDED_VIDEO_SHOWN then\n\t\tprint(\"REWARDED_VIDEO_SHOWN\")\n\telseif msg_type == appodeal.REWARDED_VIDEO_FISNIHED then\n\t\tprint(\"REWARDED_VIDEO_FISNIHED\")\n\telseif msg_type == appodeal.REWARDED_VIDEO_CLOSED then\n\t\tprint(\"REWARDED_VIDEO_CLOSED\")\n\telseif msg_type == appodeal.NON_SKIPPABLE_VIDEO_LOADED then\n\t\tprint(\"NON_SKIPPABLE_VIDEO_LOADED\")\n\telseif msg_type == appodeal.NON_SKIPPABLE_VIDEO_FAILED_TO_LOAD then\n\t\tprint(\"NON_SKIPPABLE_VIDEO_FAILED_TO_LOAD\")\n\telseif msg_type == appodeal.NON_SKIPPABLE_VIDEO_SHOWN then\n\t\tprint(\"NON_SKIPPABLE_VIDEO_SHOWN\")\n\telseif msg_type == appodeal.NON_SKIPPABLE_VIDEO_FISNIHED then\n\t\tprint(\"NON_SKIPPABLE_VIDEO_FISNIHED\")\n\telseif msg_type == appodeal.NON_SKIPPABLE_VIDEO_CLOSED then\n\t\tprint(\"NON_SKIPPABLE_VIDEO_CLOSED\")\n\tend\nend\n```\n\n\nUser settings:\n```appodeal.setUserId(\"awesome_user\")\nappodeal.setUserAge(26)\nappodeal.setUserGender(appodeal.GENDER_MALE)\n```\n\nCustom Rules:\n```appodeal.setCustomIntRule(\"int_rule\", 217)\nappodeal.setCustomBoolRule(\"bool_rule\", true)\nappodeal.setCustomDoubleRule(\"double_rule\", 2.17)\nappodeal.setCustomStringRule(\"string_rule\", \"my_string\")\n```\n\nTo show ads for specific placement use:\n`appodeal.showWithPlacement(appodeal.INTERSTITIAL, \"my_placement\")`\nWhere:\n+ `appodeal.INTERSTITIAL` can be changed to any other ad type.\n+  \"my_placement\" should match your placement in Appodeal Dashboard.\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n\nTo check if ad can be shown for default placement use:\n`appodeal.canShow(appodeal.INTERSTITIAL)`\nWhere:\n+ `appodeal.INTERSTITIAL` can be changed to any other ad type.\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n\nTo check if ad can be shown for specific placement use:\n`appodeal.canShow(appodeal.INTERSTITIAL, \"my_placement\")`\nWhere:\n+ `appodeal.INTERSTITIAL` can be changed to any other ad type.\n+  \"my_placement\" should match your placement in Appodeal Dashboard.\n+ ad types can be used as bitwise or, for example:  `bit.bor(appodeal.INTERSTITIAL, appodeal.NON_SKIPPABLE_VIDEO)`\n\nTo get reward amount and name for REWARDED_VIDEO:\n`appodeal.getRewardName()` - for default placement\n`appodeal.getRewardAmount()` - for default placement\n`appodeal.getRewardNameForPlacement(\"my_placement\")` - for specific placement\n`appodeal.getRewardAmountForPlacement(\"my_placement\")` - for specific placement\n\n## Changelog:\n\n2.1.7 (14/11/2017)\n+ Appodeal Android SDK updated to 2.1.7\n+ Appodeal iOS SDK updated to 2.1.7\n+ Android Callbacks crash fix \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappodeal%2Fappodeal-defold-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappodeal%2Fappodeal-defold-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappodeal%2Fappodeal-defold-demo/lists"}