Adding a Splash Activity

Discussion in 'Tutorials' started by Vas, Sep 3, 2013.

  1. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    Sabastian, How can I change the width of Leadbolt Banner to Automatic?
  2. sebastian Seasoned Vet

    Member Since:
    Feb 16, 2013
    Message Count:
    135
    Likes Received:
    36
    Trophy Points:
    100
    You should change the propriety of web view were you put the code of Leadbolt banner
  3. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    I have put the code in same style like Eraste has mentioned for Splash.java

    Code (text):
            AdController myController = new AdController(this, "code");
            myController.loadAd();
            AdController myController1 = new AdController(this, "code");
            myController1.loadAd();
  4. sebastian Seasoned Vet

    Member Since:
    Feb 16, 2013
    Message Count:
    135
    Likes Received:
    36
    Trophy Points:
    100
    You should chance the splash.xml

    And write
    <WebView
    android:id=……………
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"/>
  5. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    Sorry, I tested but it is not working. Leadbolt banner sizes are fixed and defined in Leadbolt account but there is no option to set width to automatic. If you can send me any compiled apk with Leadbolt banner ad then please send me so I can check on my devices if it looks fine.
  6. sebastian Seasoned Vet

    Member Since:
    Feb 16, 2013
    Message Count:
    135
    Likes Received:
    36
    Trophy Points:
    100
    OK, you can try with different size banner of leadbolt.
    When you create a banner there is the size that you can change...probablly you should create 4 different banner of che same app, but change the Size...if you see in the guide of leadbolt you can see that there is che multuscreen resolution in wich they tell to do this...so now I al not at home and I come back tomorrow...try in this way...and tell me...how fan you put the setting button on the splash screen??
  7. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
  8. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    Ok I solved the problem by adding these two lines in supports screens

    Code (text):
    android:xlargeScreens="true"
    android:anyDensity="false"
    sebastian likes this.
  9. fatos LWC Major

    Member Since:
    Apr 2, 2013
    Message Count:
    268
    Likes Received:
    73
    Trophy Points:
    200
    @Friendlyspeaking Me two Im having the same problem whith leadbolt banners, on my galaxy s4 they are shown in small size but in galaxy s3 they are ok...
    I added those two lines at support screen in the manifest but it is not working,do I have to add something else in another place
  10. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    @Fetos If you add the above two lines in the supports screens then Leadbolt banner looks fine on every mobile including S4 but at the same time moving objects in wallpaper become tiny. I think android:anyDensity="true" which is "true" by default is necessary to run wallpaper on every device but it doesn't work for Leadbolt banner.
  11. fatos LWC Major

    Member Since:
    Apr 2, 2013
    Message Count:
    268
    Likes Received:
    73
    Trophy Points:
    200
    I added those two lines but it is not working on my S4...again I have small banner
  12. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    Copy paste and replace the whole code in Manifest, it is working fine on my all android mobiles. Create a 320 x 50 sized banner in Leadbolt

    Code (text):
        <supports-screens
            android:smallScreens="false"
            android:normalScreens="true"
            android:largeScreens="true"
            android:xlargeScreens="true"
            android:anyDensity="false"/>
    fatos likes this.
  13. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    This is how it looks on S4

    [IMG]
    fatos likes this.
  14. fatos LWC Major

    Member Since:
    Apr 2, 2013
    Message Count:
    268
    Likes Received:
    73
    Trophy Points:
    200
    @Friendlyspeaking :) Thanks now is working like a charm,I forgot to add those two symbols /> and that was the reason why didnt worked.Thanks again.
    Did you added promo links of other live wallpaper to splash screen,because I didnt try I was busy for two days
  15. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    @fatos Please check your live wallpaper on S4, on mine the moving objects looks tiny with this setting, either banner is working or the moving objects. Yes, I have added a button which links to my other apps
  16. fatos LWC Major

    Member Since:
    Apr 2, 2013
    Message Count:
    268
    Likes Received:
    73
    Trophy Points:
    200
  17. fatos LWC Major

    Member Since:
    Apr 2, 2013
    Message Count:
    268
    Likes Received:
    73
    Trophy Points:
    200
    @Friendlyspeaking did you find something about size of leadbolt banners.....and will you tell us how did you linked button from splash screen to other live wallpapers on play store
  18. Friendlyspeaking Active Member

    Member Since:
    Oct 12, 2012
    Message Count:
    86
    Likes Received:
    27
    Trophy Points:
    50
    I have tested and implementing HTML banner instead of Fixed Size Banner which automatically gets adjusted on the screen. I had also sent mail to Leadbolt but no use, this is the following reply I have received.

    "The banners are difficult have auto-re-size, as the coding and available images make it difficult to get the banners the right size. We are currently working on it, however quite a lot of the advertisers only offer banners in one or two sizes, hence it is difficult to auto-resize without resulting in stretching (which does not look good!).

    If there are any updates I will let you know. You can put more than one banner size into your apps though if you would like a fix for the mean time. I will also make sure to send this through to our tech team and try to get them to find a resolution soon."

    For linking to other apps on Google Play, create a button in Splash.xml the same way you created for Live Wallpaper Settings and put the following code in Splash.java

    Code (text):
     public void sendMessage2(View view)
        {
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("https://play.google.com/store/apps/developer?id=Your Id"));
        startActivity(intent);
        }
  19. fatos LWC Major

    Member Since:
    Apr 2, 2013
    Message Count:
    268
    Likes Received:
    73
    Trophy Points:
    200
    Thanks frienlyspeaking...but Im having an error at Url...I have quick fixed the error but it sends me just to settings

    Update: I fixed ;)
  20. Joshua Seasoned Vet

    Member Since:
    Jul 12, 2013
    Message Count:
    116
    Likes Received:
    16
    Trophy Points:
    100
    How do I make my splash screen transparent any one got a clue?

Share This Page