public class MainActivity
extends com.actionbarsherlock.app.SherlockFragmentActivity
| Modifier and Type | Field and Description |
|---|---|
private android.nfc.NfcAdapter |
mAdapter |
private android.widget.TabHost |
mTabHost |
private TabsAdapter |
mTabsAdapter |
private android.support.v4.view.ViewPager |
mViewPager |
private android.app.PendingIntent |
pendingIntent |
private NFCReader |
reader |
private NFCWriter |
writer |
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OKACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_ROUTER_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE| Constructor and Description |
|---|
MainActivity() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkNFC()
Check if a NFC adapter is available and/or activated.
|
private void |
doProcess(android.content.Intent intent)
This method checks and send the chosen command.
|
protected void |
onCreate(android.os.Bundle savedInstanceState)
This method builds the main user interface using the TabsAdapter class.
|
protected void |
onNewIntent(android.content.Intent intent) |
void |
onPause() |
void |
onResume() |
protected void |
sendData(boolean b,
android.nfc.Tag tag)
This method simply processes the command sending only from the
SendTextFragment.
|
addContentView, closeOptionsMenu, dispatchKeyEvent, getSherlock, getSupportActionBar, getSupportMenuInflater, invalidateOptionsMenu, onActionModeFinished, onActionModeStarted, onConfigurationChanged, onCreateOptionsMenu, onCreateOptionsMenu, onCreatePanelMenu, onDestroy, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsItemSelected, onPanelClosed, onPostCreate, onPostResume, onPrepareOptionsMenu, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onStop, onTitleChanged, openOptionsMenu, requestWindowFeature, setContentView, setContentView, setContentView, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setSupportSecondaryProgress, startActionMode, supportInvalidateOptionsMenuonCreatePanelMenu, onMenuItemSelected, onPreparePaneldump, getLastCustomNonConfigurationInstance, getSupportFragmentManager, getSupportLoaderManager, onActivityResult, onAttachFragment, onBackPressed, onCreateView, onKeyDown, onLowMemory, onResumeFragments, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onStart, startActivityForResult, startActivityFromFragmentcloseContextMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, isChangingConfigurations, isChild, isDestroyed, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onChildTitleChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreatePanelView, onCreateThumbnail, onCreateView, onDetachedFromWindow, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onNavigateUp, onNavigateUpFromChild, onOptionsMenuClosed, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onRestart, onSearchRequested, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, overridePendingTransition, recreate, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setIntent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, shouldUpRecreateTask, showDialog, showDialog, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenuapplyOverrideConfiguration, attachBaseContext, getResources, getTheme, setThemebindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiverprivate android.widget.TabHost mTabHost
private android.support.v4.view.ViewPager mViewPager
private TabsAdapter mTabsAdapter
private NFCWriter writer
private NFCReader reader
private android.app.PendingIntent pendingIntent
private android.nfc.NfcAdapter mAdapter
protected void onCreate(android.os.Bundle savedInstanceState)
onCreate in class android.support.v4.app.FragmentActivityFragmentActivity.onCreate(android.os.Bundle)private void checkNFC()
public void onPause()
onPause in class com.actionbarsherlock.app.SherlockFragmentActivitypublic void onResume()
onResume in class android.support.v4.app.FragmentActivityprotected void onNewIntent(android.content.Intent intent)
onNewIntent in class android.support.v4.app.FragmentActivityprivate void doProcess(android.content.Intent intent)
protected void sendData(boolean b,
android.nfc.Tag tag)
throws java.io.IOException,
android.nfc.FormatException
b - true if the command should be send.tag - the NFC tag from the intentjava.io.IOExceptionandroid.nfc.FormatException