Coder Social home page Coder Social logo

cordova-plugin-android-idfa's People

Contributors

apparition47 avatar jun711 avatar patriciagao avatar praves77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-plugin-android-idfa's Issues

How do I access the functions?

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.

On Documentation, object argument in window.androidIDFA.getAdInfo is badly labeled

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.

com.android.ide.common.process.ProcessException: Failed to execute aapt

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.

  • What went wrong:
    Execution failed for task ':processDebugResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

androidIDFA.getLimitAd gives limitAd true, while it should be false

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:

  • The Google account I am logged in with on my phone
  • and the "Advertisements based on your interests" setting on the following webpage https://www.google.com/settings/ads (for that same Google account ofcourse)

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.

Not able to get AdId

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();

The version in NPM is outdated

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.