View
129
Download
2
Category
Preview:
Citation preview
Choosing a Min SDK
● Froyo + Gingerbread + ICS = 8.7%● Users with older OS versions download
fewer applications. ● Newer features and better phones often
mean faster time to market with a better product.
● View inflation● OnClick, OnItemSelected.. etc etc● Saving state ● Parcelables
Things you should understand..
Automatic Parcelables
● Parcelable Plugin○ https://github.com/mcharmas/android-parcelable-intellij-plugin
● Auto Parcel○ https://github.com/frankiesardo/auto-parcel
● Parceler○ https://github.com/johncarl81/parceler
● Control + R● Control + D● ⌘ + Shift + O● ⌘ + Shift + Up/Down● ⌘ + Option + Up/Down● ⌘ + Shift + f
Useful Hotkeys
Some useful stuff..● Factory vs Constructors● Builders● Singletons● equals and hashCode● toString● Class accessibility● Mutability● Composition vs Inheritance● Interfaces vs Abstract Classes● Generics● Lists vs Arrays● Enum vs int constants● Overloading● Javadoc● loops● String concatenation● Exceptions● Concurrency
<uses-permission android:name="android.permission.SEND_SMS" />
Example: Sending an SMSOption One:
Option Two:
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.setData(Uri.parse("sms:" + telephoneNumber));
sendIntent.putExtra("sms_body", x);
startActivity(sendIntent);
For example..
<application android:vmSafeMode="true">
Added to the manifest in debug/src/AndroidManifest.xml
Environment VariablesbuildTypes { debug { buildConfigField "String", "BASE_URL", "\"https://myserver-dev.herokuapp.com\";" } qa { buildConfigField "String", "BASE_URL", "\"https://myserver-qa.herokuapp.com\";" signingConfig signingConfigs.debug } support { buildConfigField "String", "BASE_URL", "\"https://myserver-support.herokuapp.com\";" signingConfig signingConfigs.debug } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' buildConfigField "String", "BASE_URL", "\"https://www.myserver.com\";" }
}
<activity android:name=".Launcher" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter></activity>
Like so..<activity-alias android:name=".Launcher" android:targetActivity=".ui.MyNewLauncher" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter></activity-alias>
<activity android:name=".ui.MyNewLauncher" />
1. Attend meetups! (DONE)2. Leverage cool libraries and techniques for
fun and profit.3. Follow people on twitter.
So Easy...
Cool Libraries
● RXJava● Dagger / Dagger 2● Picasso / Universal Image Loader / Glide● Design Support Library● Pocket Knife● Realm● Stetho
Twitter Follows
● Jake Wharton @JakeWharton● Dan Lew @danlew42● Chet Haase @chethaase● And many many many more...https://twitter.com/rdrobinson3/lists/android
Recommended