Results 1 to 12 of 12
  1.    #1  
    I really need help cause i cant get these ads to work and its driving me crazy! I'm not too developer savvy and therefore using ares to make my app. I want to put admob ads on my app. I already have an account, publisher id and etc and i know the code they posted up on Google code. However, i just i cant get it to work! Can someone PLEASE HELP ME or even if you give me the code. I only have the stage-assistant and the main assistant so the ads would go in the Main-Assistant! SOMEONE PLEASE HELp!

    IntegrationDocumentation - admob-webos - Developer documentation - Project Hosting on Google Code
  2. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
    #2  
    Try this:

    Under apps, create a new dir called say "utils", and put the admob.jsjsjs $file$ $in$ $there$.

    Then follow the directions on the google code page
    Apps: MyQ for Netflix (Phone/TouchPad), Giantbomb (Phone), Excavate (Reddit/Digg clients for TouchPad)
  3.    #3  
    Quote Originally Posted by mosdl View Post
    Try this:

    Under apps, create a new dir called say "utils", and put the admob.jsjsjs $file$ $in$ $there$.

    Then follow the directions on the google code page
    Tried that, still doesn't work. Is there a javascript function i have to create?
  4. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
    #4  
    In your main assistant.jsjsjs $file$, $you$ $need$ $to$ $include$ $the$ $code$ $marked$ &$quot$;$In$ $your$ $main$ $scene$ $first$ $initialize$ $AdMob$ $with$: &$quot$; $in$ $the$ $setup$() $function$.

    In the same setup file you want to copy the other code as well and change "YourPubId-bottom-ad-position" to be an id of the element in the main scene you want to become the ad.
    Apps: MyQ for Netflix (Phone/TouchPad), Giantbomb (Phone), Excavate (Reddit/Digg clients for TouchPad)
  5.    #5  
    Quote Originally Posted by mosdl View Post
    In your main assistant.jsjsjs $file$, $you$ $need$ $to$ $include$ $the$ $code$ $marked$ &$quot$;$In$ $your$ $main$ $scene$ $first$ $initialize$ $AdMob$ $with$: &$quot$; $in$ $the$ $setup$() $function$.

    In the same setup file you want to copy the other code as well and change "YourPubId-bottom-ad-position" to be an id of the element in the main scene you want to become the ad.
    HUH/ thanks for your help, but i dont understand one bit, do you think you could possibly post the code Thanks!
  6. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
    #6  
    The website you link to has 3 code snippets.

    You want to add
    Code:
    {"source": "app\/utils\/admob.jsjsjs&$quot$;},
    to your sources.json file

    In your mainassistant.jsjsjs $file$:

    Code:
      AdMob.ad.initialize({
                    pub_id: 'YourPubId', // your publisher id
                    bg_color: '#ccc', // optional background color, defaults to #fff
                    text_color: '#333', // optional background color, defaults to #000
                    test_mode: true // optional, set to true for testing ads, remove or set to false for production
      });
    
            AdMob.ad.request({
                    onSuccess: (function (ad) { // successful ad call, parameter 'ad' is the html markup for the ad
                            this.controller.get('admob_ad').insert(ad); // place mark up in the the previously declared div
                    }).bind(this),
                    onFailure: (function () { // no ad was returned or call was unsuccessful
                            // do nothing? 
                    }).bind(this),
        
            });
    pub_id: 'YourPubId' - replace YourPubId with the id admob gave you

    You also need to add to main-scene.html this code:

    <div id="admob_ad"></div>

    This will become your ad code
    Apps: MyQ for Netflix (Phone/TouchPad), Giantbomb (Phone), Excavate (Reddit/Digg clients for TouchPad)
  7.    #7  
    WOW, i seriously must suck at this cause i still am not getting it to work. i've got everything except the main assistant part. it keeps crashing my app (white screen) do you think you could possibly write the whole main-assistant or is taht and i am actually making an error and theres nothing left. I really appreciated this btw.
  8.    #8  
    Im not sure if i did this right cause it still aint working but atleast my app isn't crashing
    Code:
    MainAssistant.prototype.setup = function() {  AdMob.ad.initialize({
                    pub_id: 'My pubid #', // your publisher id
                    bg_color: '#ccc', // optional background color, defaults to #fff
                    text_color: '#333', // optional background color, defaults to #000
                    test_mode: true // optional, set to true for testing ads, remove or set to false for production
      });
    
            AdMob.ad.request({
                    onSuccess: (function (ad) { // successful ad call, parameter 'ad' is the html markup for the ad
                            this.controller.get('admob_ad').insert(ad); // place mark up in the the previously declared div
                    }).bind(this),
                    onFailure: (function () { // no ad was returned or call was unsuccessful
                            // do nothing? 
                    }).bind(this),
        
            });
    
    }
  9.    #9  
    im starting to think its ares thats not letting me do it...
  10. #10  
    did you change:

    Code:
    My pubid #
    to your pubid number in the code? if not it obviously won't work...
  11. #11  
    BUMP

    I am also having problems with this, i have learned that alot of functions do not work right in ares and things are slightly changed which causes an entire app to crash. really frustrating when you actually research how to do something but all instructions are for the mojo sdk and dont work in ares. shouldnt palm have made them work together not separately? I cant get it to work either, ive tried alot of different things so far.
    i1000+ -> i90 -> i530 -> i730 -> i530 -> i730 -> i560 -> i930 -> i215 -> i860 -> i930 -> i860 -> i870 -> i880 -> i870 -> i850 -> i870 -> i830 -> i9 -> Pre
  12. rothoof's Avatar
    Posts
    510 Posts
    Global Posts
    514 Global Posts
    #12  
    Quote Originally Posted by kdubhotsauce View Post
    Im not sure if i did this right cause it still aint working but atleast my app isn't crashing
    Code:
    MainAssistant.prototype.setup = function() {  AdMob.ad.initialize({
                    pub_id: 'My pubid #', // your publisher id
                    bg_color: '#ccc', // optional background color, defaults to #fff
                    text_color: '#333', // optional background color, defaults to #000
                    test_mode: true // optional, set to true for testing ads, remove or set to false for production
      });
    
    
    
    
    
    
            AdMob.ad.request({
                    onSuccess: (function (ad) { // successful ad call, parameter 'ad' is the html markup for the ad
                            this.controller.get('admob_ad').insert(ad); // place mark up in the the previously declared div
                    }).bind(this),
                    onFailure: (function () { // no ad was returned or call was unsuccessful
                            // do nothing? 
                    }).bind(this),
        
            });
    
    }

    Is "Main-assistant.jsjsjs $need$ $to$ $be$ $added$ $to$ $you$ $app$ $files$ $or$ $is$ $it$ $the$ $main$ $scene$ $of$ $your$ $app$?

Tags for this Thread

Posting Permissions