Inapp-Store hinzugefuegt, Release-Batch Dateien erstellt.
This commit is contained in:
@@ -35,7 +35,9 @@ window.globalVariable = {
|
||||
instagram: "your_api_key",//Use for Instagram API clientID.
|
||||
googlePlus: "your_api_key",//Use for Google API clientID.
|
||||
},
|
||||
adMob: "ca-app-pub-3940256099942544/6300978111" //Use for AdMob API clientID.
|
||||
adMob: "ca-app-pub-3940256099942544/6300978111", //Use for AdMob API clientID.
|
||||
adfree: ""
|
||||
|
||||
};// End Global variable
|
||||
|
||||
|
||||
@@ -236,6 +238,45 @@ angular.module('starter', ['ionic','ngIOS9UIWebViewPatch','starter.controllers',
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Google-Stroe Initialisieren START
|
||||
*/
|
||||
if((window.device && device.platform == "Android") && typeof inappbilling !== "undefined") {
|
||||
inappbilling.init(StoreInitsuccessHandler, StoreIniterrorHandler, {showLog:true});
|
||||
}
|
||||
|
||||
function StoreInitsuccessHandler (result) {
|
||||
inappbilling.getPurchases(purchasessuccess, purchasesfail)
|
||||
}
|
||||
|
||||
function StoreIniterrorHandler (error) {
|
||||
window.globalVariable.adfree="";
|
||||
}
|
||||
|
||||
function purchasessuccess (result) {
|
||||
var p = result[0];
|
||||
console.debug(p);
|
||||
if(p['productId'] == 'adfree') {
|
||||
window.globalVariable.adfree="adfree";
|
||||
}
|
||||
|
||||
if(p['productId'] == 'sponsoringsmall') {
|
||||
window.globalVariable.adfree="adfree";
|
||||
}
|
||||
|
||||
if(p['productId'] == 'sponsoringbig') {
|
||||
window.globalVariable.adfree="adfree";
|
||||
}
|
||||
}
|
||||
|
||||
function purchasesfail (error) {
|
||||
console.log("ERROR: \r\n"+error );
|
||||
}
|
||||
|
||||
/*
|
||||
* Google-Stroe Initialisieren ENDE
|
||||
*/
|
||||
|
||||
initialSQLite();
|
||||
initialRootScope();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user