My current AndroidManifest contain Sugar ORM declaration as follow
<application
android:name="com.orm.SugarApp"
as stated in their documentation at http://satyan.github.io/sugar/getting-started.html. and it is included as jar library.
and now i need to add declaration for a global variable as illustrated here Android global variable which neeed to add
application android:name="MyApplication" android:icon="@drawable/icon" android:label="@string/app_name">
to existing application section. but this means two application sections or two "android:name" which is totally wrong. How to implement this scenario of two applications parts
All you need is just extends com.orm.SugarApp
in your MyApplication
class like this:
public class MyApplication extends com.orm.SugarApp {
@Override
public void onCreate() {
super.onCreate();
}
@Override
public void onTerminate() {
super.onTerminate();
}
private String someVariable;
public String getSomeVariable() {
return someVariable;
}
public void setSomeVariable(String someVariable) {
this.someVariable = someVariable;
}
}
And the use your MyApplication
in the manifest:
<application android:name="MyApplication" android:icon="@drawable/icon" android:label="@string/app_name">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With