0

I am trying to integrate Inmobi sdk into my Android project. I've added a Banner using the following code:

    <com.inmobi.monetization.IMBanner android:layout_width="320dp"
                                  android:layout_height="50dp" android:id="@+id/banner"
                                  adSize="15" appId="myAppId" />

I've added the initialization code to the activity's onCreate function as follows:

    InMobi.initialize(this, "myAppId");
InMobi.setLogLevel(InMobi.LOG_LEVEL.DEBUG.DEBUG);

I am using the property-id from the inmobi dashbaord instead of "myAppId". I've added my phone to the test deviced list using the "Publisher device Id" from logcat which is written to the output by the Inmobi SDK debug statements. When I start the application on my device, I get the following:

08-06 19:15:17.211: DEBUG/[InMobi]-4.4.3(20608): Publisher device Id is .........
08-06 19:15:17.211: DEBUG/[InMobi]-[Network]-4.4.3(20608): >>>> Start loading new Ad <<<<
08-06 19:15:17.211: DEBUG/[InMobi]-[Network]-4.4.3(20608): Current Ad State: loading
08-06 19:15:17.371: DEBUG/[InMobi]-[RE]-4.4.3(20608): Injecting JavaScript: window.mraid.broadcastEvent('sizeChange',320,50);
08-06 19:15:17.381: DEBUG/[InMobi]-[Network]-4.4.3(20608): Exception retreiving Ad due to key problem
08-06 19:15:17.381: DEBUG/[InMobi]-[Network]-4.4.3(20608): >>> Got HTTP REQUEST callback. Status: 1
08-06 19:15:17.391: DEBUG/[InMobi]-[Network]-4.4.3(20608): INTERNAL_ERROR
08-06 19:15:19.313: DEBUG/[InMobi]-[Analytics]-4.4.3(20608): NetworkManager->handleMessag: msg:{ when=-31ms what=1001 target=android.os.Handler targetCallback=com.inmobi.commons.analytics.net.AnalyticsNetworkManager$a$a@42132c38 }
08-06 19:15:19.333: DEBUG/[InMobi]-[Analytics]-4.4.3(20608): IMAppDatabaseManager->getEvents
08-06 19:15:19.353: DEBUG/[InMobi]-[Analytics]-4.4.3(20608): PayloadBuilder->getPayloadList:
08-06 19:16:17.395: DEBUG/[InMobi]-4.4.3(20608): Publisher device Id is ......
08-06 19:16:17.395: DEBUG/[InMobi]-[Network]-4.4.3(20608): >>>> Start loading new Ad <<<<
08-06 19:16:17.405: DEBUG/[InMobi]-[Network]-4.4.3(20608): Current Ad State: loading
08-06 19:16:17.475: DEBUG/[InMobi]-[Network]-4.4.3(20608): sm=...............
08-06 19:16:17.536: DEBUG/[InMobi]-[Network]-4.4.3(20608): Exception retrieving ad
08-06 19:16:17.536: DEBUG/[InMobi]-[Network]-4.4.3(20608): >>> Got HTTP REQUEST callback. Status: 1
08-06 19:16:17.536: DEBUG/[InMobi]-[Network]-4.4.3(20608): NETWORK_ERROR
OKAN
  • 421
  • 1
  • 5
  • 10

1 Answers1

1

The first error is INTERNAL_ERROR. Its thrown when the sdk is still warming up before it can get ads for you. It happens only for the first time when you install the app instance. The second error is a NETWORK_ERROR. This is seen when your device is not connected to the network or there is some network connectivity issue on your device. Please check that once and also make sure that you have added the mandatory permissions of INTERNET and ACCESS_NETWORK_STATE in your app

aasha
  • 446
  • 4
  • 11