Libcurl requires openssl and zlib to be fully operationnal
- Step 1 : cross compile zlib
- Step 2 : cross compile openssl
- Step 3 : cross compile curl with zlib/openssl external link
Prerequisites :
function evaluate(code, args = {}) { | |
// Call is used to define where "this" within the evaluated code should reference. | |
// eval does not accept the likes of eval.call(...) or eval.apply(...) and cannot | |
// be an arrow function | |
return function evaluateEval() { | |
// Create an args definition list e.g. "arg1 = this.arg1, arg2 = this.arg2" | |
const argsStr = Object.keys(args) | |
.map(key => `${key} = this.${key}`) | |
.join(','); | |
const argsDef = argsStr ? `let ${argsStr};` : ''; |
String content = 'Some text' | |
def myFile = new File('mySuperFile.txt') | |
myFile.write(content) |
adb shell dumpsys battery | grep level |
import android.text.SpannableStringBuilder; | |
import android.text.Spanned; | |
import android.text.TextPaint; | |
import android.text.method.LinkMovementMethod; | |
import android.text.style.ClickableSpan; | |
import android.view.View; | |
import android.widget.TextView; | |
import java.util.ArrayList; | |
import java.util.regex.Matcher; |
JSON={ | |
parse:function(str,options) { | |
this.str = str; | |
this.i = 0; | |
this.nfirstchars = '-0123456789.'; | |
this.nchars = '-0123456789.eE'; | |
this.n | |
return this.parseValue(); | |
}, | |
isWhiteSpace:function(c) { |
package net.nabeix.javascriptinterfacetest; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
public class MainActivity extends AppCompatActivity { |
==> Add in AndroidManifest.xml | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
android:sharedUserId="android.uid.system" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="com.example.example" | |
> | |
==> Android Source : | |
// For Properties permission | |
// Properties which start with "debug." have both SYSTEM & SHELL permisiion to edit |
//---- Appened STYLE | |
//document.getElementsByTagName('html')[0].innerHTML+='<style>*{color:#fff}</style>' | |
StringBuilder extraStyles = new StringBuilder(); | |
extraStyles.append("javascript:(function extra(){"); | |
if(getResources().getBoolean(R.bool.extraCss)){ | |
extraStyles.append( | |
"var aa =document.createElement(\"link\");" + | |
"aa.type='text/css'; aa.rel='stylesheet'; "+ | |
"aa.href='"+getResources().getString(R.string.extraCssUrl)+"';"+ | |
"document.getElementsByTagName(\"head\")[0].appendChild(aa);" |
import android.media.MediaPlayer; | |
import android.media.AudioManager; | |
import android.util.Log; | |
import java.io.IOException; | |
public class Beep { | |
/** | |
* Command-line entry point. |