04-01-2012 09:17 PM
Hello,
when I add the following code for putting a banner on my app, the simulator doesn't start up, and i don't see any exceptions. lines 1, and 2 don't cause any issues bu when I add the banner then it doesn't work (on Sim or Phone)
1. Banner bannerAd = new Banner(00000, null);
2. bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);
3. add(bannerAd);
Thank You
Sam
04-19-2012 03:56 PM
Hi Sam and welcome to the forums!
Could you elaborate on "the simulator doesn't start up"? What does the simulator do? Does it launch? If so, how far does it get?
What are you adding the Banner to (MainScreen etc)?
Could you provide a bigger snippet of code (surrounding code would be helpful)?
Regards,
04-22-2012 02:55 AM
Hi Garrett,
the issue with the simulator, in the part when the OS is booting up (and it says blackberry in the middle with the loading bar in the middle) the loading bar doesn't get to 100% then the screen goes white saying there was a uncaught exception. so i don't even get to the home screen.
i am add the banner to the mainscreen.
Here is a larger postion of the code, i add the banner code in the bottom portion and the advertising JAR i imported was For_Post6.0.0:
private VerticalFieldManager vfm = new VerticalFieldManager(Field.FIELD_VCENTER);
private VerticalFieldManager vfm2 = new VerticalFieldManager(Field.FIELD_VCENTER);
private HorizontalFieldManager bannerField = new HorizontalFieldManager(Field.FIELD_HCENTER);
public FunReadsScreen()
{
super( MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR );
setTitle( "title" );
BitmapField bitmapField;
Bitmap logoBitmap = Bitmap.getBitmapResource("pic.png");
bitmapField = new BitmapField(logoBitmap, Field.FIELD_HCENTER);
add(bitmapField);
Background bg = BackgroundFactory.createSolidBackground(Color.BLAC
vfm.setPadding(15, 0, 10, 150);
vfm2.setPadding(0, 0, 10, 75);
vfm.setBackground(bg);
vfm2.setBackground(bg);
getMainManager().setBackground(bg);
ButtonField button1 = new ButtonField( "btn1", ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);
ButtonField button2 = new ButtonField("btn2", ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);
ButtonField button3 = new ButtonField("btn3", ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);
vfm.add(button1);
vfm.add(button2);
vfm2.add(button3);
add(vfm);
add(vfm2);
Banner bannerAd = new Banner(myZoneID, null);
bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);
bannerField.add(bannerAd);
add(bannerField);
}
04-23-2012 11:40 AM
Thanks fore the code snippet but I forgot to ask for one crucial bit of information, could you provide the simulator model and OS version (Options > Device > About Device Versions)?
After I get this I can repro myself and hopefully offer some sort og workaround or fix for the issue.
04-24-2012 03:58 AM
Hi Garett,
so the simulator i am using is the BlackBerry 9800, running O/S version v6.0.0.141
and the physical device i tried it on was the Blackberry 9810, running O/S version v7.0.0.583
Thanks
Sam
04-24-2012 12:18 PM
Hi Sam,
I tested in the 9800 6.0.0.141 simulator using the code snippet provided and was unable to reproduce the issue, it loaded the ad as expected. Could you please log an issue in Issue Tracker with a small and concise sample application that has been proven to reproduce this issue?
https://www.blackberry.com/jira/secure/Dashboard.j
You can post the Issue Tracker item URL back here and I will continue to investigate through it.
Regards,
04-28-2012 03:56 PM
Thank You Garrett I'll do that,
I was going thorugh the debugger with a little more detail and saw this message as an IOException
Thread [appName(237)id=IDnumber] (Suspended (exception IOException)) :
ClientProtocol(ClientProtocol).handleIOExceptionBe
ClientProtocol(ClientProtocol).ensureOpen() line: 176
ClientProtocol(ClientProtocol).<init>(SocketHost, URL, boolean, boolean, boolean, boolean, WPTCPServiceRecord, ServiceRecord) line: 136
Protocol.doConnection(URL, int, boolean) line: 116
Protocol.openConnection(URL, int, boolean) line: 55
Protocol.openPrim(URL, int, boolean) line: 67
Protocol.openPrim(String, int, boolean) line: 59
RIMConnector.open(int, String, int, boolean, FirewallContext) line: 239
RIMConnector.open(int, String, int, boolean) line: 58
Connector.open(String) line: 831
Banner$FunReads.d() line: not available
Banner$FunReads.a() line: not available
a.run() line: not available
ClientProtocol(ClientProtocol).handleIOExceptionBe
ClientProtocol(ClientProtocol).ensureOpen() line: 176
ClientProtocol(ClientProtocol).<init>(SocketHost, URL, boolean, boolean, boolean, boolean, WPTCPServiceRecord, ServiceRecord) line: 136
Protocol.doConnection(URL, int, boolean) line: 116
Protocol.openConnection(URL, int, boolean) line: 55
Protocol.openPrim(URL, int, boolean) line: 67
Protocol.openPrim(String, int, boolean) line: 59
RIMConnector.open(int, String, int, boolean, FirewallContext) line: 239
RIMConnector.open(int, String, int, boolean) line: 58
Connector.open(String) line: 831
Banner$appName.d() line: not available
Banner$appName.a() line: not available
a.run() line: not available
does any of this look familiar to you?
Thanks
Sam
04-30-2012 09:46 AM
I'll know more once logged in Issue Tracer with a sample.
05-12-2012 02:08 PM
for some reason and i don't know why, the ads started working. I had step away from it for a little while cause i didn't have time but when i ran it the other day it started working haha. oh well, on to the next issue then
Thanks for your help!