Android Question #Extends: b4a.ActivityLifeCycleEvents error

DevBaby

Active Member
Licensed User
Longtime User
I was trying to implement additional lifecycle events do to an sdk requirement. I added

B4X:
#Region  Activity Attributes
    #Extends: b4a.ActivityLifeCycleEvents
#End Region

and then added...

Activity_Start
Activity_Stop
Activity_Destroy
Activity_BackPressed


And got the following error

Compiling generated Java code. Error
javac 1.7.0_55
src\am\gameplus\pkg\main.java:17: error: package b4a does not exist
public class main extends b4a.ActivityLifeCycleEvents implements B4AActivity{
^
Note: src\am\gameplus\pkg\inappbillingservice.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
 

DevBaby

Active Member
Licensed User
Longtime User

Thanks Erel,

The sdk fires simple methods for each lifecycle event, for instance...

B4X:
@Override
public void onStart() {
    super.onStart();
    Chartboost.onStart(this);
}

1) Using inline java, would I still use "this"? In the wrapper, i used "ba.activity".
2) Using the wrapper, I needed the @DependsOn(Chartboostsdk), would I need something similar with inline java?
 
Upvote 0
Top