Back to project page rfcx-guardian-android.
The source code is released under:
Apache License
If you think the Android project rfcx-guardian-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.rfcx.guardian.activity; // www . ja v a 2 s .c o m import org.rfcx.guardian.R; import org.rfcx.guardian.RfcxGuardian; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; public class MainActivity extends Activity { @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.activity_home, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { RfcxGuardian app = (RfcxGuardian) getApplication(); switch (item.getItemId()) { case R.id.menu_prefs: startActivity(new Intent(this, PrefsActivity.class)); break; case R.id.menu_purge_audio: app.audioCore.purgeAllAudioAssets(app.audioDb); break; case R.id.menu_send_checkin: app.apiCore.sendCheckIn(app); break; case R.id.menu_carrier_topup: app.triggerService("CarrierCode", true); break; } return true; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); } @Override public void onResume() { super.onResume(); ((RfcxGuardian) getApplication()).appResume(); } @Override public void onPause() { super.onPause(); ((RfcxGuardian) getApplication()).appPause(); } }