Introduction
...
Info | |||||||
---|---|---|---|---|---|---|---|
| |||||||
If you choose to use Google Play Services, you need to know the following :
|
...
Note | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Eclipse Users : When compiling a production APK file with ProGuard and Appoxee , enter the following lines into the file "proguard-project.txt"
In order to avoid these additions in each activity, you can simply extend AppoxeeBaseActivity instead of Activity. (AppoxeeBaseActivity extends Android’s FragmentActivity and contains the onStart() & onStop() calls) |
...
- Your MainActivity needs to exted AppoxeeBaseActivity and implement AppoxeeObserver
- Your MainActivity onCreate() method should contain this code :
Code Block language java title onCreate() linenumbers true ... new initAsync(getApplicationContext(),"APP_KEY",
"SECRET_KEY", "com.package.MainActivity" , true, this).execute();
AppoxeeManager.setDebug(true);
Appoxee.parseExtraFields(getIntent().getExtras());
setContentView(R.layout.main);
.....
Make sure that the following methods are implemented and contain Appoxee's method calls :
@Override
protected void onResume()
{
super.onResume();
// If Inbox implemented and you have a method for updating your inbox’s
// Badge
updateMsgBadge();
}
d. @Override
public void onRegistrationCompleted() {
// TODO Auto-generated method stub
Utils.Debug("Can perform all API Calls");
}
@Override
public void onMessagesUpdateCompleted() {
// If Inbox implemented and you have a method for updating your inbox’s
// Badge
Utils.Debug("Can update Badge");
updateMsgBadge();
Code Block language java linenumbers true @Override protected void onResume() { super.onResume(); // If Inbox implemented and you have a method for updating your inbox's // Badge updateMsgBadge(); } @Override public void onRegistrationCompleted() { // TODO Auto-generated method stub Utils.Debug("Can perform all API Calls"); } @Override public void onMessagesUpdateCompleted() { // If Inbox implemented and you have a method for updating your inbox's // Badge Utils.Debug("Can update Badge"); updateMsgBadge(); }
Note To fully use Appoxee’s Analytics , all of your activities should implement onStart() & onStop in the actvities code :
Code Block language java linenumbers true @Override
protected void onStart()
{
{ super.onStart();
Appoxee.onStart();
}
@Override
protected void} @Override protected void onStop()
{
{ super.onStop();
Appoxee.onStop(); }
}
In order to avoid these additions in each activity, you can simply extend AppoxeeBaseActivity instead of Activity. (AppoxeeBaseActivity extends Android’s FragmentActivity and contains the onStart() & onStop() calls)
Option B: Implicit Integration (without using Observer)
In your main activity class onCreate() method enter the following code :
initAsync(getApplicationContext(),"APP_KEY",Code Block language java linenumbers true ... new
initAsync(getApplicationContext(),"APP_KEY", "SECRET_KEY", true, "com.package.MainActivity").execute();
AppoxeeManager.setDebug(true);
Appoxee.parseExtraFields(getIntent().getExtras());
setContentView(R.layout.main);
.....
- Make sure that the following methods are implemented and contain Appoxee's method calls :
Code Block language java linenumbers true @Override protected void onStart()
{
{ super.onStart();
Appoxee.onStart();
}
@Override
protected void onStop()
{
} @Override protected void onStop() { super.onStop();
Appoxee.onStop();
}
@Override protected void} @Override protected void onNewIntent(Intent intent)
{
Bundle bundle ={ super.onNewIntent(intent);
Bundle bundle = intent.getExtras();
Appoxee.parseExtraFields(bundle);
}
@Override
protected void} @Override protected void onResume()
{
{ super.onResume();
your inbox’s// If Inbox implemented and you have a method for updating
Badge updateMsgBadgeyour inbox's //
Badge updateMsgBadge(); }
Note When Integrating Appoxee and choosing not to use an Observer, All Appoxee API Calls will fail unless implementing a thread that will sample the flag
Appoxee.isReady()==true. Only then will the API Calls will execute (Tags,Alias... )
Note To fully use Appoxee’s Analytics , all of your activities should implement onStart() & onStop in the actvities code :
Code Block language java linenumbers true @Override protected void onStart() { super.onStart(); Appoxee.onStart(); } @Override protected void onStop() { super.onStop(); Appoxee.onStop(); }
In order to avoid these additions in each activity, you can simply extend AppoxeeBaseActivity instead of Activity. (AppoxeeBaseActivity extends Android’s FragmentActivity and contains the onStart() & onStop() calls)
...