Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@appier/appier-advid-expo-plugin

Package Overview
Dependencies
Maintainers
8
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@appier/appier-advid-expo-plugin

A expo plugin for retrieving advertising id(AAID) on Android.

unpublished
latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
8
Created
Source

appier-advid-expo-plugin

Overview

This plugin is an Expo Config plugin. It extends the Expo config to allow customizing the prebuild phase of managed workflow build which means you don't need to eject to a bare workflow. The purpose of this plugin is to retrieve advertising IDs on Android.

Install

 expo install appier-advid-expo-plugin

Configuration

Using expo install appier-advid-expo-plugin will automatically add the plugin to the plugin array. Please make sure it's the first plugin in the array.

app.json

 {
	 "plugins": [
			["appier-advid-expo-plugin", { "targetAndroid12": true }]
	 ]
 }

plugin props

You can pass props to configure the plugin according to your environment.

Prop NameDescription
targetAndroid12optional(boolean) If your devices target Android 12 or above, it's necessary to set this prop to true to ensure the plugin works. This would be false if targetAndroid12 doesn't provide.

EAS (Expo Application Services)

To work with managed workflow, EAS is necessary for you to build your project. Follow the document to set up your app. Once you've setup, there should be a eas.json and you are able to build your app by

eas build --platform android

Usage

Make sure you've already started your custom development client to serve your build from EAS. For more info, please see this document. Basically, the plugin gives you the ability to use our custom native modules call AdvertisingIdModule.

Method NamereturnDescription
getAdIdpromiseGet Android Advertising Id

You can then access the module and get the AAID by:

App.js

const { AdvertisingIdModule } = NativeModules;
export default App = () => {
	useEffect(()=> {
		const getId = async () => {
			const id = await AdvertisingIdModule.getAdId();
			console.log("id =", id);
		}
		getId();
	}, []}
	...
}

FAQs

Package last updated on 15 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts