{"id":26566229,"url":"https://github.com/alex-mobvantage/react-native-gaid","last_synced_at":"2025-03-22T18:19:30.820Z","repository":{"id":14055349,"uuid":"75782343","full_name":"alex-mobvantage/react-native-gaid","owner":"alex-mobvantage","description":"React Native plugin for fetching the Google Advertising ID","archived":false,"fork":false,"pushed_at":"2022-05-24T20:53:56.000Z","size":4,"stargazers_count":7,"open_issues_count":6,"forks_count":24,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-10T20:34:03.898Z","etag":null,"topics":["google-advertising-id","plugin","react","react-native"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alex-mobvantage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-07T00:00:45.000Z","updated_at":"2019-01-31T04:39:12.000Z","dependencies_parsed_at":"2022-06-26T11:01:12.276Z","dependency_job_id":null,"html_url":"https://github.com/alex-mobvantage/react-native-gaid","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/alex-mobvantage%2Freact-native-gaid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-mobvantage%2Freact-native-gaid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-mobvantage%2Freact-native-gaid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-mobvantage%2Freact-native-gaid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-mobvantage","download_url":"https://codeload.github.com/alex-mobvantage/react-native-gaid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244999756,"owners_count":20544934,"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":["google-advertising-id","plugin","react","react-native"],"created_at":"2025-03-22T18:19:30.323Z","updated_at":"2025-03-22T18:19:30.808Z","avatar_url":"https://github.com/alex-mobvantage.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-gaid\n\nGets the Google Advertising ID for [React Native](https://github.com/facebook/react-native)\n\n## Install\n\n```shell\nnpm install --save react-native-gaid\n```\n\n## Automatically link\n\n#### With React Native 0.27+\n\n```shell\nreact-native link react-native-gaid\n```\n\n#### With older versions of React Native\n\nYou need [`rnpm`](https://github.com/rnpm/rnpm) (`npm install -g rnpm`)\n\n```shell\nrnpm link react-native-gaid\n```\n\n## Manually link\n\n- in `android/app/build.gradle`:\n\n```diff\ndependencies {\n    ...\n    compile \"com.facebook.react:react-native:+\"  // From node_modules\n+   compile project(':react-native-gaid')\n}\n```\n\n- in `android/settings.gradle`:\n\n```diff\n...\ninclude ':app'\n+ include ':react-native-gaid'\n+ project(':react-native-gaid').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gaid/android')\n```\n\n#### With React Native 0.29+\n\n- in `MainApplication.java`:\n\n```diff\n+ import com.mobvantage.react.gaid.RNGaidPackage;\n\n  public class MainApplication extends Application implements ReactApplication {\n    //......\n\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n+         new RNGaidPackage(),\n          new MainReactPackage()\n      );\n    }\n\n    ......\n  }\n```\n\n#### With older versions of React Native:\n\n- in `MainActivity.java`:\n\n```diff\n+ import com.mobvantage.react.gaid.RNGaidPackage;\n\n  public class MainActivity extends ReactActivity {\n    ......\n\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n+       new RNGaidPackage(),\n        new MainReactPackage()\n      );\n    }\n  }\n```\n\n## Example\n\n```js\nimport GAID from 'react-native-gaid';\n\nGAID.getAdvertisingInfo().then(info =\u003e {\n  console.log('Google Advertising ID', info.advertisingId);\n  console.log('Is Limit Ad Tracking Enabled', info.isLimitAdTrackingEnabled);\n})\n.catch(err =\u003e {\n  console.log('Something went wrong', err);\n});\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-mobvantage%2Freact-native-gaid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-mobvantage%2Freact-native-gaid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-mobvantage%2Freact-native-gaid/lists"}