本文整理汇总了Java中com.evgenii.jsevaluator.JsEvaluator类的典型用法代码示例。如果您正苦于以下问题:Java JsEvaluator类的具体用法?Java JsEvaluator怎么用?Java JsEvaluator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JsEvaluator类属于com.evgenii.jsevaluator包,在下文中一共展示了JsEvaluator类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: OpeningHours
import com.evgenii.jsevaluator.JsEvaluator; //导入依赖的package包/类
protected OpeningHours(Context context) {
Log.d("OpeningHours", "Loading up opening_hours.js");
mJsEvaluator = new JsEvaluator(context);
String librarySrouce = loadJs("javascript-libs/suncalc/suncalc.min.js",
context);
mJsEvaluator.evaluate(librarySrouce);
librarySrouce = loadJs(
"javascript-libs/opening_hours/opening_hours.min.js", context);
mJsEvaluator.evaluate(librarySrouce);
}
开发者ID:ypid,项目名称:ComplexAlarm,代码行数:11,代码来源:OpeningHours.java
示例2: decipherViaWebView
import com.evgenii.jsevaluator.JsEvaluator; //导入依赖的package包/类
private void decipherViaWebView(final SparseArray<String> encSignatures) {
if (context == null) {
return;
}
final StringBuilder stb = new StringBuilder(decipherFunctions + " function decipher(");
stb.append("){return ");
for (int i = 0; i < encSignatures.size(); i++) {
int key = encSignatures.keyAt(i);
if (i < encSignatures.size() - 1)
stb.append(decipherFunctionName).append("('").append(encSignatures.get(key)).
append("')+\"\\n\"+");
else
stb.append(decipherFunctionName).append("('").append(encSignatures.get(key)).
append("')");
}
stb.append("};decipher();");
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
JsEvaluator js = new JsEvaluator(context);
js.evaluate(stb.toString(),
new JsCallback() {
@Override
public void onResult(final String result) {
lock.lock();
try {
decipheredSignature = result;
jsExecuting.signal();
} finally {
lock.unlock();
}
}
});
}
});
}
开发者ID:teocci,项目名称:YouTube-In-Background,代码行数:40,代码来源:YouTubeExtractor.java
示例3: decipherViaWebView
import com.evgenii.jsevaluator.JsEvaluator; //导入依赖的package包/类
private void decipherViaWebView(final SparseArray<String> encSignatures) {
if (context == null) {
return;
}
final StringBuilder stb = new StringBuilder(decipherFunctions + " function decipher(");
stb.append("){return ");
for (int i = 0; i < encSignatures.size(); i++) {
int key = encSignatures.keyAt(i);
if (i < encSignatures.size() - 1)
stb.append(decipherFunctionName).append("('").append(encSignatures.get(key)).append("')+\"\\n\"+");
else
stb.append(decipherFunctionName).append("('").append(encSignatures.get(key)).append("')");
}
stb.append("};decipher();");
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
JsEvaluator js = new JsEvaluator(context);
js.evaluate(stb.toString(),
new JsCallback() {
@Override
public void onResult(final String result) {
lock.lock();
try {
decipheredSignature = result;
jsExecuting.signal();
} finally {
lock.unlock();
}
}
});
}
});
}
开发者ID:TakumaMochizuki,项目名称:Komica,代码行数:37,代码来源:YouTubeUriExtractor.java
示例4: onCreate
import com.evgenii.jsevaluator.JsEvaluator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sina_login_activity_main);
mJsEvaluator = new JsEvaluator(getApplicationContext());
mSinaPreLogin = new SinaPreLogin();
cookieStore = new PersistentCookieStore(getApplicationContext());
mAsyncHttoClient = new AsyncHttpClient();
mAsyncHttoClient.setCookieStore(cookieStore);
mLoginButton = (Button) findViewById(R.id.sinaLoginBtn);
mLoginButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
doPreLogin();
UploadHelper mUploadHelper = new UploadHelper(getApplicationContext(), mAsyncHttoClient);
List<String> files = new ArrayList<String>();
files.add("/sdcard/tencent/zebrasdk/Photoplus.jpg");
files.add("/sdcard/tencent/zebrasdk/Photoplus~01.jpg");
files.add("/sdcard/tencent/zebrasdk/Photoplus~02.jpg");
mUploadHelper.uploadFiles(null,files, new OnUpFilesListener() {
@Override
public void onUpSuccess(String pids) {
LogTool.D("uploadFile pids: " + pids);
sendWeibo(pids);
}
@Override
public void onUpLoadFailed() {
// TODO Auto-generated method stub
}
});
}
});
}
开发者ID:lookwhatlook,项目名称:WeiboWeiBaTong,代码行数:44,代码来源:LoginBeebo.java
示例5: Sina
import com.evgenii.jsevaluator.JsEvaluator; //导入依赖的package包/类
public Sina(Context context) {
mContext = context;
mJsEvaluator = new JsEvaluator(mContext);
}
开发者ID:lookwhatlook,项目名称:WeiboWeiBaTong,代码行数:5,代码来源:Sina.java
示例6: onCreate
import com.evgenii.jsevaluator.JsEvaluator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mJsEvaluator = new JsEvaluator(getApplicationContext());
mSinaPreLogin = new SinaPreLogin();
mRequestResultParser = new RequestResultParser();
mDialog = new ProgressDialog(this);
mDialog.setMessage(getString(R.string.send_wei_ing));
mDialog.setCancelable(false);
Builder builder = new Builder(BaseLoginActivity.this);
mDoorAlertDialog = builder.create();
}
开发者ID:lookwhatlook,项目名称:WeiboWeiBaTong,代码行数:19,代码来源:BaseLoginActivity.java
注:本文中的com.evgenii.jsevaluator.JsEvaluator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论