diff --git a/2016/02/android.slide b/2016/02/android.slide new file mode 100644 index 0000000..d3337d1 --- /dev/null +++ b/2016/02/android.slide @@ -0,0 +1,153 @@ +Android + +February 25, 2016 +Brian Buller +Buller Codeworks, LLC + +* Generally + +Native Android is Java... + +* Generally + +Native Android is Java... + +but I'm not talking about that + +* Android Manifest + + + + + + + + + + + ... + + + +* Permissions +- Sandboxed Applications +- Normal Permissions + The permission must be declared, but the system automatically grants access +- Dangerous Permissions + The user must grant permission +- Changes in Android 6 +- List of permissions and severity at [[http://developer.android.com/guide/topics/security/permissions.html]] + +* Permissions Example +- Declared in manifest + + + + +- Request at run time + + ActivityCompat.requestPermissions(thisActivity, + new String[]{Manifest.permission.READ_CONTACTS}, + MY_PERMISSIONS_REQUEST_READ_CONTACTS); + +* Intents +- Declare in manifest + + + + + + +- Call in code + + Intent shareIntent = new Intent(); + shareIntent.setAction(Intent.ACTION_SEND); + shareIntent.putExtra(Intent.EXTRA_TEXT, alert_message); + shareIntent.setType("text/plain"); + startActivity(shareIntent); + +* Activities +Main Activity (icon in launcher) + + + + + + + + +Other Activities + + + + + +* Application Lifecycle +General Lifecycle + +- Resumed + + The activity has the user focus (aka - Running) + +- Paused + + Another activity is in the foreground, but this one is still visisble. + A Paused activity is fully alive but can be killed by the system in extremely + low-memory situations. + +- Stopped + + The activity is completely obscured by another activity. The activity is still alive, + but no longer visible and can be killed if memory is needed elsewhere. + +* Application Lifecycle +Functions +- onCreate - The activity is being created +- onStart - The activity is about to become visible +- onResume - The activity has become visible +- onPause - Another activity is taking focus +- onStop - The activity is no longer visible +- onDestroy - The activity is about to be destroyed + + Those are all overrides and you *must* hit the overridden function before doing any work in them. + +* Layout Files + + + +