Notification Time in LeadBolt

Discussion in 'Advertising Discussion' started by wladca, Jul 10, 2013.

  1. wladca Active Member

    Member Since:
    Mar 20, 2013
    Message Count:
    50
    Likes Received:
    4
    Trophy Points:
    50
    It's possible to make same time of notification time to every lwp app in leadbolt ?
    I have a lot of apps and if i would change time to every of them it will took a lot of time.

    Greetings
  2. sebastian Seasoned Vet

    Member Since:
    Feb 16, 2013
    Message Count:
    135
    Likes Received:
    36
    Trophy Points:
    100
    hello, I think that we can not change it all together...
    Hi guys I would like to know if anyone knows how to insert ads notification and app icon with Leadbolt .... I manage to insert one or the other but if you insert them both I get an error ...
  3. NewKid Seasoned Vet

    Member Since:
    Apr 1, 2012
    Message Count:
    100
    Likes Received:
    20
    Trophy Points:
    100
    Where exactly are you getting an error, in your BootReceiver?
    I managed to add them both by using the code for the bootreceiver that is in the first part of the PDF.
    I'm not I'm a PC right now so I can't tell you exactly the code but look for it and try it, I'm sure you'll find it.

    Edit: This is the code I meant:

    Code (text):
    import android.content.BroadcastReceiver;
    import android.content.Context;
    import android.content.Intent;
    import com.<sdkpackagename>.AdController;
    public class BootReceiver extends BroadcastReceiver
    {
    public void onReceive(Context ctx, Intent intent)
    {
    //register the icon ad on reboot
    AdController icon = new AdController(ctx, "YOUR_LB_ICON_SECTION_ID");
    icon.loadIcon();
    AdController notif = new AdController(ctx, "YOUR_LB_SECTION_ID");
    notif.loadNotification();
    // Other App specific code here
    }
    }
  4. sebastian Seasoned Vet

    Member Since:
    Feb 16, 2013
    Message Count:
    135
    Likes Received:
    36
    Trophy Points:
    100
    are you using the last sdk??I'm using the 5 but I have a problem:
    lMY_LB_NOTIFICATION_ID "," MY_LB_ICON_ID "
    these I know them, but
    MY_LB_SECTION_ID where is it?!

    also when you replace com. <sdkpackagename>
    as they replace?
    like this: com.com.dnfowfoiw
    or like this:
    com.dnfowfoiw

    if you can send me part of codiceh you edited:
    the manifest
    the activity
    bootreciver
    so I can compare and find the mistake ... thank you very much
  5. NewKid Seasoned Vet

    Member Since:
    Apr 1, 2012
    Message Count:
    100
    Likes Received:
    20
    Trophy Points:
    100
    I'll post you the code later when I have the time, as for now I answer your questions.

    The MY_LB_SECTION_ID is your Notification code in this case, just look at the code, it targets the notification.

    As for the package name, all you replace in <sdkpackagename> is the name, for example, if this is the name dnfowfoiw, then you just replace <sdkpackagename> for dnfowfoiw
  6. NewKid Seasoned Vet

    Member Since:
    Apr 1, 2012
    Message Count:
    100
    Likes Received:
    20
    Trophy Points:
    100
    Alright, here is the code. Just follow the PDF, it tells you exactly what code to add and where.

    For the Manifest:

    Code (text):
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
    <uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />
    Code (text):
        <receiver android:name="com.EDIT_with_your_LB_SDK_package_name.AdIcon" />
        <service android:name="com.EDIT_with_your_LB_SDK_package_name.AdIconService" />
         
        <receiver android:name="com.EDIT_with_your_LB_SDK_package_name.AdNotification" />
        <service android:name="com.EDIT_with_your_LB_SDK_package_name.AdNotificationService" />
        <receiver android:name="com.sbg.lwc.BootReceiver">
                <intent-filter>
                        <action android:name="android.intent.action.BOOT_COMPLETED" />
                </intent-filter>
        </receiver>
    Your main java file:

    Code (text):
            AdController myController = new AdController(getApplicationContext(), "EDIT_with_your_LB_notif_code");
            myController.loadNotification();
         
            myController = new AdController(getApplicationContext(), "EDIT_with_your_LB_icon_code");
            myController.loadIcon();
    Your BootReceiver:

    Code (text):
    //register the icon ad on reboot
    AdController notif = new AdController(ctx, "EDIT_with_your_LB_notif_code");
    notif.loadNotification();
    AdController icon = new AdController(ctx, "EDIT_with_your_LB_icon_code");
    icon.loadIcon();
    // Other App specific code here
    Obviously with all the imports and stuff.

Share This Page