- Details
- Written by: Stanko Milosev
- Category: Android
- Hits: 3762
To debug your web application in Android in Chrome write:
chrome://inspect/#devices
and click inspect:
Before that in Android code write:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
- Details
- Written by: Stanko Milosev
- Category: Android
- Hits: 3450
Here you can see an example of creating WebView for Android. Problem which I had was to load a local file. Simple answer is like this:
mWebView.loadUrl("file:///android_asset/touchEnd/index.html");
Where android_asset is actually assets folder in Android project. To add assets to the Android project, choose view to Android, right click on the app -> New -> Folder -> Assets folder:
Now the whole code can look something like this:
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mWebView = (WebView) findViewById(R.id.activity_main_webview); WebSettings webSettings = mWebView.getSettings(); webSettings.setJavaScriptEnabled(true); mWebView.loadUrl("file:///android_asset/touchEnd/index.html"); }
- Details
- Written by: Stanko Milosev
- Category: Android
- Hits: 3904
1. You can install Java, just by writing: sudo apt-get install default-jdk in terminal window, or follow these steps: Download Java, in my case I downloaded this one.
2. To install Java, open terminal window, go to the location where you downloaded Java, and write:
tar zxvf jdk-8u45-linux-x64.tar.gz
3. After installing Java write something like:
export JAVA_HOME=/home/myUserName/myDownloadPlace/jdk1.8.0_45
Of course change myUserName/myDownloadPlace.
or write:
sudo gedit /etc/environment
then in environment write:
export JAVA_HOME=/home/myUserName/myDownloadPlace/jdk1.8.0_45
4. Then write:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
5. Finally download Android Studio, extract it, go to bin folder, in my case that is something like:
/home/myUserName/Downloads/android-studio/bin
6. Execute:
./studio.sh
7. Go to File -> Project Structure -> JDK location box: enter and browse to your Java JDK.
8. Download from here and install Java JRE, and I copied downloaded version to folder /home/myUserName/Android/Sdk/tools/lib/monitor-x86_64/jre
- Details
- Written by: Stanko Milosev
- Category: Android
- Hits: 4454
You can use Nexus Root Toolkit, but I would rather do it manually.
I am using steps from this web site.
First download appropriate image from here. Extract it. Then download latest Android SDK, in my case it was this one. If you don't have it installed already then download Java, and install it of course.
After you finished installing Android SDK leave check box Start SDK manager checked like on picture I am not sure if we need this part, since in folder:
%APPDATA%\Local\Android\android-sdk\platform-tools
AppData is hidden folder...
in my case I couldn't find adb. Anyhow, I've left the check box checked, and was waiting for couple of hours (washed dishes, eating,...):
That will open new window Android SDK manager, just click install packages:
Add %APPDATA%\Local\Android\android-sdk\platform-tools to path in Environment Variables.
Open command prompt in a folder where you previously extracted the image, (in my case that was something like: E:\hammerhead-lmy48b) and execute:
flash-all.bat
and wait until files are not written to the device.
After signing in, to avoid automatic installation of applications in Get your apps & data, from restore from this backup choose setup as new device:
uncheck check box to Backup your phone's app: