Discussion Forums  >  Startapp Integration

Replies: 15    Views: 730

Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
12/25/14 11:08 AM (9 years ago)

Startapp Banner with java code

I am trying to integrate start app banner in my app If I add following piece of code in my bt_activity_host.xml the banner displays at top <com.startapp.android.publish.banner.bannerstandard.BannerStandard android:id="@+id/startAppStandardBanner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true"/> I wanna show the banner at bottom of screen and start app has given following code to be inserted in my main activity ( I guess ) but I don`t know where to add these lines (I am no programmer so I will need a detailed answer ). // Get the Main relative layout of the entire activity RelativeLayout mainLayout = (RelativeLayout)findViewById(R.id.mainLayout); // Define StartApp Banner Banner startAppBanner = new Banner(context); RelativeLayout.LayoutParams bannerParameters = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); bannerParameters.addRule(RelativeLayout.CENTER_HORIZONTAL); bannerParameters.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); // Add to main Layout mainLayout.addView(startAppBanner, bannerParameters); Please help ...
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/25/14 05:17 PM (9 years ago)
What is the purpose of the 'start app banner' ? Could you use a startup screen instead? Most of those plugins are 'drop in' without needing to code any. Cheers! -- Smug
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
12/25/14 09:43 PM (9 years ago)
you would just put the code in the layout file of the plugin you want it to show up on. you can use bt_activity_host.xml to have it show in every screen.Its the same way you would do admob on buzztouch,not sure if you've done that before,but I would have to post back after I find the app I used the banner ad in. remind me if needed.I get busy alot ha
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
12/25/14 10:24 PM (9 years ago)
oh and you would add the java code under this line of code in the plugins screen View thisScreensView = inflater.inflate(R.layout.cm_awlpro, container, false);
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
12/25/14 11:58 PM (9 years ago)
Admob .. Aah More I read about integrating admob more I get confused :( I am seeing old tutorials which shows integrating with sdk but its not working and new developer tutorial wants me to add adfrgment and I couldn`t understand how and where in BT . My start app banner is displaying at top but I want to show it at bottom ,Putting the code in custom_url after View thisScreensView = inflater.inflate(R.layout.cm_awlpro, container, false); is showing errors .
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/26/14 07:18 AM (9 years ago)
>More I read about integrating admob more I get confused :( Exactly. It took me three months to integrate AdMob and I am programmer. You can download this app of mine and see how it's working: https://play.google.com/store/apps/details?id=com.operamusic For each plugin, I had to develop a slightly different approach to show the ads. Currently, I have ads in Menu Image, HTML Pro, awlPro and some others. NOT easy if you are not a programmer! However, now I can choose ads at the top of the screen, at the bottom, or both, or none, all from the control panel for the plugin. And the AdMob just brings a bit more money every month, so I am very pleased with it. I also have code for interstitial ads, but they are not making much money in my app. >,Putting the code in custom_url after is showing errors . You have to change both the XML file and the corresponding Java file for the plugin, otherwise there will be errors.
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
12/26/14 08:04 AM (9 years ago)
@Dusko While searching for admob integration I cam across your app yesterday congrats for more than 100,000 Installs (Y). One of the reason for choosing Startapp is its easy integration but no add filter is seen in dashboard. For admob I contacted a developer at Fiverr but he requested to cancel the order as he was finding it complicated to integrate in BT app.
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
12/26/14 08:25 AM (9 years ago)
@Dusko While searching for admob integration I cam across your app yesterday congrats for more than 100,000 Installs (Y). One of the reason for choosing Startapp is its easy integration but no add filter is seen in dashboard. For admob I contacted a developer at Fiverr but he requested to cancel the order as he was finding it complicated to integrate in BT app.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
12/26/14 11:52 AM (9 years ago)
mostly it depends on where you added the xml code in the layout file.try adding this first to the startapp xml: android:layout_alignParentBottom="true" so in your case the xml would be: <com.startapp.android.publish.banner.bannerstandard.BannerStandard android:id="@+id/startAppStandardBanner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_alignParentBottom="true"/>
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
12/26/14 12:51 PM (9 years ago)
I put this line in xml just above </FrameLayout> & there was no change , and now after putting this in relative layout below </ImageView> I am seeing the banner at bottom in menu plugins only. Landing page of my app uses Menu buttons plugin and I use an image for menu button So startapp banner is displaying behind that menu image. https://lh4.googleusercontent.com/-uEufnAXRJjY/VJ26TX79Y-I/AAAAAAAADAk/gXkwWnKA2Cs/s512/Screenshot_2014-12-27-01-05-21.jpg No banner is seen in custom URL
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
12/26/14 12:55 PM (9 years ago)
My app is dedicated to Urdu ( An Indian Origin language ) ..
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
12/26/14 01:24 PM (9 years ago)
M
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
12/26/14 02:06 PM (9 years ago)
Try android:layout_below="@id/menuRow".I'm guessing your using BT_activity_host.XML? I think that codes right I'm not at home so not 100%.let me know though.you would change the id to whatever element you want it below.I don't own the plugin but it should be something like what's in the above code.that's if you put it in that plugins layout.would bee better to do it that way probably I edited above code and deleted the plus sign before the @ sign
 
Saifu
Android Fan
Profile
Posts: 46
Reg: Apr 07, 2014
MUmbai
660
like
12/26/14 11:32 PM (9 years ago)
Yes I am editing BT_activity_host.XML After replacing android:layout_alignParentBottom="true" with android:layout_below="@id/menuRow". I am getting following error error: Error: No resource found that matches the given name (at 'layout_below' with value '@id/menuRow').
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
12/27/14 10:10 AM (9 years ago)
Don't replace the other line.put it under that code.the error will still show because there are not any elements with the id menuRow in that layout file.you probably could use that file but don't remember what it looks like.I usually just put the xml in the plugins layout I am using.I'm pretty sure her either plugin I have is the same as this ine.ill experiment and post back.I needed to do this in one of my apps anyway
 
matthewstartapp
Code is Art
Profile
Posts: 1
Reg: Dec 29, 2014
Tel Aviv
10
like
12/29/14 08:32 AM (9 years ago)
Hi Saifu, I am on the Support Team at startapp and I am happy to help you with this issue. Send me an email at [email protected] with your main activity file attached and your developer ID and I will be happy to tell you exactly what you need to do to move the banner to the bottom of the screen. Look forward to hearing from you
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.