1、build.gradle
repositories {
maven {
url ‘https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
}
compile ‘org.xwalk:xwalk_core_library:18.48.477.13’
2、active_main.xml
<org.xwalk.core.XWalkView android:id="@+id/activity_main"
xmlns:android=“http://schemas.android.com/apk/res/android"
android:layout_width=“fill_parent”
android:layout_height=“fill_parent”>
</org.xwalk.core.XWalkView>
3、MainActivity.java
mXWalkView = (XWalkView) findViewById(R.id.activity_main);
mXWalkView.load(“https://blueimp.github.io/jQuery-File-Upload/", null);
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {
mXWalkView.onActivityResult(requestCode, resultCode, data);
} 4、AndroidManifest.xml
android:hardwareAccelerated=“true”
基本上 codova phonegap都是用webview裡面的addJavascriptInterfac 指定@JavascriptInterface 的java method,間接呼叫 回傳資料,達到和原生溝通
codova phone 等等都是包好,讓使用者方便使用,而且共同開發,讓呼叫 回傳 android 多版本能正常
ionic、titanic、react native 等等 為了在web app上速度更快或是對應呼叫 回傳時,開發速度更快
https://codemumbai.wordpress.com/android-webview-image-upload-solved/
http://maurizionapoleoni.de/blog/implementing-a-file-input-with-camera-support-in-android-with-crosswalk/
=====
https://mthli.github.io/Android-WebView-JavaScript
http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time
http://bluereader.org/article/165908253
http://www.mobile-open.com/2015/65366.html
http://www.flapjacksandcode.com/blog/2015/2/17/android-webviews-getusermedia-putting-it-all-together
http://lookintoandroid.blogspot.tw/2015/11/getting-camera-captured-image-in.html
=====
upload file
http://www.unknownerror.org/opensource/brandonsavage/Upload/q/stackoverflow/5907369/file-upload-in-webview
=====
用CrossWalk包的話,可以肯定是最新的chrome,保證在操作上的正常!但app會非常的肥大~~
再不然就不能事先說明android 5以上才能存取 camera, file upload
If you try many way, can’t finish.
1、reinstall android studio : remove all
2、delete all c:\user\your user name\.gradle
c:\user\your user name\.AndroidStudio2.0
3、reinstall android stuido be careful path and directory, C:\Program Files\Android check this directory, have other Android Studio, likfe Android Studio1….. If have delete Android Studio1 directory, only keep Android Studio.
http://blog.csdn.net/guolin_blog/article/details/43376527
https://github.com/futurice/android-best-practices
http://www.slideshare.net/SeanKatz/android-best-practices-2015?qid=98a113a6-fbfa-4997-bbfd-d3cc8cd9454c&v=&b=&from_search=4
http://www.innofied.com/13-android-development-best-practices/
http://www.slideshare.net/Rapidvaluesolutions/best-practices-for-android-ui-by-rapid-value-solutions?qid=98a113a6-fbfa-4997-bbfd-d3cc8cd9454c&v=&b=&from_search=6
http://www.sitepoint.com/5-resources-for-android-developers/
https://github.com/roboguice/roboguice
http://www.tutorialspoint.com/android/android_best_practices.htm
=====
http://developer.android.com/training/best-performance.html
=====
start begin learn stduying
http://www.tutorialspoint.com/android/
http://www.vogella.com/tutorials/android.html
=====Libraries
https://github.com/JStumpp/awesome-android