{"id":17987534,"url":"https://github.com/iammert/rewarded-ads-sample","last_synced_at":"2025-03-25T22:32:14.095Z","repository":{"id":94173300,"uuid":"93277257","full_name":"iammert/rewarded-ads-sample","owner":"iammert","description":"Sample project to show rewarded ads on your android app ","archived":false,"fork":false,"pushed_at":"2017-06-03T22:49:18.000Z","size":456,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-03T00:32:43.050Z","etag":null,"topics":["addon","admob","ads","chartboost","rewarded","startapp"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/iammert.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}},"created_at":"2017-06-03T22:31:05.000Z","updated_at":"2022-01-29T16:13:51.000Z","dependencies_parsed_at":"2023-03-07T16:30:22.932Z","dependency_job_id":null,"html_url":"https://github.com/iammert/rewarded-ads-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammert%2Frewarded-ads-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammert%2Frewarded-ads-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammert%2Frewarded-ads-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammert%2Frewarded-ads-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iammert","download_url":"https://codeload.github.com/iammert/rewarded-ads-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222099555,"owners_count":16931437,"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","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":["addon","admob","ads","chartboost","rewarded","startapp"],"created_at":"2024-10-29T19:09:03.420Z","updated_at":"2024-10-29T19:09:04.088Z","avatar_url":"https://github.com/iammert.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rewarded-ads-sample\nSample project to show rewarded ads on your android app \n\n# Usage\n\n```java\npublic class MainActivity extends AppCompatActivity implements RewardedVideoListener{\n    \n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        ...\n        RewardedAd rewardedAd = RewardedAdFactory.getRewardedAd(this, AdType.ADMOB, this);\n        rewardedAd.showAd();\n        ...\n    }\n\n    @Override\n    public void onVideoCompleted() {\n        Log.v(\"TEST\", \"Video completed.\");\n    }\n\n    @Override\n    public void onVideoLoadFailed() {\n        Log.v(\"TEST\", \"Video failed.\");\n    }\n\n    @Override\n    public void onVideoStarted() {\n        Log.v(\"TEST\", \"Video started.\");\n    }\n}\n```\n\n3 ad network types are supported. PR's are welcome for other ad networks.\n``` java \nAdType.ADMOB\nAdType.CHARTBOOST\nAdType.STARTAPP\n```\n\n# Handling Lifecycle\nLifeCycleRegistry is used to handle lifecycle in Ad instances.\n```java\nLifecycleRegistry lifecycleRegistry = new LifecycleRegistry(this);\nlifecycleRegistry.addObserver(rewardedAd.getObserver());\n```\n\n# Replace Keys\n```xml\n    \u003c!-- Chartboost --\u003e\n    \u003cstring name=\"chartboost_app_id\"\u003e[REPLACE_CHARTBOOST_APP_ID]\u003c/string\u003e\n    \u003cstring name=\"chartboost_app_signature\"\u003e[REPLACE_CHARTBOOST_APP_SIGNATURE]\u003c/string\u003e\n\n    \u003c!-- Admob --\u003e\n    \u003cstring name=\"admob_unit_id\"\u003e[REPLACE_ADMOB_AD_UNIT_ID]\u003c/string\u003e\n\n    \u003c!-- Startapp --\u003e\n    \u003cstring name=\"startapp_app_id\"\u003e[REPLACE_STARTAPP_APP_ID]\u003c/string\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammert%2Frewarded-ads-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiammert%2Frewarded-ads-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammert%2Frewarded-ads-sample/lists"}