Follow these instructions to get apktool installed for your platform: http://ibotpeaches.github.io/Apktool/install/
Download dex2jar and add it to your path: https://bitbucket.org/pxb1988/dex2jar/downloads
Download JD from: http://jd.benow.ca/
android { | |
productFlavors { | |
app { | |
} | |
appFast { | |
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin | |
// to pre-dex each module and produce an APK that can be tested on | |
// Android Lollipop without time consuming dex merging processes. | |
minSdkVersion 21 |
// ------------------------------------------------------------------------ | |
// App code: These classes that describe the state of executing a query | |
// that we want to consume as a stream of events. | |
public class Loading { | |
} | |
public class Results<T> { | |
final List<T> results; |
repositories { | |
... | |
flatDir { | |
dirs 'aars' | |
} | |
... | |
} | |
dependencies { | |
... |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
/** | |
* The smarter thing to do would be to use what is Guava, etc...but Guava is a big fat library that | |
* will blow the dex count and this is pretty much the only thing we are using out of it. |
Follow these instructions to get apktool installed for your platform: http://ibotpeaches.github.io/Apktool/install/
Download dex2jar and add it to your path: https://bitbucket.org/pxb1988/dex2jar/downloads
Download JD from: http://jd.benow.ca/
public class MyActivity extends Activity { | |
private static final String STATEFUL_COUNT = “count”; | |
private int count; | |
@Override | |
public void onCreate(Bundle savedInstance) { | |
super.onCreate(savedInstanceState); | |
if (savedInstanceState != null) { |
import android.app.Activity; | |
import android.app.Instrumentation; | |
import android.app.KeyguardManager; | |
import android.app.KeyguardManager.KeyguardLock; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.os.IBinder; | |
import android.os.PowerManager; | |
import android.os.PowerManager.WakeLock; | |
import android.support.test.InstrumentationRegistry; |
package com.androidfu.nowplaying.app.api; | |
import android.content.Context; | |
import com.androidfu.nowplaying.app.util.Log; | |
import com.androidfu.nowplaying.app.util.Preconditions; | |
import com.jakewharton.byteunits.DecimalByteUnit; | |
import com.squareup.okhttp.Cache; | |
import com.squareup.okhttp.OkHttpClient; |
import android.os.Build; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.net.InetAddress; | |
import java.net.Socket; | |
import java.net.SocketAddress; | |
import java.net.SocketException; |
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android" > | |
<translate | |
android:duration="@android:integer/config_shortAnimTime" | |
android:fromXDelta="-100%" | |
android:toXDelta="0" /> | |
</set> |