praves77 / cordova-plugin-android-idfa Goto Github PK
View Code? Open in Web Editor NEWPhonegap, Cordova, Intel XDK plugin for Android to get Advertising Id (IDFA) Info
License: MIT License
Phonegap, Cordova, Intel XDK plugin for Android to get Advertising Id (IDFA) Info
License: MIT License
Hey, I installed the plugin but I do not know which object to use to call the functions. I tried with injecting androidIDFA and link to the anfroidIDFA.js in the head but it always says it is undefined.
Hi,
Commits 46a2219 & fed9b06 include iOS support but the public NPM package https://www.npmjs.com/package/cordova-plugin-android-idfa is tagged to the version 1.0.6 without these commits.
Can we bump the version in package.json
to 1.0.7 to add iOS support on the npm installable version? This would be great!
Best,
Ivar
I tried accessing the object argument as the documentation suggested, but it's wrongly labeld, here's my code:
window.androidIDFA.getAdInfo((sucess)=>{
self.idfaMessage = JSON.stringify(sucess);
self.idfa = JSON.stringify(sucess);
self.cdRef.detectChanges();
}
the object printed however is: {'adId: ..., limitAd:false}
instead of "idfa" as documentation states.
after installing google play service plugin and IDFA plugin , when I run ionic cordova build .
I get this error
FAILURE: Build failed with an exception.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Today I have implemented this plugin in my Ionic app.
The androidIDFA object is available like it should and I am able to call it's methods.
In the getLimitAd succes callback, I am receiving the following object:
{limitAd: true}
As I understand it (I may understand incorrectly) this limitAd boolean is based on the following:
On that page however the setting "Advertisements based on your interests" is "on".
So I'd expect "limitAd" to be "false".
I also tried to disable the setting on the page, but that doesn't change the value of "limitAd".
Are there other things that may interfere with the behaviour of your plugin?
For example: I am not using any specific "Google advertising" of any sort in my app. I would like to recieve the IDFA to send it to SpotX advertisements.
Also: apart from your plugin, I did not implement anything else specifically to get this working.
In the Readme you mention that the plugin depends on com.google.play.services. Is that something I have to ad to my app specifically? I assumed that com.google.play.services is something in my Android phone and also that the plugin would break if that library is not available.
This is Samsung phone.
What do I need to call to get it?
Hi! Google Services dependency is 404 not found. The project has been moved to:
https://registry.npmjs.org/cordova-plugin-googleplayservices
instead of: "com.google.play.services": "*"
var app = {
// Application Constructor
initialize: function () {
console.log('initialize');
document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
},
// deviceready Event Handler
onDeviceReady: function () {
console.log('devoce ready');
this.receivedEvent('deviceready');
// cordova.exec(cb, err, "CDVIdfa", "advertisingIdentifier", []);
window.androidIDFA.getAdId((success)=>{
console.log('=============', success, "=========="); //
}, (err) => {
console.log('err', err);
});
},
// Update DOM on a Received Event
receivedEvent: function (id) {
var parentElement = document.getElementById(id);
var listeningElement = parentElement.querySelector('.listening');
var receivedElement = parentElement.querySelector('.received');
listeningElement.setAttribute('style', 'display:none;');
receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id);
}
};
app.initialize();
It would be ideal if you could update the package in NPM. For now, you can install using
cordova plugin add https://github.com/praves77/cordova-plugin-android-idfa.git
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.