Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by dragologic · Jan 27, 2013 at 10:52 PM · adssdkpluginsad

Leadbolt ads integration

Hi, How to integrate Leadbolt ads into Unity project? I have downloaded Leadbolt SDK and placed pubxapp.jar and pubxappCom.jar into Plugins/Android.

This is my LeadboltIntegration.cs file:

 using UnityEngine;
 using System.Collections;
 using System.Runtime.InteropServices;
 using System;
 
 public class LeadboltIntegration : MonoBehaviour
 {
     public string id;
     static AndroidJavaObject adController;
 
     void Start ()
     {
         
         Invoke ("Initialize",3);
         Invoke ("LoadAd",5);
     }
 
     void Initialize ()
     {
         using(AndroidJavaClass unityPlayer = new AndroidJavaClass ("com.unity3d.player.UnityPlayer"))
         {
             using(AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject> ("currentActivity"))
             {
                 adController = new AndroidJavaObject ("com.pad.android.iappad.AdController", activity, id);
             }
         }
     }
     void LoadAd()
     {
         adController.Call ("setAsynchTask", true);
         adController.Call ("loadAd");
     }
     public void OnApplicationQuit() 
     {
         adController.Call ("destroyAd");
     }
 }    

But application is crashing upon load.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by PeteS · Mar 31, 2013 at 07:24 PM

Log in to Leadbolt and look up unity3d they have a sample scene with code available for unity3d. Its a unity package with all the required files to run. So far it worked for me but the sample ads take a few sec to pop up.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image umer.rammay · Sep 03, 2013 at 11:53 AM 1
Share

Hi!

I am trying to add lead bolt adds in unity and I successfully add it into unity but there is an issue that 1- adds are not clickable 2- and nor closing when i click on cross button

I have checked this in android and in android I am facing no issue that I have stated above, but just in unity......

can u help Here is Code

 using UnityEngine;
 using System.Collections;
 
 public class $$anonymous$$BoltAdd : $$anonymous$$onoBehaviour {
     
     // Use this for initialization
     void Start () {
     AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); 
     AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
         
         using(AndroidJavaObject ad = new AndroidJavaObject("com.unity.wrapper.$$anonymous$$BoltUnity", jo)){
             ad.Call("loadAd","837124071");
         }
     }
     
     // Update is called once per frame
     void Update () {
     
     }
 }
 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Admob Mediation with Chartboost Ad network setup 1 Answer

App crash on launch. 1 Answer

How can i make a Google Mobile Adsense in my Unity game ?? 1 Answer

Admob test ads not showing up? and the codes are perfect? 1 Answer

Unity Mediation Plug-In breaks the game with infinite Resolving Android Dependencies 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges