- 1.5 (3 - Cupcake)
- 1.6 (4 - Donut)
- 2.0 through 2.1 (5, 6, 7 - Eclair)
- 2.2 (8 - Froyo)
- 2.3.1 through 2.3.3 (9, 10 - Gingerbread)
- 3.0 through 3.2 (11 - Honeycomb)
- 4.0.0 (14 - Ice Cream Sandwich)
- 4.0.3 (15 - Ice Cream Sandwich - MR1)
- 4.1.2 (16 - Jelly Bean)
| /** | |
| * Created by Bill on 7/28/14. | |
| */ | |
| public class LearningApplication extends Application { | |
| private static final String TAG = QuickeyLearningApplication.class.getSimpleName(); | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); |
Display the certificate used to sign the APK: keytool -list -printcert -jarfile app-release.apk
Display how each APK file is signed: jarsigner -verify -verbose -certs app-release.apk
Display certificate information: keytool -list -v -keystore yourkeystore -alias youralias
Display some of the info around how the APK presents itself: aapt d badging app-prod-release.apk
Decompile an existing APK: apktool d app-prod-release.apk (see: https://code.google.com/p/android-apktool)
- Great overview of spans: http://flavienlaurent.com/blog/2014/01/31/spans/
- Reachability guidance: http://guides.cocoahero.com/determining-web-service-reachability-on-android.html
- Placeholder text: https://plus.google.com/+AndroidDevelopers/posts/eXfegungS64
| #!/bin/sh | |
| find . -name *.iml -print0 | xargs -0 rm | |
| rm -rf .idea/ |
| public Class CustomView { | |
| public CustomView(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| // Makes the developer tools happy when previewing stuff | |
| if (isInEditMode()) { | |
| return; | |
| } | |
| } | |
| } |
I was previously using https://gist.github.com/dmarcato/d7c91b94214acd936e42 to strip down Google Mobiele Services, but the build times for my project in Android Studio consistently exceeded 75 seconds; this solution is much less dynamic (and even a little ugly) but keeps my build times less than 15s.
- Your app module has a directory named aars that will work as a project specific Maven repository; this directory should be placed under version control.
- Once https://code.google.com/p/android/issues/detail?id=55863 is resolved and released things might get a little cleaner,
- Maven (mvn) is installed and available on your path when running this script.
| import android.os.Parcel; | |
| import android.os.Parcelable; | |
| public class ParcelableHelper { | |
| /** | |
| * There is not always a guarantee that Parcelable values will be immediately written out and | |
| * read back in. For data data that mutable (its own issue), this can be a problem. This is | |
| * for the times when it would be great to have confidence that you will be working with a copy | |
| * of that data. | |
| */ |
| public class MyActivity extends Activity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_my); | |
| // Old school | |
| Button button = (Button) findViewById(R.id.button); | |
| button.setOnClickListener(new OnClickListener() { | |
| @Override |
| public class DevicePhoneNumber { | |
| public final String phoneNumber; | |
| public DevicePhoneNumber(String phoneNumber) { | |
| this.phoneNumber = phoneNumber; | |
| } | |
| @Override | |
| public String toString() { | |
| return "DevicePhoneNumber{" + |