This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.LinearGradient; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.Shader; | |
import android.util.AttributeSet; | |
import android.widget.LinearLayout; | |
import com.movl.swipeit.R; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/security/limits.conf | |
* soft nofile 999999 | |
* hard nofile 999999 | |
root soft nofile 999999 | |
root hard nofile 999999 | |
=========================================================== | |
# /etc/sysctl.conf | |
# sysctl for maximum tuning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// EXAMPLE METHOD 1 | |
// | |
// member var | |
private final Looper backLooper; // background looper, only used here internally | |
//inside onCreate or ctor, etc | |
HandlerThread thread = new HandlerThread("BackLooper", Thread.NORM_PRIORITY); | |
thread.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.totsp.webviewtest; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class MainActivity extends Activity { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Installation { | |
private static String sID; | |
private static final String INSTALLATION = "INSTALLATION"; | |
// Usage: Just call Installation.id(this) from Application class onCreate and store in "session" (whatever you use for small temp in mem). | |
public synchronized static String id(Context context) { | |
if (Installation.sID == null) { | |
File installation = new File(context.getFilesDir(), Installation.INSTALLATION); | |
try { |