Giter VIP home page Giter VIP logo

Comments (17)

albwebbergate avatar albwebbergate commented on August 16, 2024

I've got the exact same problem and I, temporarily, solved this issue by using ti.cloudpush 4.0.3 and copying the google-play-services-base.jar from the lib folder of ti.android.admob to the lib folder of ti.cloudpush (i overwrite it).

It's related with this issue opened by me #2

from ti.android.admob.

deckameron avatar deckameron commented on August 16, 2024

Hi folks,

I bump into this issue a LOT while using modules with google-play-services.jar, and the only solution that works everytime is Proguard.
ti.cloudpush uses com.google.android.gms.gcm
ti.android.admob uses com.google.android.gms.ads

Follow the tutorial and create a Proguard with this config:

-keep public class com.google.android.gms.ads.** {
  public protected *;
}

-keep public class com.google.android.gms.gcm.** {
  public protected *;
}

from ti.android.admob.

ottopic avatar ottopic commented on August 16, 2024

Hello,
can I use https://github.com/appcelerator-modules/ti.playservices to solve the problem?

from ti.android.admob.

albwebbergate avatar albwebbergate commented on August 16, 2024

I think that @deckameron have to change the module itself to support ti.playservices or am I wrong?

Because in tiapp.xml we have to put the exact version of com.google.android.gms.version to make the module work.

from ti.android.admob.

kerberosargos avatar kerberosargos commented on August 16, 2024

Firstly, thank you very much for your module. Can you update it for SDK 7.0?

from ti.android.admob.

deckameron avatar deckameron commented on August 16, 2024

@kerbooo could you try this one, please?

from ti.android.admob.

kerberosargos avatar kerberosargos commented on August 16, 2024

@deckameron Thank you very much your support. It is working very well with SDK 7.0.2 but I can not show smart BANNER and INTERSTITIAL ADVIEW same window together. Smart banner shown but INTERSTITIAL does not shown. Is there any specific setting?

My sample code as below;

$Admob = require("ti.android.admob");

var $AdmobView = $Admob.createView({
				top : 0,
				adSizeType : "SMART", //RECTANGLE, FULLBANNER, LEADERBOARD, SMART
				publisherId : "ca-app-pub-my-id", 
				testing : false
			});

$.AdmobView.add($AdmobView); //> 

var $AdmobInterstitial = $Admob.createView({
	top : 0,
	adSizeType : "INTERSTITIALAD",
	publisherId : "ca-app-pub-my-INTERSTITIALAD-id", 
	testing : false
});

$AdmobInterstitial.addEventListener('ad_received', function(e) {
	Titanium.API.warn("Interstital Ad Received");
});

$AdmobInterstitial.addEventListener('ad_not_received', function(e) {
	Titanium.API.error("Interstital Ad failed");
});

$AdmobInterstitial.addEventListener('ad_ready_to_be_shown', function(e) {
	Titanium.API.warn("Interstital Ad is READY!");
	$AdmobInterstitial.showAdNow();
});

$AdmobInterstitial.addEventListener('ad_not_ready_yet', function(e) {
	Titanium.API.warn("Interstital Ad is not ready yet!");
});

$AdmobInterstitial.addEventListener('ad_being_shown', function(e) {
	Titanium.API.warn("Interstital Ad being shown right now!");
});

$AdmobInterstitial.addEventListener('ad_closed', function(e) {
	Titanium.API.warn("Interstital ad close successfully. RIP!");
});
				

I am getting warns as below

[WARN] :   DynamiteModule: Local module descriptor class for com.google.android.gms.ads.dynamite not found.
[WARN] :   chromium: [WARNING:render_frame_host_impl.cc(2750)] OnDidStopLoading was called twice.

from ti.android.admob.

ottopic avatar ottopic commented on August 16, 2024

@kerbooo you need to use ti.admob because it supports ti.playservices . ti.android.admob doesn’t support it.

from ti.android.admob.

kerberosargos avatar kerberosargos commented on August 16, 2024

from ti.android.admob.

ottopic avatar ottopic commented on August 16, 2024

It works if it is the unique module that use play service. If you use more then one services it can’t works. This is about the issue that I opened 4 months ago.

from ti.android.admob.

kerberosargos avatar kerberosargos commented on August 16, 2024

@ottopic My problem about showing two banners in same window at same time. I mean I have a window which is include a SMART banner and it is working. Extra I would like to show INTERSTITIAL banner in same window too. But INTERSTITIAL banner is not showing.

from ti.android.admob.

deckameron avatar deckameron commented on August 16, 2024

@ottopic the 3.0 on dist folder is now using ti.playservices and I have also implemented the Advanced Native Ads.

@kerbooo I didn't know of this issue. I will take a look asap.

from ti.android.admob.

kerberosargos avatar kerberosargos commented on August 16, 2024

@deckameron Hi again. Firstly thank you for great support. Could you check error?

from ti.android.admob.

deckameron avatar deckameron commented on August 16, 2024

Hi @kerbooo,
I have been struggling with the issue you stated before but unfortunately I could not reproduce it.
This is the code I am using and it works perfectly. Both ads are shown.

var admob = require("ti.android.admob");

var window = Titanium.UI.createWindow({
	backgroundColor : '#F2F2F2'
});

//TRADITIONAL ADVIEW
var smartAd = admob.createView({
    top : 0,
    left : 0,
    right : 0,
    adSizeType : 'SMART', //RECTANGLE, FULLBANNER, LEADERBOARD, SMART, FLUID
    publisherId : "ca-app-pub-XXXXXXXXXXX/AAAAAA",
    testing : true,
    backgroundColor : '#DEDEDE',
    zIndex : 1000
}); 
window.add(smartAd);   

smartAd.addEventListener('ad_received', function(e) {
    Titanium.API.info(JSON.stringify(e));
    Titanium.API.info("Ad received");
});

smartAd.addEventListener('ad_not_received', function(e) {
    Titanium.API.info(JSON.stringify(e));
    Titanium.API.error("Ad failed");
});

//===================================
//INTERSTITIAL ADVIEW
var interstitialAd = admob.createView({
    adSizeType: 'INTERSTITIALAD',
    publisherId: 'ca-app-pub-XXXXXXXXXXX-BBBBBBB',
}); 
window.add(interstitialAd);   

interstitialAd.addEventListener('ad_received', function(e) {
    Titanium.API.warn("Interstital Ad Received");
});

interstitialAd.addEventListener('ad_not_received', function(e) {
    Titanium.API.error("Interstital Ad failed");
});

interstitialAd.addEventListener('ad_ready_to_be_shown', function(e) {
    Titanium.API.warn("Interstital Ad is READY!");
    interstitialAd.showAdNow();
});

interstitialAd.addEventListener('ad_not_ready_yet', function(e) {
    Titanium.API.warn("Interstital Ad is not ready yet!");
});

interstitialAd.addEventListener('ad_being_shown', function(e) {
    Titanium.API.warn("Interstital Ad being shown right now!");
});

interstitialAd.addEventListener('ad_closed', function(e) {
    Titanium.API.warn("Interstital ad close successfully. RIP!");
});
   
window.open();

from ti.android.admob.

kerberosargos avatar kerberosargos commented on August 16, 2024

@deckameron Really very very thank you. I will try it as you wrote. Cheers.

from ti.android.admob.

kerberosargos avatar kerberosargos commented on August 16, 2024

@deckameron Yes it is working very well. Thank you again.

from ti.android.admob.

deckameron avatar deckameron commented on August 16, 2024

@kerbooo glad to know! :)

from ti.android.admob.

Related Issues (20)

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.