Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 61

Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
07/25/13 12:07 PM (12 years ago)

initialize

many times i find that you have to initialize sdk by adding a small code is there a fixed java file in which you have to put the initialize code? on the appbrain site i found this. "You can initialize it by calling AppBrain.init(this) in your Activity or AppBrain.initApp(this) in your Application." so what is difference between activity/application? and which files will i have to add code to if i choose option 1 or option 2 i use non tabbed layout hope i made everything clear
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/25/13 04:48 PM (12 years ago)
I'm no Java expert, so anything I say should be taken with some skepticism, lol! An Application is your project as a whole. An Activity is a portion of your Application, like a plugin. They combine to create the application. You'll probably want to place that code in your application, not in your plugin. Despite line 1, where I say I'm no Java Expert, you can 'try' to put the code somewhere around line 98 of your BT_activity_root.java file, after where it says 'this.loadAppData()' and see if that makes a difference. It might, it might not. But that's where I'd start. Cheers! -- Smug
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
07/26/13 12:19 AM (12 years ago)
thanks smug! i will try that
 

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.