Hi guys, as the Title implies this Tutorial is just a Beginner's Guide on Creating Widgets (Widget that displays current time) and how do they work on an Android device.
Pre-requisites :
Install the Android SDK, Eclipse and ADT Plugin (If you're using Android Studio, you can modify the project like this, shared by @creepyncrawly )
Basic Java Knowledge (Not mandatory, as Google is there for you)
Already have created basic HelloWorld apps specified here and here.
So, let's start with the Project shall we ...
Starting Development :
Step 1: Open up your Eclipse, click File > New > Other > Android Project
The project name could be given as "HelloWidget", and then select any Build Target Platform of your choice (Android 2.1/2.2/2.3/4.0 etc.), and then specify a package name.
And then, uncheck the probably already checked Box “Create Activity”. We won’t create an Activity here we just want a simple widget. Just like the below picture :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Step 2 : So now as you have created your Project, lets start with the Layout and design of our widget. Open up main.xml (Path:- HelloWidget > res > layout > main.xml) and modify it like as shown in the below picture :
We have a simple linear layout with a TextView for your message to display. At this point, you will get an Error saying ERROR Error: No resource found that matches the given name (at 'background' with value '@drawable/widget_bg_normal') That’s because you don’t have the widget_bg_normal resource at this point. You could download the picture I used, and you can put that picture or find your own .9.png image. Put that image (Path:- HelloWidget > res > drawable > widget_bg_normal.9.png). If you don't find a folder named drawable, just create one in that path
You'll also encounter another error suggesting that @string/widget_text can't be found. To correct that open up strings.xml (Path:- HelloWidget > res > values > strings.xml) and modify it as shown in the below picture :
Click to expand...
Click to collapse
Step 3 [Slightly big Step, don't get bored] : So, we just have finished our design part. Now we have to tell Android that we are going to have a widget. Open up AndroidManifest.xml (Path:- HelloWidget > AndroidManifest.xml) and modify it as shown in the below picture :
NOTE: minSdkVersion="15" denotes that minimum Android version required is Android 4.0.3 (API Level 15) and if you are building on Android 2.2/2.3 just leave it as default and don't edit it to 15. [In other words, it will be set default according to whatever platform versions you have downloaded]
Explanations : We declare our Broadcast Receiver which will be “HelloWidget”. Don’t forget the dot before HelloWidget, this will create the full qualified path name with the declared package at the top of the file. The Label of our application was already set by the project wizard and is located in our strings.xml.
From the Documentation, The <intent-filter> element must include an <action> element with the android:name attribute. This attribute specifies that the AppWidgetProvider accepts the ACTION_APPWIDGET_UPDATE broadcast. This is the only broadcast that you must explicitly declare. The AppWidgetManager automatically sends all other App Widget broadcasts to the AppWidgetProvider as necessary.
The meta-data tag tells android about your widget provider. In this case, the widget provider is located at HelloWidget > res > xml > hello_widget_provider.xml Create folder xml under res. Create a new XML file inside that xml folder and name it as "hello_widget_provider.xml". Create like shown in the below picture :
Now, after all these, the only thing that is missing to run our widget is the Class that extends the AppWidgetProvider which we declared in AndroidManifest.xml at the receiver-tag.
Right-Click your Project (HelloWidget) > New > Class
And create the class as shown in the below picture :
So, your new Class will look like this :
Click to expand...
Click to collapse
Step 4 : So, we have created a blank widget that actually does nothing. We'll just see for ourselves how does it looks like. Run your Application (HelloWidget > Run As > 1 Android Application) and your AVD is powered up. And voila, you should see the output as something like this as shown in the below picture :
And yes, it seems its not that crazy as we thought . Just one widget alignment mistake which could be corrected by modifying the design layout in xml, I believe.
Anyways, lets just quickly head over to the next step which would actually define the widget (The Java way)
Click to expand...
Click to collapse
Step 5 : Now, open up the HelloWidget.java (Path:- HelloWidget > src > com.coolsandie.android.widget > HelloWidget.java) file, and modify it as shown in the below picture (In order to display the Time inside the Widget, apart from displaying a default text)
I'll also give it as CODE, but I recommend not to copy-paste. Type all the codes by yourself in order to learn. Avoid writing the import statements first and directly start with class and methods. Eclipse will give a warning to import, so you can do it from there. And one more, look out for spelling mistakes, as Java is highly case sensitive language such as the letter A and a are different.
Code:
package com.coolsandie.android.widget;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Timer;
import java.util.TimerTask;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.widget.RemoteViews;
public class HelloWidget extends AppWidgetProvider {
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
Timer timer = new Timer();
timer.scheduleAtFixedRate(new MyTime(context, appWidgetManager), 1, 1000);
}
private class MyTime extends TimerTask {
RemoteViews remoteViews;
AppWidgetManager appWidgetManager;
ComponentName thisWidget;
DateFormat format = SimpleDateFormat.getTimeInstance(SimpleDateFormat.MEDIUM, Locale.getDefault());
public MyTime(Context context, AppWidgetManager appWidgetManager) {
this.appWidgetManager = appWidgetManager;
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
thisWidget = new ComponentName(context, HelloWidget.class);
}
@Override
public void run() {
remoteViews.setTextViewText(R.id.widget_textview, "TIME = " +format.format(new Date()));
appWidgetManager.updateAppWidget(thisWidget, remoteViews);
}
}
}
Click to expand...
Click to collapse
Step 6 : So guys, we have finished it. The completely working widget should be ready by now. Run your Application (HelloWidget > Run As > 1 Android Application) and your application is synced, and it will show the output just like as shown in the below picture :
Click to expand...
Click to collapse
Finally, we have made it. It only took 6 steps for a completely working Widget.
And I hope you enjoyed this Tutorial. Its made as simple as possible, so surely anyone could give it a try.
NB: If anyone faces issues, as a last resort you can check out the Eclipse project which I've used for this Tutorial. Try importing the Project in Eclipse. Only use it, if you are really annoyed of errors. Anyways I'd recommend Trial and Error method and fixing it by your own before using mine. Download Project Source codes
FOOT-NOTE
The method onUpdate will be called at first. We create a timer that will run our MyTime-Thread every second. The constructor of the MyTime-Class gets some information to update our widget on the desktop/home screen. Get our main view that we created (at that point you could also change your layout to another design).
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
In the run method, we set the time with our new Date and update the remote View. That’s already it. Now you have a widget that is displaying the current time.
Previous Tutorial : Extend your HelloWorld App Step by Step [Toast Concept]
Next Tutorial : How to set Icons for your Android apps
great tut buddy... so u r from cochin... me trichur ( but in dublin)
s-X-s said:
great tut buddy... so u r from cochin... me trichur ( but in dublin)
Click to expand...
Click to collapse
Thanks mate, and yes I'm from Cochin
thank you so much for these amazing and super easy tutorials!! please make a few more!!
shahrukhraza said:
thank you so much for these amazing and super easy tutorials!! please make a few more!!
Click to expand...
Click to collapse
Welcome mate, yeah sure will make more Tutorials
Hey, I am trying to follow your tutorial. But I don't understand why the error "ERROR Error: No resource found that matches the given name (at 'background' with value '@drawable/widget_bg_normal')" won't disappear. It's just like Eclipse doesn't want to accept that i have put a new folder including the picture inside the res folder. I can see both the drawble folder and the widget_bg_normal.9.png in the project explorer, but Eclipse keeps saying that no resource is found.
Edit: Hm, putting the image file inside of one of the res/drawble-Xdpi folders works. But still I don't understand why creating a new drawble folder doesn't.
elyts said:
Hey, I am trying to follow your tutorial. But I don't understand why the error "ERROR Error: No resource found that matches the given name (at 'background' with value '@drawable/widget_bg_normal')" won't disappear. It's just like Eclipse doesn't want to accept that i have put a new folder including the picture inside the res folder. I can see both the drawble folder and the widget_bg_normal.9.png in the project explorer, but Eclipse keeps saying that no resource is found.
Edit: Hm, putting the image file inside of one of the res/drawble-Xdpi folders works. But still I don't understand why creating a new drawble folder doesn't.
Click to expand...
Click to collapse
Hi, from the screenshot I see that your widget_bg_normal.9.png image is put inside the drawable folder which is inside the layout folder. That is plain false. The drawable folder should be out side the layout folder, and inside the res folder. The folder tree looks like this :
res
- drawable-hdpi
- drawable-ldpi
- drawable-mdpi
- drawable-xhdpi
- drawable
layout
- main.xml
great tutorial...thanks :good:
coolsandie said:
Hi, from the screenshot I see that your widget_bg_normal.9.png image is put inside the drawable folder which is inside the layout folder. That is plain false. The drawable folder should be out side the layout folder, and inside the res folder. The folder tree looks like this :
res
- drawable-hdpi
- drawable-ldpi
- drawable-mdpi
- drawable-xhdpi
- drawable
layout
- main.xml
Click to expand...
Click to collapse
Ok, thanks. I was pretty confused - you should change the path in your tutorial then.(Path:- HelloWidget > res > layout > drawable > widget_bg_normal.9.png)
elyts said:
Ok, thanks. I was pretty confused - you should change the path in your tutorial then.(Path:- HelloWidget > res > layout > drawable > widget_bg_normal.9.png)
Click to expand...
Click to collapse
Oops sorry, that was a mistake from my side. Corrected the OP now. Thanks for notifying.
Hehe, no problem But I have another problem. I finished Step 3 and now I want to take a look at my widget. The project doesnt show any errors and I can upload the widget to my phone. The package is on my phone but it is not shown inside my widget list. What could be the reason for this? I mean, shouldnt there be an error or something if it does not work? Did I forget something? I really dont know why I am having so much problems following simple Android tutorials...
elyts said:
Hehe, no problem But I have another problem. I finished Step 3 and now I want to take a look at my widget. The project doesnt show any errors and I can upload the widget to my phone. The package is on my phone but it is not shown inside my widget list. What could be the reason for this? I mean, shouldnt there be an error or something if it does not work? Did I forget something? I really dont know why I am having so much problems following simple Android tutorials...
Click to expand...
Click to collapse
Actually, I haven't tried this on my phone, as I simply executed it to the Emulator. Anyways select USB Debugging mode, and make sure your device is detected by the ADB. And then run your project and the widget will be installed on your phone, and when you unlock the device the widget should display on your homescreen I guess. I'll make a try and upload the screenshot of my phone, if it was successful.
coolsandie said:
Actually, I haven't tried this on my phone, as I simply executed it to the Emulator. Anyways select USB Debugging mode, and make sure your device is detected by the ADB. And then run your project and the widget will be installed on your phone, and when you unlock the device the widget should display on your homescreen I guess. I'll make a try and upload the screenshot of my phone, if it was successful.
Click to expand...
Click to collapse
That's exactly what I did. But there was nothing on my display. So I browsed the files on my phone and I can find the package with the name of my project. But I can't do anything with it. If I run the project on an AVD the same happens.
elyts said:
That's exactly what I did. But there was nothing on my display. So I browsed the files on my phone and I can find the package with the name of my project. But I can't do anything with it. If I run the project on an AVD the same happens.
Click to expand...
Click to collapse
So I just run on my phone, and it was okay, it executed.
The Steps I did was :
- My android-sdk lies in D:\android-sdk-windows
- Open Command-Prompt, and type D:\android-sdk-windows\platform-tools\adb devices
- It displayed my device, so ADB detected it.
- Open Eclipse, run your project and it will be installed on your phone.
- Then simply add the widget on your Homescreen, and also check the "Manage apps" to see whether the apk is installed.
EDIT: Check whether you get these messages in Eclipse (If executing on the device)
Code:
[2012-11-27 20:57:40 - HelloWidget] ------------------------------
[2012-11-27 20:57:40 - HelloWidget] Android Launch!
[2012-11-27 20:57:40 - HelloWidget] adb is running normally.
[2012-11-27 20:57:40 - HelloWidget] No Launcher activity found!
[2012-11-27 20:57:40 - HelloWidget] The launch will only sync the application package on the device!
[2012-11-27 20:57:40 - HelloWidget] Performing sync
[2012-11-27 20:57:40 - HelloWidget] Automatic Target Mode: using device 'xxxxxx'
[2012-11-27 20:57:40 - HelloWidget] Uploading HelloWidget.apk onto device 'xxxxxxx'
[2012-11-27 20:57:40 - HelloWidget] Installing HelloWidget.apk...
[2012-11-27 20:57:46 - HelloWidget] Success!
[2012-11-27 20:57:46 - HelloWidget] \HelloWidget\bin\HelloWidget.apk installed on device
[2012-11-27 20:57:46 - HelloWidget] Done!
EDIT2: And these messages, if running on AVD
Code:
[2012-11-27 21:29:22 - HelloWidget] ------------------------------
[2012-11-27 21:29:22 - HelloWidget] Android Launch!
[2012-11-27 21:29:22 - HelloWidget] adb is running normally.
[2012-11-27 21:29:22 - HelloWidget] No Launcher activity found!
[2012-11-27 21:29:22 - HelloWidget] The launch will only sync the application package on the device!
[2012-11-27 21:29:22 - HelloWidget] Performing sync
[2012-11-27 21:29:22 - HelloWidget] Automatic Target Mode: launching new emulator with compatible AVD 'Google'
[2012-11-27 21:29:22 - HelloWidget] Launching a new emulator with Virtual Device 'Google'
[2012-11-27 21:29:33 - HelloWidget] New emulator found: emulator-5554
[2012-11-27 21:29:33 - HelloWidget] Waiting for HOME ('android.process.acore') to be launched...
[2012-11-27 21:30:36 - HelloWidget] HOME is up on device 'emulator-5554'
[2012-11-27 21:30:36 - HelloWidget] Uploading HelloWidget.apk onto device 'emulator-5554'
[2012-11-27 21:30:36 - HelloWidget] Installing HelloWidget.apk...
[2012-11-27 21:31:35 - HelloWidget] Success!
[2012-11-27 21:31:36 - HelloWidget] \HelloWidget\bin\HelloWidget.apk installed on device
[2012-11-27 21:31:36 - HelloWidget] Done!
Most probably you'll find the widget running on your Homescreen (in Emulator). But when run on device, I had to manually set the widget on Homescreen by going into widgets section on App Drawer.
coolsandie said:
So I just run on my phone, and it was okay, it executed.
The Steps I did was :
- My android-sdk lies in D:\android-sdk-windows
- Open Command-Prompt, and type D:\android-sdk-windows\platform-tools\adb devices
- It displayed my device, so ADB detected it.
- Open Eclipse, run your project and it will be installed on your phone.
- Then simply add the widget on your Homescreen, and also check the "Manage apps" to see whether the apk is installed.
EDIT: Check whether you get these messages in Eclipse (If executing on the device)
Code:
[2012-11-27 20:57:40 - HelloWidget] ------------------------------
[2012-11-27 20:57:40 - HelloWidget] Android Launch!
[2012-11-27 20:57:40 - HelloWidget] adb is running normally.
[2012-11-27 20:57:40 - HelloWidget] No Launcher activity found!
[2012-11-27 20:57:40 - HelloWidget] The launch will only sync the application package on the device!
[2012-11-27 20:57:40 - HelloWidget] Performing sync
[2012-11-27 20:57:40 - HelloWidget] Automatic Target Mode: using device 'xxxxxx'
[2012-11-27 20:57:40 - HelloWidget] Uploading HelloWidget.apk onto device 'xxxxxxx'
[2012-11-27 20:57:40 - HelloWidget] Installing HelloWidget.apk...
[2012-11-27 20:57:46 - HelloWidget] Success!
[2012-11-27 20:57:46 - HelloWidget] \HelloWidget\bin\HelloWidget.apk installed on device
[2012-11-27 20:57:46 - HelloWidget] Done!
EDIT2: And these messages, if running on AVD
Code:
[2012-11-27 21:29:22 - HelloWidget] ------------------------------
[2012-11-27 21:29:22 - HelloWidget] Android Launch!
[2012-11-27 21:29:22 - HelloWidget] adb is running normally.
[2012-11-27 21:29:22 - HelloWidget] No Launcher activity found!
[2012-11-27 21:29:22 - HelloWidget] The launch will only sync the application package on the device!
[2012-11-27 21:29:22 - HelloWidget] Performing sync
[2012-11-27 21:29:22 - HelloWidget] Automatic Target Mode: launching new emulator with compatible AVD 'Google'
[2012-11-27 21:29:22 - HelloWidget] Launching a new emulator with Virtual Device 'Google'
[2012-11-27 21:29:33 - HelloWidget] New emulator found: emulator-5554
[2012-11-27 21:29:33 - HelloWidget] Waiting for HOME ('android.process.acore') to be launched...
[2012-11-27 21:30:36 - HelloWidget] HOME is up on device 'emulator-5554'
[2012-11-27 21:30:36 - HelloWidget] Uploading HelloWidget.apk onto device 'emulator-5554'
[2012-11-27 21:30:36 - HelloWidget] Installing HelloWidget.apk...
[2012-11-27 21:31:35 - HelloWidget] Success!
[2012-11-27 21:31:36 - HelloWidget] \HelloWidget\bin\HelloWidget.apk installed on device
[2012-11-27 21:31:36 - HelloWidget] Done!
Most probably you'll find the widget running on your Homescreen (in Emulator). But when run on device, I had to manually set the widget on Homescreen by going into widgets section on App Drawer.
Click to expand...
Click to collapse
My log looks exactly like yours. And when i check "Manage Apps" its shown there. But in the widgets tab in the app drawer there are just the standard widgets that come with android. Not the one from the tutorial.
elyts said:
My log looks exactly like yours. And when i check "Manage Apps" its shown there. But in the widgets tab in the app drawer there are just the standard widgets that come with android. Not the one from the tutorial.
Click to expand...
Click to collapse
Try uninstalling that. And then "Clean Project" in Eclipse, and then execute in emulator and see whether you see the widget in homescreen after unlocking the device, ie emulator. As the project name is "HelloWidget", you should see the name "HelloWidget" inside the Widgets tab in App Drawer. I'm not sure why its not displaying in yours. :\
coolsandie said:
Try uninstalling that. And then "Clean Project" in Eclipse, and then execute in emulator and see whether you see the widget in homescreen after unlocking the device, ie emulator. As the project name is "HelloWidget", you should see the name "HelloWidget" inside the Widgets tab in App Drawer. I'm not sure why its not displaying in yours. :\
Click to expand...
Click to collapse
I started all over again... Deleted my project and created a new one. Somehow all files like main.xml, HelloWidget.java and hello_widget_provider.xml were in the new project, although i chose a different project name. I think Eclipse was just messed up. Now everything works Thank you for the great tutorial.
elyts said:
I started all over again... Deleted my project and created a new one. Somehow all files like main.xml, HelloWidget.java and hello_widget_provider.xml were in the new project, although i chose a different project name. I think Eclipse was just messed up. Now everything works Thank you for the great tutorial.
Click to expand...
Click to collapse
Glad to know and welcome.
Related
Droid Explorer is the #1 Open Source Android device manager for Rooted devices.
Device Requirements
Rooted Android Device with busybox
Guide to installing busybox on the Droid
PC Requirements
Windows (looking for a developer to help create UI for mono)
.NET Framework 3.5 SP1
Some plugins require Java Runtime Environment and Java Web Start
Confirmed Devices
All Devices have been rooted and busybox installed
HTC Dream / G1 / ADP1
HTC Sapphire / Magic / MyTouch 3G / ADP2 / Ion
HTC Hero / G2 / CDMA Hero
Google Nexus One
Motorola DROID
Samsung Galaxy / i7500
Acer Liquid
HTC EVO
Features
Includes the required windows USB drivers - you will be prompted to install the drivers during installation if running vista/7
Auto setup of Android SDK tools and drivers during install
Use an existing Android SDK if you already have one set up
Multiple Device Support
No need to mount SD card to access files
Copy any file on the device to PC
Copy files to clipboard
Copy update to device and auto-apply
Drag & Drop copying from Explorer to Droid Explorer
Auto detection of connected/disconnected device
Open files on PC
Plugin Framework
Application Manager
Right Click APK to install/uninstall
Take screen shots of device (landscape & portrait)
Open right from "My Computer" (a lot like how WinMobile is with active sync)
SQLite Manager Plugin
Uses System Icons for files displayed in explorer
Familiar Explorer like UI, including an Explorer like location bar
Android Screencast plugin
Install/Uninstall APK files right from explorer
Standalone plugin runner
Window 7 JumpLists for plugins
DesktopSMS plugin - Send SMS messages from your desktop
Service can be controlled now from the options dialog (can create the service if you do not use the installer)
Backup plugin for the "Bare Bones" Roms
Run shell scripts on the device by double clicking them
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'd like any thoughts you may have for other features to add to Droid Explorer. Report bugs or request features here or on the project issue tracker.
Web Installer (x86)
Requires internet connection to download android sdk tools
x86 Serivce will not work on x64 OS
Web Installer (x64)
Requires internet connection to download android sdk tools
Use this install if running a 64 bit OS
Standalone Installer (x86)
Does not require internet connection. Larger download.
Standalone Installer (x64)
Does not require internet connection. Larger download.
Use this install if running a 64 bit OS
Older Releases
Source Code Available at CodePlex
Change log 0.8.7.0
Can now use existing SDK instead of the "trimmed" version
Settings stored in the registry now check both Local Machine and Current User
Lots of other little fixes
Change log 0.8.6.0
fixed missing file in the standalone installer
added check for minimum .net framework version in to bootstrapper (v3.5sp1)
increased the service start/stop timeout in the bootstrapper from 30 seconds to 60 seconds
removed initial strings from download panel labels of bootstrapper
htc desire / bravo icon added for attached devices - thanks to beadza for identifying the device
added ability to only install the SDK Tools by running install with /sdk switch
sdk install mode checks if DE is installed, if not, it switches to full install mode
bart plugin now also checks the sd-ext mount point for the license.
added the sd-ext app paths as valid application paths
added sd-ext app paths to the application backup plugin
removed anda.pk plugin as the site is dead.
screencast plugin changed to pull the jnlp file directly from the trunk of the project. If there
is an error, it falls back to a "local" file
fixed issues with spaces in folder names
motorola backflip icon added for attached devices - thanks to zibiza for identifying the device
new screenshot app that handles all resolutions. Uses new methods to get the framebuffer data
adjusted the RGB565 class to better handle other devices for screenshots
started to implement communicating with adb over TCP like ddms does.
acer liquid icon added for attached devices - thanks to fyodor0218 for identifying the device
started working on the ability to use existing sdk (not yet an option, but soon)
Change log 0.8.5.1
Fixed typo in the final step when uninstalling
Fixed x64 issues for windows 7 x64 - still broke on Vista x64 & XP x64 (sorry people, i'm still working on it!)
Default button for bootstrapper changed to the "next" button instead of cancel
added incredible icon for attached devices
added nexus one icon for attached devices
added galaxy S (gt-i9000) icon for attached devices
added acer liquid icon for attached devices
updated the samsung moment icon
added a new "open" version of the moment - rename in the assets directory to "moment.ico" to use.
Change log 0.8.5.0
android screen cast updated to load the lastest build from the trunk
changed publish to use skydrive share instead of the api from the msbuild tasks
added platform tools 2.2
added sdk tools r6
updated repository.xml
added help video link when the device cannot be found
attempting to fix the registry read issues with XP SP3 x64 and Vista x64
removed the "fade out" of the expandos from the treeview to remove the flicker
fixed the issue with opening offscreen
fixed workitem:10275, changed "Close" to "Finish" in the description of the final step of installer
fixed the "hanging" of trying to delete a file. added the '-f' switch to never prompt.
Change log 0.8.4.3
Fixed the install / start up issues caused by the platform tools having a typo in the file name
Change log 0.8.4.0
Fixed issue with cyanogen 4.2.14.x
fixed issue with bart manager plugin license (sorry for the delay)
added 2.1 r1 platform tools
added usb drivers r3 - adds support for nexus one
fixed issue with install plugin crashing if application is already installed.
Change log 0.8.3.0
Fixed bug with device not identifying recovery mode
Display QR code to purchase bart manager if license not found.
mount partitions in recovery mode to find bart manager license
bart manager now attaches to process to output the info
another attempt to set as root when starting for non-adp devices
There is a known bug with droid explorer detecting a device already "connected" going in to recovery mode.
Flash recovery now works in any mode, not just recovery
bart manager license now available for purchase on market.
Change log 0.8.2.3
Drivers removed for windows XP until XP issue with the drivers can be resolved.
added device icon for the nexus one / passion
Code setup to allow some plugins to be purchased.
The .net 3.5 check has been removed for the time being until a better solution can be implemented.
build published via [url:MSBuild Deployment Tasks|http://mdt.codeplex.com]
some bugs fixed here and there
What happened to 0.8.2.2? - Windows locked the directory when I was building that version so it failed and I couldn't delete it to rebuild so I skipped it.
Change log 0.8.2.1
Fixed install issues with 0.8.2.0 - should install for x86 and x64
Change log 0.8.2.0
created a WiX custom action library for checking for the android usb drivers
install logging is now merged in to one file and off by default. use /l[og] to turn on logging
tools will always be downloaded/extracted during install. This lets the tool update to newer tools if needed
fixed delete file when the file name has a space in the file name.
sdk tools upgraded to r4
fixed bug in uninstall if the service did not exist on the machine
should now successfully check for the android usb drivers and install them if revision 2 is not installed.
remember location of "open file dialog"
added code that should check for .net 3.5 sp1 before "crashing" for not having it installed.
added check that the user is installing the correct version (x86 or x64) for their system
Change log 0.8.1.0
added a splash screen so the user is aware that the app is running right away
.NET Framework 3.5 SP1 check added to installer.
apk shell extension now uses the path stored in the registry for the tools.
added logging to the install process
kill all adb processes before attempting to cleanup the sdk path during install.
apk seems to not be working, still debuging the issues. it will be back.
defined a platform constant to the project scripts, x86: PLATFORMX86, x64: PLATFORMX64, ia64: PLATFORMIA64
fixed bug with reading / writing to the registry in x64. now looks in HKLM\Software\WOW6432Node\
fatal errors are now caught and user given option to restart app, close app, or report bug
there is still a bug with installing the driver, the check isnt working so the driver still needs to be installed manually.
Change log 0.8.0.1
fixed installer issue where it crashed if you do not have a proxy set up
x64 installer has issues. - Tempory Fix - Will fixed in next release
Change log 0.8.0.0
added the r2 windows usb drivers, which add support for droid and other devices
added new checks for the drivers. Checks for dream/magic/sholes - these are the devices that google defines in the .inf file.
images moved to external resources library
changed the installer images to be more "custom"
removed need for droid explorer to require "run as administrator" - Yay!
the bootstrapper now handles starting the service. This makes sure the sdk is setup before it starts.
bootstrapper is self contained, the msi is an embedded resource and all referenced assemblies are ILMerged
repository file is hosed on the droid explorer google code site, it is based on the same one that google uses for the android sdk setup
the tools are also hosted on the google code site, this is so the download size is smaller, since all unused bits are removed.
A fully standalone version of install is also available. No need for internet access to install.
boot strapper support uninstall - setup.exe /uninstall
removed reference to the "common.shared" assembly.
added a properites dialog for folders/files
properties dialog shows security settings as well.
fixed icons in context menu for new folder/file
Change log 0.7.12.0
fixed the error that anda.pk plugin logs when it starts because it did not implement "Runnable"
shell extension for apk files so the apk icon displays in explorer - based on http://code.google.com/p/apkshellext/
seems there is a bug in some APKs that dont display their icon, nor do they display the default icon.
registers and unregisters the shell extension on install/uninstall
driver check now works better in the installer
removed some tools menu items that have been replaced by plugins
Installer now gives "options" on what features to install
changed default apk icon to be the "android package" icon
fixed bug with launching ddms and hierarchy viewer
fixed bug launching the google applications backup plugin
added methods to the core command runner to make a mount point read/write and readonly
added icon for the motorola droid
added icon for the samsung moment
added icon for the htc droid eris
Change log 0.7.11.0
USB Drivers installed - This is still in "alpha", should only install them if you need them. please report any issues. It doesn't actually install the drivers, it places them in the driver store, when the device is attached, and the new hardware wizard displays, selecting "automatically install (recommended)" should find the drivers automatically. This installs the 1.6 drivers.
fixed logcat not starting
created a new logcat console that colorizes the log entries
save the logcat output (minus the log level indicator (W/I/D/E/))
support for android screencast 0.2
Change log 0.7.10.1
Fixed crash on device going from connected to disconnected state
Change log 0.7.10.0
Sign Package plugin (signs zip file with test keys)
modified IPlugin to now have methods for creating the toolstrip button and menu items
DroidExplorer.Core.Plugin.PluginHeler added. Contain default static methods for creating the toolstrip button and menu
and.apk now a plugin instead part of "core"
started a contacts manager
started a tool to export facebook contacts from official application to android contacts
added "recovery" as device state.
now "attaches" while in recovery mode.
screenshot now works in recovery mode.
screenshot rotates the current image before refreshing when switching between landscape & portrait
flash recovery image now a plugin - only active when in recovery mode
some bug fixes that I don't remember the exact details on
Change log 0.7.9.0
new shell console enhanced
getprop wrapped to get device properties
explorer icon now attempts to load an icon of the device
- Known devices:
- Bahamas (Tattoo)
- GT-I7500 (Galaxy)
- Hero (G2/Hero)
- Sprint Hero (do not yet know what it identifies itself as in ro.product.device may just show normal hero)
- cliq (need to verify what ro.product.device returns)
- Saphire (MyTouch3G/ION/Magic)
- Dream (G1/ADP1)
- Pulse (need to verify what ro.product.device returns)
- Zii Egg (need to verify what ro.product.device returns)
Device properties viewable in options->environment->known devices->[device-serial]->properties (only when device is connected)
fixed bug with screenshot image being landscape but window portrait.
fixed bug with large icons not always showing the right icon
Change log 0.7.8.0
Desktop SMS now launched from officially signed jar file
Plugin tool strip disabled / enabled when device disconnected / connected
SymLinks and Directories can now also be renamed
F2 starts file/link/directory rename
Executable files now run if double clicked (open from context menu)
Shell Console (could still be buggy so the normal shell window is still available)
double clicking sh scripts run them
plugins that are registered as a file type handler will show up in the right click menu for the file
Change log 0.7.7.0
Renaming of files (folders and links coming)
Google Application Backup (GAB) plugin added
GAB supports HTC's ADB1 update packages (containing system.img), pulling from the device or from normal update.zip
Screen shot plugin supports portrait & landscape modes (use button or right click image)
Screen shot threaded so it doesn't "hang"
Change log 0.7.6.0
Fixed screen shot plugin from opening off screen if droid explorer is maximized or positioned on the right of the screen.
Check for the USB Driver version and download the tool set based on that. If you select the sdk yourself, you must select the correct tools yourself.
USB Driver Version info available in Options->Environment->Android SDK
Speed up of navigating to different directory. Reduced the number of LS calls that are made to build the tree and listview
Change log 0.7.5.0
Fixed plugins executing when loading within Runner
Fixed bug with additional plugin getting the same changed values as other plugin.
Change the SDK path from the Options dialog (requires restart of application)
Fixed bug with apk's not displaying.
Fixed Batch Installer not "showing"
provided a way to manually install, start and stop the droid explorer service - for non-installer users
added ability to save debug output to a file
moved debug window filter buttons to the right
debug window will display below DE if there is room, otherwise, it will display at the top of the screen
added plugin to launch DesktopSMS. Requires the DesktopSMS Server APK be installed on the device - Currently usinging a signed jar by me, hopefully the developer will sign his version.
can now copy symlinks files to clipboard
Change log 0.7.4.0
Changed the SdkInstallDialog to use a WebRequest instead of the WebClient. Hopefully this will help some peoples issues...
Window settings are now saved and reloaded.
Remembers the folder view state (large icon, details, etc)
added --color=never to directory listing command. this should fix the issue people with Heros are having
moved the options dialog tree config to its own file, as it really isnt configured by the user.
added batch installer plugin (alpha) that can install/uninstall multiple apk's at one time.
added logging info for droid explorer. (saved in %USERAPPDATA%\DroidExplorer\logs)
it should also handle "unhandled" errors better
wired up Tools menu items
Added property to indicate if a plugin can be ran by the Runner
Jumplist items added for runnable plugins
Change log 0.7.3.0
app.manifest added to projects. requestedExecutionLevel = requireAdministrator. This means in Vista/Win7 it will prompt w/ UAC. I can not get around this at this time.
this is because in order for the service to use the same settings as the application, i need to save them in the install directory.
The sdk tools, if downloaded, is no longer stored in the user directory, it is stored in the install directory, see above for the reason.
Known devices moved back to HKLM for the same reasons above.
New Options form added.
Device manager now part of options dialog
plugins can now reside in any directory as long as it is added to the plugins settings
plugins can now be enabled or disabled from the options dialog
Service is now working because of the requireAdministrator change.
DroidExplorer.Runner added - a tool that can execute a plugin; usage: DroidExplorer.Runner.exe /type=Full.Plugin.Class.Name,Plugin.Assembly.Nam/any /additional /args
if the type argument is not specified, then it will display a plugin selection dialog.
Installer plugin. This is launched by the runner when an APK file is opened in Explorer.
Registry settings to register .apk files to open with DroidExplorer.Runner /Installer (create with MSI installer)
.apk files can be installed by double clicking them or by right clicking and selecting "Install"
.apk files can be uninstalled by right clicking and selecting "Uninstall"
the initial device selection dialog is only required if more then 1 device is connected.
If you have set up to use the SDK tools by downloading the tools and put them in your user application data directory, when launched, it will prompt you to re-setup the tools. They are not stored in the user directory because the Service can not access that directory.
Just realized the bug with the device name not showing in the titlebar/addressbar. This is already fixed and will be in the next release.
Future Features you will see in Droid Explorer
Complete integration with the Managed Android Debug Bridge. R
Root will not be needed, at least for copy file operations. Things like flashing recovery, and deleting from /system will still require root.
Busybox dependency will be dropped.
SQLite Database Manager to replace the feature lacking plugin that exists now.
Faster navigation when changing directories
What features do you want to see?
Hi guys,
I have made a new working Android ADB FS plugin for Total Commander (the others I have come accross did not work well)
Android ADB
The ultimate Android Total Commander file system plugin with extra features:
- Apps management (Install, Uninstall and Backup your apps)
- APK icons and metadata with custom columns
- LogCat/BugReport/Dmesg (Copy file from folder), Shell
- Reboot menu with (Reboot, Hot Boot, Recovery, Download and Power Off)
- Screenshots (Copy file from .screenshot folder)
- Multiple devices with device rename functionality (friendly name)
- Rooted, semi-rooted and non-rooted devices
- Full unicode support
- x32 and x64 support
- TC command line integration
- Background copy/move
- Owner and Group custom columns
- Full file system management (download/upload recursive directories, copy, delete, rename, move, edit, view and more)
- Copy/Move between 2 devices
- Set/Get file attributes/permissions - Change Attributes action in Total Commander
- ADB USB and wireless ADB (no need to install Android SDK)
- Auto mount support
- Debug logs
- Rich settings
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download:
http://www.totalcmd.net/download.php?id=android_adb
Official Discussion Forum:
http://ghisler.ch/board/viewtopic.php?p=252125
Please, leave your comments, suggestions and bug reports in the official plugin discussion page.
Requirements:
- Enabled "Android debugging" on your device
- Java for the screenshot functionality
- Device connected to USB with proper drivers (an ADB device must be listed in Windows Devices)
- WiFi ADB (a rooted device with the "WiFi ADB" app downloaded from Google Play)
What's New:
3.0
- Update: .reboot renamed to .power, Hot Reboot label used, Download and Bootloader actions added
- Fix: File List - new SIV_DelimTrim method introduced, does not trim spaces in the value of filename (fixes issues with filenames containing multiple spaces after each other)
2.9
- New: File listing - Symlinks get displayed in the Info column
- Update: FTP connection toolbar - logs not truncated anymore, full text length supported
2.8
- New: Reboot action contains a new popup menu with these options: Reboot, Hot Boot, Recovery, Download, Power Off (some of them require a rooted device)
- Update: Connect To Device causes a refresh of file listing
2.7
- Fix: Device name with spaces fixed, support for device name with spaces added for screenshots and others
- New: New Windows Job Objects option (turn off if you use your own adb in system PATH)
2.6
- New: .apps listing - if permissions denied to /data/app/ then "pm list packages" is used instead (works on emulator and non rooted phones - you can still uninstall and install apps)
- Update: Rename device - Checks device name collisions better
- Update: File listing - Filter still opens a blank folder
2.5
- New: Rename your device via F2 (you can name your device to a friendly name, to clear the name back rename to "_")
- New: Custom column Info, displays app (apk) Name and Version if columns and APK info enabled
- New: Custom columns Owner and Group, new option to disable custom columns, file item cache
- New: .dmesg special folder added, delete file in .dmesg directory clears the log ("dmesg -c")
- New: Job Objects used for executed applications so when TotalCommander stops all its executed childs (adb, aapt and java) will be stopped too (helps with plugin updates and others)
- New: Total Commander FTP connection toolbar support added - for executed commands in command line and for new option "Debug logging to FTP connection toolbar"
- Update: APK file properties dialog (Alt+Enter) displays also app permissions
- Update: Delete file in .logcat directory calls "logcat -c" to clear the log
2.2
- New: File transfer abort support added
- New: Symlink indicated by "SysFile" attribute - the only possible indication that TC handles (displayed as "!" icon overlay)
- New: File attributes - SUid/GUid/Sticky-Bit support added
- Update: Symlink - busybox ls uses the -p param to idenfity a dir or file, native ls assumes all symlinks are files except for root in such case it will directories (no other effective way to detect file or directory )
- Update: busybox vs. native ls format detection updated
- Fix: /dev/ file listing fixed
2.1
- New: .bugreport special folder added
- Update: Options - Debug tab jumps to end
- Update: .logcat folder (Copy file from .logcat folder)
- Update: File listing - file size not shown for non-file / items
- Update: Special folder files (screenshot, logcat, bugreport) have new filename template
2.0
- Update: .apps dir can always be entered
- New: File version information resource added
1.9.1
- Update: Options dialog contains a new OK button
- New: Options item in the root of the plugin
1.9
- Fixed dialog modality and parent window
- New: Background copy/move support added
1.8
- Fix: Move (F6) from or to device deletes file properly
- Fix: Date long in the past problem fixed
- Update: Pull file workaround for /system /data files when ADB Pull fails because of semi-rooted device and permission denied - file copied to sdcard and then copied automatically
1.7
- Binaries moved to bin dir, aapt added
- APK Icon and metadata support added, new fsplugin.ini variable to disable APK download and icon extraction
- APK properties (Alt+Enter) support added - displays the Name, Package and Version information
- Options dialog added (Alt+Enter at the plugin) - all options can be set here, readme.txt displayed and debug.log viewed
1.6
- Debug log support added - enable in fsplugin.ini
- LocalTZLS new ini variable added (fsplugin.ini) controls if ls returns time in local or UTC format
- ls - detection of ANSI escaping and removing for non busybox ls
1.5
- Set/Get file attributes/permissions - Change Attributes action in Total Commander
- adb binary - also added AdbWinUsbApi.dll
- ls syntax detection improved
- Auto mount working for semi-rooted devices
- Push file workaround to /system files when ADB Push fails because of semi-rooted device and permission denied (mount does not help here) - file copied to sdcard and then moved to /system automatically
1.4
- adb binary included (works only with the connect feature) - no need to install Android SDK
- "busybox ls" not used because utf8 is not supported (https://dev.openwrt.org/ticket/7993), ls syntax detection improved, new option to switch back to busybox ls in fsplugin.ini
- Execution operations full unicode
- An error is displayed if Java could not be run
- Copy/Move between 2 ADB devices support added
1.3
- Proper way to detect PluginDir
- x64 support
- TC command line integration
1.2
- Auto mount rw for rooted devices when required
- Better detection of the plugin dir used
- Settings stored in fsplugin.ini, support for ADBPath and JavaPath variables
- About window with name and version added
1.1
- Special device folders - Apps, Screenshot, Shell, LogCat, Reboot
- Full unicode support
- Remembers the last connected device IPort
1.0
- Initial release
Click to expand...
Click to collapse
Seems to be good! Will test more. Thanks!
mixed results
i have an HTC Sensation rom.
yesterday i used AOSP rom and everythink was ok.
now when i try it with HTC Sense Rom, directory's are not OK.
i mean for example "sdcard" directory is: "[1;36msdcard[0m" ...
i upload a screen shot..
trycatch said:
i mean for example "sdcard" directory is: "[1;36msdcard[0m" ...
Click to expand...
Click to collapse
I have the same entries shown :-(
Edit: I found the solution here:
http://www.ghisler.ch/board/viewtop...start=30&sid=9c14673fa4b7f0648777cc706d2a7bed
and it works now fine.
tramp20 said:
I have the same entries shown :-(
Edit: I found the solution here:
http://www.ghisler.ch/board/viewtop...start=30&sid=9c14673fa4b7f0648777cc706d2a7bed
and it works now fine.
Click to expand...
Click to collapse
I have just uploaded a new version. It fixes these issues.
New version
A new version has been released:
1.7
- Binaries moved to bin dir, aapt added
- APK Icon and metadata support added, new fsplugin.ini variable to disable APK download and icon extraction
- APK properties (Alt+Enter) support added - displays the Name, Package and Version information
- Options dialog added (Alt+Enter at the plugin) - all options can be set here, readme.txt displayed and debug.log viewed
1.6
- Debug log support added - enable in fsplugin.ini
- LocalTZLS new ini variable added (fsplugin.ini) controls if ls returns time in local or UTC format
- ls - detection of ANSI escaping and removing for non busybox ls
Click to expand...
Click to collapse
Works very nicely with my SGS3 ROM and CWM recovery. An option to connect to IPort and later add it to the directories quick list or "cd" to it from a toolbar button is a really nice extra, too
Thanks a lot!
I was surprised to find out that searching using Alt+F7 in Total commander works also with this plugin. However, as the first "folders" listed are commands like shell and reboot, search will enumerate also through these, therefore it looks like this: you open search window, type what you want to find and press enter. As the search goes through ".reboot" folder it asks "Are you sure?" so I pressed yes as I thought it's just asking me if I really want to search on phone. The search went on and also found some files but meanwhile the phone went on and rebooted D Funny but would be nice if this could be fixed
But except this small issue - perfect plugin!
How can i change permissions?
editroblem fixed
Excellent, finally something I was searching for, working well on SGS III ! Really nice !
Very nice plugin, it actually makes me switch from my modification of Sztupy's TC Android plugin The only thing I miss is free space info. I implemented it into my/Sztupy's plugin by parsing df after entering a directory. I put this info into the connection console which is visible in the total commander toolbar, below the menu. Unfortunately there's no better way to display free space from plugin, is it?
Do anyone know why it is empty? Only the Android 4.2.2 and the 4.1.2 is good
/?Edit
Sorry,It's already well
This is simply brilliant. Seriously is there anything that cannot be done with Total Commander?
Sent from my Nexus 4 using Tapatalk
Aleq said:
Very nice plugin, it actually makes me switch from my modification of Sztupy's TC Android plugin The only thing I miss is free space info. I implemented it into my/Sztupy's plugin by parsing df after entering a directory. I put this info into the connection console which is visible in the total commander toolbar, below the menu. Unfortunately there's no better way to display free space from plugin, is it?
Click to expand...
Click to collapse
In case you haven't found a solution yet for the free space, just create a new command like this:
Name: Free space
Function type: Send shell command
Command: sh
Parameters: *df -h . | cut -b 23-32,35-50
May need some tweaking for the icon.
jakubklos said:
Hi guys,
I have made a new working Android ADB FS plugin for Total Commander (the others I have come accross did not work well)
Android ADB
The ultimate Android Total Commander file system plugin with extra features:
- Apps management (Install, Uninstall and Backup your apps)
- APK icons and metadata with custom columns
- LogCat/BugReport/Dmesg (Copy file from folder), Shell
- Reboot menu with (Reboot, Hot Boot, Recovery, Download and Power Off)
- Screenshots (Copy file from .screenshot folder)
- Multiple devices with device rename functionality (friendly name)
- Rooted, semi-rooted and non-rooted devices
- Full unicode support
- x32 and x64 support
- TC command line integration
- Background copy/move
- Owner and Group custom columns
- Full file system management (download/upload recursive directories, copy, delete, rename, move, edit, view and more)
- Copy/Move between 2 devices
- Set/Get file attributes/permissions - Change Attributes action in Total Commander
- ADB USB and wireless ADB (no need to install Android SDK)
- Auto mount support
- Debug logs
- Rich settings
Download:
http://www.totalcmd.net/download.php?id=android_adb
Official Discussion Forum:
http://ghisler.ch/board/viewtopic.php?p=252125
Please, leave your comments, suggestions and bug reports in the official plugin discussion page.
Requirements:
- Enabled "Android debugging" on your device
- Java for the screenshot functionality
- Device connected to USB with proper drivers (an ADB device must be listed in Windows Devices)
- WiFi ADB (a rooted device with the "WiFi ADB" app downloaded from Google Play)
What's New:
Click to expand...
Click to collapse
I was using the original one, it stopped working properly for a while and I was looking for this for a while. Thank you very much for your work.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Official myHUB Web site - http://myhub-web.com/
myHUB is a custom HUB service that comes with Website and end-user application. myHUB is free to use* (see details below) and easy to configure, there is no need to have dedicated Hosting server and maintain it, you will only need any free file hosting servers like DevHost, DropBox and any other for your uploaded files, the rest will do for you myHUB Web.
Introduce you the new generation of myHUB.
What you can do on myHUB Web:
Add, edit, view sections for myHUB
Add, edit, view details to all Sections of myHUB
Monitor Comments for the Posts (currently only available for News type of section)
Add, edit, view myHUB moderators for cooperation with the Team
Features of myHUB application:
CardUI style of the app
Google Navigation drawer with pull to refresh
Push notifications (Using Google Cloud Messanging)
Immediate updates of the data in the app when you adding/removing/editing posts
Provide News (With images, links)
Comments in the News
Open links posted with the News inside the application, no need to open heavy browsers
Provide any Download sections you want (Skins, System MODs, Icons, Keyboards, Kernels)
Automatic installation of zip files (Automatic safe reboot to recovery)
Automatic checking of MD5
How to start using myHUB service:
For a limited time, the registration on myHUB will be moderated with invitation codes only
Fill this form - myHUB Registration
Wait for invitation code
Once you get it, go to the webite http://myhub-web.com/ and register
Follow the Developers F.A.Q on how you need to configure your system for myHUB, make changes
Download latest available myHUB apk from Download on the website
Create your sections and details for them and be happy with result
myHUB has been featured on XDA Developers Portal
XDA:DevDB Information
[APP][DEV][4.1+] - myHUB - Home for your ROM Content, a App for the Android General
Contributors
mikrosmile
Version Information
Status: Stable
Current Stable Version: 1.0.7
Stable Release Date: 2013-07-27
Created 2013-10-14
Last Updated 2013-11-06
WIP
Official myHUB Sharing policy.
myHUB is Free to use for all Sense ROM Developers. (Fully featured, without any limitations) with following conditions
You never change app name, package name, developer name, etc.
You are not allowed to include donated app to your ROM (if you purchased it, it doesn't mean you are allowed to include it. The donation is from users, I don't ask anything from you as developer of the ROM )
You never change app icon
You need to fill form for all ROMs you have (Multi device for example) for Each Phone.
You never upload apk, any part of apk to Play Market.
You never ask for Donation pop-up dialog in the app.
You never change any String in the apk
You are to provide credits to this thread
To summarize there is one major rule - You are not allowed to add any changes, decompile, recompile apk by yourself.
If any of the following terms will not be followed, you will be banned to use myHUB for all your ROMs (you will have to remove myHUB from all your ROMs within 24 hours and there is no way to get permission back)
Your steps with Form and everything.
Download apk, configure it on your server or File hosting
Make it working, test everything by your own, not public release
When you are confident in using myHUB, want to release update/new ROM, fill Official Form.
After that your ROM will appear on the list who uses myHUB
Configuration guide you can find here on 4th post or click here
Official myHUB Form is located here
ROMs including myHUB:
HTC One
Elegancia™ ROM
RAYGLOBE ROM
42ONE ROM - The Aftermath
HTC One S
CharmanDroid ROM
HTC Sensation
KING SENSE ROM
HTC First
[MYST_UL] JmzMystJBSense 4.1.2 Sense 4+
HTC Pico (Explorer)
[Rom][ICS][4.0.3][Revolution Sense 5
HTC Desire HD
SVHD ROM
HTC Desire S
SVHD ROM
HTC Incredible S
SVHD ROM
HOW TO and ERRORS
To avoid any errors in app make sure all your links are working through WEB. Images, zip or apk files are downloadable.
If news link cannot be opened, make sure you have "/" symbol at the end of the link. Example - http://yoursite.com/somenews/
For name of sections try to use English in most cases. Section name represents download path for files you have and Recovery does not recognize some languages
Automatic installation of zip files requires reboot file in system/bin/
If Automatic reboot doesnt work, please make sure your SuperSU works. It always requests access and without access wont reboot
WIP
Downloads and Changelog
Download myHUB
(For full function of the app, it requires Configuration file)
You need to put apk file to /data/app directory
By downloading myHUB you are agree with the above terms
myHUB V1.0.7
Google Play Link
Changelog:
myHUB 1.0.7
Fixes for myHUB OTA issue
Updated layout
myHUB 1.0.6
Hot fixes
myHUB 1.0.5
Updated layout in myHUB, myHUB Files
ROM Devs - added custom download path
Fixed myHUB Files for some ROMs
Maybe something more i dont remember
myHUB 1.0.4
Fixed Kernel MD5 error
Fixed Automatic installation of OTA Updates
Added Remove update file in options after finish Downloading OTA updates
Added Automatic update of OTA when open myHUB OTA (Same option in Settings)
myHUB 1.0.3
Fixed MD5 error for OTA updates
myHUB 1.0.2
Hopefully fixed error for Sense Lite ROMs
Handled all Errors if configuration file is not present
myHUB 1.0.1
Fixed donation link
myHUB 1.0.0
Initial release
WIP
myHUB Configuration Guide. How to set-up myHUB
For myHUB you don't need any specific Server settings or even Hosting server at all. You can use any file-hosting as DropBox, Google Drive, DevHost etc. But the only problem is you need to find direct URL to the files (xml file, apk file etc) see below how.
By using this Guide and setting up myHUB in your ROM, you are agree with above terms
STEP 1. CONFIGURATION FILE, “MYHUB.TXT”.
All you need to get working the app is one txt file in your System folder. Create or download example file “myHUB.txt”
Fields in the file:
HTML:
main=http://mikrosense.com/sensehub/sections.xml
rom_upd=http://mikrosense.com/sensehub/update.xml
rom_name=DarkSense
rom_v=1.3.5
rom_dev=Jonny & mikrosmile
main – the link to the xml file on server which represents the Main menu in the app (See step 2);
rom_upd – the link to the xml file on server, which provides OTA update of your ROM (See step 4);
rom_name – Enter your ROM name;
rom_v – Enter the current version of your ROM;
rom_dev – Enter your name
You can setup either full working server or any File hosting (DropBox, Google Drive).
In case of using DropBox or Google Drive, you need to find the full link to the file first and insert it. For example, you upload a file to DropBox, start downloading it and in Downloads page (e.g. Chrome Browser), you will see full, direct link to the file. That one you need to use in configuration file.
STEP 2. CONFIGURATION FILE ON SERVER (MAIN MENU IN APP)
The file from step 1 under “main”;
You can create your own or download example “sections.xml”
The fields in the file:
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<item headline = "News">
<text>Latest news about ROM Development</text>
<section>news</section>
<image-url>http://mikrosense.com/sensehub/ic_news3.png</image-url>
<file_ext>apk</file_ext>
<url>http://mikrosense.com/sensehub/news.xml</url>
<details1></details1>
<details2></details2>
<date></date>
</item>
<item headline = "Skins">
<section>mods</section>
<dl_path>Skins</dl_path>
<text>Download amazing Skins for your Device</text>
<image-url>http://mikrosense.com/sensehub/ic_skins.png</image-url>
<file_ext>apk</file_ext>
<url>http://mikrosense.com/sensehub/skins.xml</url>
<details1></details1>
<details2></details2>
<date></date>
</item>
<item headline = "Kernels">
<section>kernels</section>
<dl_path>Kernels</dl_path>
<text>Simply download and install latest Kernels just from the app</text>
<image-url>http://mikrosense.com/sensehub/ic_kernels.png</image-url>
<file_ext>apk</file_ext>
<url>http://mikrosense.com/sensehub/kernels.xml</url>
<details1></details1>
<details2></details2>
<date></date>
</item>
</body>
The sections starts with <item> and ends with </item>. Within this tags you will identify everything you need to get working.
<item headline = “News”> - Represents name of the Section. You can name it as you want
<section></section> - this is represents Type of the section. This is compulsory field to identify how the app will know what content you want to provide. For news, it will use special made Layout to present them in a special text only way, the same as kernels. For other things apart from News and Kernels use tag mods, which can be anything you want, Skins, Icons, System MODs, etc.
<dl_path></dl_path> - Now you can set your own Download path. Note that you can use only English letters as Recovery does not recognize another languages
<image-url></image-url> - this is link to Section icon in the Main menu
<file_ext></file_ext> - Enter the file extension you want to provide.
<url></url> - This is the link to Individual Sections which you need to configure as well (See step 3);
Available section types:
news
mods
kernels
Available types:
apk
zip
STEP 3. CONFIGURATION FILE FOR NEWS, MODS, KERNELS, ETC
Here we will create Individual sections files for all Sections in your Main menu.
Let’s start from News type; You can create or download example file “news.xml”
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<item headline = "Welcome!">
<text></text>
<news_link>http://forum.xda-developers.com/showthread.php?t=2230067</news_link>
<date>03.06.2013</date>
</item>
<item headline = "Another News">
<text>Your text for another news</text>
<news_link></news_link>
<date>06.03.2013</date>
</item>
</body>
<item headline = “Welcome!”> - This is Headline of your News
<text></text> - Here you can enter any text on any language you want to. It also support multi-line texting. Just type as you are comfortable.
<news_link></news_link> - If your news does not contain enough information or you want the users to open a page in web, you can enter it, and the app itself will open it in the myHUB Web application.
<date></date> - This is the date of posting News
MODs type
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<item headline = "Blue+Orange Skin">
<text>Made by 12Reza12</text>
<image-url>http://mikrosense.com/sensehub/skin.png</image-url>
<file_ext>apk</file_ext>
<url>http://mikrosense.com/sensehub/Serene.apk</url>
<md5>d209ecdb2bacc7ac4aef806568236a67</md5>
</item>
<item headline = "Serene Skin">
<text>HTC Skin from HTC Hub</text>
<image-url></image-url>
<file_ext>apk</file_ext>
<md5></md5>
</item>
</body>
<item headline = “Name”> - This represents Name of the File.
<text></text> - This is another text field, you can enter anything you want. Size, Version, etc;
<image-url><image-url> - The image preview for the Mod, Skin, Icon, etc;
<file_ext></file_ext> - File extension you want to provide.
<md5></md5> - MD5 file sum. Needs to compare MD5 after finish of downloading file
Available types:
apk
zip
Kernels type;
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<item headline = "Sultan Kernel">
<file_ext>zip</file_ext>
<url>http://mikrosense.com/store/kernels/kernel.zip</url>
<details1></details1>
<date></date>
<md5>8e92b519b5211d5769e3abe0719cf686</md5>
</item>
</body>
<item headline = “Name”> - Kernel name
<file_ext></file_ext> - File extension you want to provide
<url></url> - The direct link to the file on your Server or any File storage
<details1></details1> - Details of your Kernel. Supports multi-line
<date></date> - Date of upload the Item
<md5></md5> - MD5 file sum
STEP 4. CONFIGURATION FILE FOR OTA
You can create your own or download example file – “update.xml”
Field in the file:
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<item headline = "1.3.6">
<text>Here will be your Changelog of the ROM</text>
<url></url>
<md5></md5>
</item>
</body>
<item headline = “X.X.X”> - the version of your New ROM, this version should be higher than the one in myHUB.txt file. Therefore, it will compare these two versions. All the time you update your rom, do not forget to update myHUB.txt as well.
<text></text> - Here you can enter your changelog;
<url></url> - The direct link to the file on your Server or File storage;
<md5></md5> - MD5 file sum
Thank you very much ! Great creator !:good:
My screenshot:
mikrosmile said:
Downloads and Changelog
Download myHUB
(For full function of the app, it requires Configuration file)
myHUB V1.0.1
Changelog:
myHUB 1.0.1
Fixed donation link
myHUB 1.0.0
Initial release
Click to expand...
Click to collapse
I found the error:
1. Open the news, can`t click on the jump to Web pages
2. Open Mods hint: no data
3. Kernel select download, prompt: file has been successfully removed
4. Open about ROM, "MyHUB" has stopped running
5. myHUB OTA Unable to open, open display:"MyHUB" has stopped running
kinghunki said:
I found the error:
1. Open the news, can`t click on the jump to Web pages
2. Open Mods hint: no data
3. Kernel select download, prompt: file has been successfully removed
4. Open about ROM, "MyHUB" has stopped running
5. myHUB OTA Unable to open, open display:"MyHUB" has stopped running
Click to expand...
Click to collapse
In configuration guide there are samples which I use now , make sure you follow everything as in the guide .
In few hours I will make checking of all config fields and it will prompt what you don't have
Sent from my Galaxy Nexus using Tapatalk 2
kinghunki said:
I found the error:
1. Open the news, can`t click on the jump to Web pages
2. Open Mods hint: no data
3. Kernel select download, prompt: file has been successfully removed
4. Open about ROM, "MyHUB" has stopped running
5. myHUB OTA Unable to open, open display:"MyHUB" has stopped running
Click to expand...
Click to collapse
send me your main.xml file for sections pls
mikrosmile said:
send me your main.xml file for sections pls
Click to expand...
Click to collapse
File has been sent to your Gmail!
Its very good to see this
But Sharing Policy... :|
We Cant Change anything :\
mygamers said:
Its very good to see this
But Sharing Policy... :|
We Cant Change anything :\
Click to expand...
Click to collapse
This features I give everyone without anything in return .. An as in respect I ask to not change anything that made by me
. that's all .. This could appear on a particular ROM for example , but now you have that is just great and powerful )
Sent from my Galaxy Nexus using Tapatalk 2
mikrosmile said:
This features I give everyone without anything in return .. An as in respect I ask to not change anything that made by me
. that's all .. This could appear on a particular ROM for example , but now you have that is just great and powerful )
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I understand you
But I think Its Better you think About this
I think most of devs wants to do this
Permission to change app name And App Icon
mygamers said:
I understand you
But I think Its Better you think About this
I think most of devs wants to do this
Permission to change app name And App Icon
Click to expand...
Click to collapse
But you don't change any other app u use in your ROM or phone .. So this is just another app as many
Sent from my Galaxy Nexus using Tapatalk 2
I agree with mikrosmile's sharing policy!
kinghunki said:
I agree with mikrosmile's sharing policy!
Click to expand...
Click to collapse
thx.
I found errors.. your server is broken.. most of links are not opened through web.. so check them, than it should work or use DropBox
kinghunki said:
I found the error:
1. Open the news, can`t click on the jump to Web pages
2. Open Mods hint: no data
3. Kernel select download, prompt: file has been successfully removed
4. Open about ROM, "MyHUB" has stopped running
5. myHUB OTA Unable to open, open display:"MyHUB" has stopped running
Click to expand...
Click to collapse
for news - add - / at the end of link. for example http://yoursite.com/
All the problems have been solved, thanks mikrosmile!
myHUB 1.0.2
Hopefully fixed error for Sense Lite ROMs
Handled all Errors if configuration file is not present
mikrosmile said:
myHUB 1.0.2
Hopefully fixed error for Sense Lite ROMs
Handled all Errors if configuration file is not present
Click to expand...
Click to collapse
THX!
myHUB 1.0.3
Fixed MD5 error for OTA updates
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The World's First ANDROID Touch And Customizable ROM Installer
Don't Forget To Donate To Me:
------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=------
_________________________________________
When you install Linux, Windows, Mac or applications on the PC
You can always customize your installation as you want.
WHY CAN'T WE DO THE SAME INSTALLING AN ANDROID ROM?
BECAUSE NOW
AROMA Installer
GIVES YOU THIS POSSIBILITY!
_________________________________________
------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=------
FROM INDONESIAN DEVELOPERS TO PEOPLE AROUND THE WORLD
W.A.R.N.I.N.G.!!!
THIS DEVDB DISCUSSION ONLY FOR DEVELOPMENT DISCUSSION.
USE Q&A TO ASK ABOUT SCRIPT, HOW TO, AND INSTALLATION
FOR ROM CHEFS/DEVELOPERS ONLY
ROM Chef/Developers? What is that? ... Here the video.
DON'T ASK ABOUT HOW TO INSTALL IT, BECAUSE IT MEANS YOU DON'T KNOW WHAT IT IS FOR
IT ISN'T AN APPLICATION YOU CAN USE OR INSTALL ON TO YOUR PHONE LIKE ANGRY BIRDS OR FACEBOOK
MOST IMPORTANT THING BEFORE CUSTOMIZING IT
Make sure You took an update-binary from a working ROM, renamed it to update-binary-installer and overwrote the one in my AROMA Installer zip
BACKGROUND
Android has an advanced system for installing the OS and updates, unlike other mobile OS's that distribute the contents of the OS in static ROM image(s), Android distributes the OS and updates in a plain .zip file that contains all of the packages, files, and the updater for processing the installation.
The updater splits in 2 types, the binary (update-binary) and script (updater-script), while the binary is an executable file, and the script was a configuration script that tells the binary executable what to do.
But this advanced technology never expanded into its highest potential ability. The update-binary was simply the linux executable wrote in C that runs in root mode, and can do anything to your system; including accessing the Display FrameBuffer, accessing keys and the touch screen, set vibrate, run programs, parse files, load png(s) and .zip's, and read and write to the filesystem.
The old update-binary only supported a few functions that can controlled only by the updater-script to instal the files. It didn't have a single function that allowed the installer to interact with the user. There is a program called "yesno" that shows a "Yes" or "No" interface, but it wasn't enough to create a more customizable updater.
Now with AROMA Installer update-binary, all of this limitation is gone, and this advanced technology is expanded to the highest level of its pontential.
What is AROMA Installer?
"AROMA" was taken from Bahasa Indonesia (Indonesian Language) and it means "Scent", but it is also an abbreviation of "AMARULLZ ANDROID ROM MANIFESTATION". It is an advanced update-binary for Android that contains many features like Wizard Installation, Touch User Interface (AROMA UI), Customizable Packages, System Inspecting, Themeable, and User Interactive. All release versions will have "flower" codenames, for example, the 1st version is codenamed "Anggrek", which mean "Orchid".
How AROMA Installer Works?
How can it work in recovery mode, and how can it so smooth when it scrolls? It works because I hired Chuck Norris to force the recovery to run the installer, and the phone is too afraid to show any lag .
No, seriously, when the user selects the .zip file to install it, the recovery will extract the update-binary and run it with a few arguments. All processes are handled by the update-binary, and the recovery will only show the information passed by update-binary via a custom pipe. The great thing is that the update-binary can do anything if we can code it in C/C++, but not all people can easily play with C/C++. Its also not very effective or fun to compile it every time we need to change the process. That's why the custom script is used in AROMA Installer, it is simply edify scripting that is used as the normal updater-script, but with expanded functions available.
It wasn't a simple thing to archive something like this, because the update-binary is simply the "linux executable" that doesn't even support dynamic links of libraries, basic drawing functions like drawrect, drawline, and I don't think it OpenGL can be included in it's binary. It runs on it's own. Even User Interface was wrote from scratch to manipulate directly into the display framebuffer, user input was read directly from the raw kernel input device, png and .zip was read with a static link library, and the configuration was parsed in it's own program. It is the result of one full month of developing, but you can learn it instantly, without any need to know how to manage memory usage and pointers.
The AROMA Installer will read, parse, and run the script commands to show it's UI, calculate partition sizes, create, read, and write temporary prop files, set & get variables, do simple integer comparisons and math sequences, do the if else or inline if conditions, configure the UI color scheme, configure rom information, and much more.
Benefits For Users
AROMA Installer gives users the possibility to choose which mods and applications they want to Install on to their device. Sometimes we want the clean install, without bloatware; and sometimes we want the full set of applications on our device. With AROMA Installer, you are your phone's master!
Benefits For Chefs/Developers
AROMA Installer gives chefs many benefits:
You don't ever again have to hear someone ask to remove or include something they like into your ROM, just for you to yell "Hey, that is only your opinion! Only you and some other people like it; most people don't! Go remove the apps on your own with WINRAR, you ^$#&*&#$", remember they are still a customer , and with AROMA Installer, this problem can be solved.
If you are good at customizing the AROMA Installer it was possible to make your ROM compatible with many devices using just one ROM File. You save your time, bandwith and hosting maintanance.
With the great user interface in your ROM installation, users will be very happy with it.
With AROMA Installer, You Are The Greatest ROM Developer
XDA:DevDB Information
AROMA Installer, App for all devices (see above for details)
Contributors
amarullz
Source Code: https://github.com/amarullz/AROMA-Installer
Version Information
Status: Beta
Current Stable Version: 3.00
Stable Release Date: 2015-02-28
Current Beta Version: 3.00b1
Beta Release Date: 2015-02-28
Created 2013-08-17
Last Updated 2015-02-27
Reserved
Reserved for Release and Development Information
Reserved
Reserved for Wiki and Manual Table of Contents
Nice.
Sent from my LG-LS970 using xda app-developers app
Yay, first feature and review sent
Keep up awesome work amarullz!
Reading and Learning
Hey Amarullz,
Where are you at with the dynamic/JSON stuff or have you already implemented it?
Also, are you aware of Aroma randomly hanging at 0% when launching aroma-binary-installer? This happens on the HTC One.
Thanks,
Turge
Hiduplah Indonesia Raya...
Sent from my HTC Butterfly using xda premium
If you need a S4 tester im available right now and can join IRC.
Was I the first one using the bug report feature?
Turge said:
Hey Amarullz,
Where are you at with the dynamic/JSON stuff or have you already implemented it?
Also, are you aware of Aroma randomly hanging at 0% when launching aroma-binary-installer? This happens on the HTC One.
Thanks,
Turge
Click to expand...
Click to collapse
JSON Implementation will be available on new core (because current version doesn't included JSON library).
But for dynamic content, you can use "eval" function to run aroma script from text.
You can create dynamic script using shell, then use eval to run it.
Eval Example:
Code:
eval("alert(\"On Eval Function\",\"This Alert was executed from Eval Function...\", \"@info\");");
Eval Example with shell
alertcode.sh
Code:
#!/bin/sh
echo "alert(\"On Eval Function\",\"This Alert was executed from Eval Function...\", \"@info\");"
aroma-config
Code:
resexec("script/alertcode.sh");
eval(getvar("exec_buffer"));
Eval Example with shell file
alertcode.sh
Code:
#!/bin/sh
echo "alert(\"On Eval Function\",\"This Alert was executed from Eval Function...\", \"@info\");" >> /tmp/test.edify
aroma-config
Code:
eval(read("/tmp/test-edify"));
I didn't test the code, but I hope you understand what I mean.
--- removed ---
This is new AROMA Markup String Engine
This is the script for it:
Code:
<8>AROMA Markup String
<4>This is example of using <b>NEW AROMA Markup String <u>(AMS)</u> from <5>New AROMA CORE</b>. Now
<5>you can <f1>Change The Font Face and <7>Font Size. <4>And even including <f2>Some Image <6>With
simple AMS TAG:
<[file:///sdcard/0/apps.png;72dp;72dp]> was resized, and <f1>This image:
<f1>Font <[file:///sdcard/0/install.png]> without resized.
<6>
<f0>This is font ID=0 - Roboto-Regular.ttf
<f1>This is font ID=1 - RobotoCondensed-Bold.ttf
<f2>This is font ID=2 - DroidSerif-Italic.ttf
*** ugh.. xda convert high quality png into jpeg :silly: Not cool...
amarullz said:
This is new AROMA Markup String Engine
This is the script for it:
Code:
<8>AROMA Markup String
<4>This is example of using <b>NEW AROMA Markup String <u>(AMS)</u> from <5>New AROMA CORE</b>. Now
<5>you can <f1>Change The Font Face and <7>Font Size. <4>And even including <f2>Some Image <6>With
simple AMS TAG:
<[file:///sdcard/0/apps.png;72dp;72dp]> was resized, and <f1>This image:
<f1>Font <[file:///sdcard/0/install.png]> without resized.
<6>
<f0>This is font ID=0 - Roboto-Regular.ttf
<f1>This is font ID=1 - RobotoCondensed-Bold.ttf
<f2>This is font ID=2 - DroidSerif-Italic.ttf
*** ugh.. xda convert high quality png into jpeg :silly: Not cool...
Click to expand...
Click to collapse
Quick question, will there be a requirement for a closing tag like so:
<f1>text</f>
Click to expand...
Click to collapse
Sent from my SGH-I757M using XDA Premium 4 mobile app
sweet! thanks
titanic_fanatic said:
Quick question, will there be a requirement for a closing tag like so:
Sent from my SGH-I757M using XDA Premium 4 mobile app
Click to expand...
Click to collapse
AROMA Markup String doesn't strict like HTML. In fact it doesn't even save the previous state of formatting (It was linear formatting).
Code like this is valid, and will result very different in html:
Code:
Normal Text <b>Bold Text and <b>Next Bold Text</b> This will not bold.
and the color example (default color is black)
Code:
Black Color <#900>Red Color <#009>Blue Color</#> This is black - not red</#> This second closing was unusable
The closing tag in AMS isn't the pair of opening tag.
Same with font
Code:
Default font <f1>Font ID=1 <f2>Font ID=2 </f> Font ID=0/Default
For fontsize, you don't have any closing tag.
<0> default size
<1> .. <9> font size 1..9.
-------
NOTE: The sintax of image, fontsize and font tag is subject to change. Any suggested syntax is welcome... You can vote syntax below, or suggest your own syntax (easier to use and easier/efficient to parsed will be used).
And If You willing it, please share this vote with your friend...
My Font sintax suggestions:
Code:
1. <f0><f1><f2><f3> - </f> ---> Current
2. <font=0><font=1><font=2><font=3> - </font>
3. <f=1><f=0><f=0> - </f>
My Fontsize sintax suggestions:
Code:
1. <0><1><2>..<9> ---> Current
2. <fontsize=1><fontsize=1><fontsize=2>...<fontsize=9> - </fontsize>
3. <size=1><size=1><size=2>...<size=9> - </size>
4. <sz=1><sz=1><sz=2>...<sz=9> - </sz>
5. <$1><$1><$2>...<$9> - </$>
My Image sintax suggestions (width/height can be in dp or px - if dp/px not defined px will be used):
Code:
1. <[URL;width;height]> <[IMAGE_URL;width]> <[IMAGE_URL;0;height]> ---> Current
2. <img="URL" 40dp,50dp> <img="URL" 40px> <img="URL" 0,50>
3. <img=URL;40dp;50dp> <img=URL;40px> <img=URL;0;50px>
4. <img="URL" w=40dp h=50dp> <img="URL" w=40px> <img="URL" h=50px>
I know that tag with attribute was easier to read by human, but more compact sintax was easier for parser :laugh: .
So please vote for it...
amarullz said:
My Font sintax suggestions:
Code:
1. <f0><f1><f2><f3> - </f> ---> Current
2. <font=0><font=1><font=2><font=3> - </font>
3. <f=1><f=0><f=0> - </f>
Click to expand...
Click to collapse
Vote: 1
amarullz said:
My Fontsize sintax suggestions:
Code:
1. <0><1><2>..<9> ---> Current
2. <fontsize=1><fontsize=1><fontsize=2>...<fontsize=9> - </fontsize>
3. <size=1><size=1><size=2>...<size=9> - </size>
4. <sz=1><sz=1><sz=2>...<sz=9> - </sz>
5. <$1><$1><$2>...<$9> - </$>
Click to expand...
Click to collapse
Vote: 1
amarullz said:
My Image sintax suggestions (width/height can be in dp or px - if dp/px not defined px will be used):
Code:
1. <[URL;width;height]> <[IMAGE_URL;width]> <[IMAGE_URL;0;height]> ---> Current
2. <img="URL" 40dp,50dp> <img="URL" 40px> <img="URL" 0,50>
3. <img=URL;40dp;50dp> <img=URL;40px> <img=URL;0;50px>
4. <img="URL" w=40dp h=50dp> <img="URL" w=40px> <img="URL" h=50px>
Click to expand...
Click to collapse
Vote: 3
Sent from my SGH-I757M using XDA Premium 4 mobile app
amarullz said:
This is new AROMA Markup String Engine
This is the script for it:
Code:
<8>AROMA Markup String
<4>This is example of using <b>NEW AROMA Markup String <u>(AMS)</u> from <5>New AROMA CORE</b>. Now
<5>you can <f1>Change The Font Face and <7>Font Size. <4>And even including <f2>Some Image <6>With
simple AMS TAG:
<[file:///sdcard/0/apps.png;72dp;72dp]> was resized, and <f1>This image:
<f1>Font <[file:///sdcard/0/install.png]> without resized.
<6>
<f0>This is font ID=0 - Roboto-Regular.ttf
<f1>This is font ID=1 - RobotoCondensed-Bold.ttf
<f2>This is font ID=2 - DroidSerif-Italic.ttf
*** ugh.. xda convert high quality png into jpeg :silly: Not cool...
Click to expand...
Click to collapse
marvellous!!! :good::good:
@titanic_fanatic, you can say me thanks cause, I gave you a thanks by error.
titanic_fanatic said:
Vote: 1
Vote: 1
Vote: 3
Sent from my SGH-I757M using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I'm agree with that!
Have an idea to embed LUA - http://en.wikipedia.org/wiki/Lua_(programming_language) for more advance AROMA customizing.
And No, Main config Is still edify.
An idea is like this:
aroma-config:
* Show list of menu, select & checkbox
* Show Text box, alert, etc.
* Do simple calculations, run shell script, etc.
* I want to do some programming and custom interface --> lua("luascript.lua");
The lua script will be called from aroma-config. this lua script will containing all useful features like looping, variables, array, functions, etc.
Did I can do it with shell script??, Yes, but you can't communicate & access AROMA features directly (only with stdout).
The lua script (will be usable if it) contains all features that aroma-config already have. Plus custom UI (but you need programming skills),
You can create window, add controls into it, then show it, and manage control message (like, what will it do when some button clicked, or some checkbox checked).
This lua script also usable for you who want to make simple application (not just installer), you can make your own GUI.
Tell me if you like an Idea??
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
SELENIUM by Ravi H Basawa
This will be a Full Tutorial on Selenium Automation Tool
I will be updating this thread as I get time. SO NO ETA's.
Click to expand...
Click to collapse
If anybody wants to use / copy this tutorial to their Website or Blog please feel free to contact me at my personal email id: [email protected]
or at our official Website: www.rhbroms.com
Click to expand...
Click to collapse
Please Click on Thanks button if this tutorial by me had helped you for some extent !!!
Click to expand...
Click to collapse
Contents:
1. What is Selenium?
2. What all we need before we get it started?
3. How to setup Selenium for Eclipse?
4. Simple Selenium Test Script for google.co.in
5. Execution using Junit
5a. Execution using TestNG
6. DataDriven Testing using POI jar files
7. Issues or challenges with Selenium
Credits:
@Swaroop Bandagadde
My Other Works:
1. ROBOTIUM AUTOMATION TOOL
2. MONKEYRUNNER AUTOMATION TOOL
Selenium
1. What is Selenium?
Selenium is an open source ( It's free !!!!) automation testing tool used for automating websites under any browser(not all).
Selenium supports the following browsers: IE, FireFox(Default), Chrome, Safari, Opera.
We write Selenium WebDriver Scripts in Eclipse. These scripts are written in Java language.
Things that you should be good at Java are: Constructors, Overriding, Overloading, Constructor Chaining, Interface, Inheritance, Abstract Class and UpCasting - DownCasting concepts are enough to write Selenium WebDriver Script.
What all we need before we get it started?
2. What all we need before we get it started?
1. Windows 7 / 8
2. Java
3. Eclipse ((Juno or ADT) what I have worked on !! )
4. selenium-server-standalone-2.38.0
5. TestNG plugin for Eclipse
6. POI jar files
Downloads:
POI jar files: POI.zip
Selenium Jar file
How to setup Selenium for Eclipse?
3. How to setup Selenium for Eclipse?
1. Open Eclipse goto Help -> Install new software.. -> give work with edittext field value as " TestNG - http://beust.com/eclipse " -> select all -> Next -> Finish
2. when you create a new test project inside its build path add selenium webdriver jar files. I will show it in next chapter.
4. Simple Selenium Test Script for Google website
4. Simple Selenium Test Script for Google website
1. Create new java project with name Selenium Test as shown below:
2. Now we have to add the selenium Jar file to the build path ( Goto project -> Properties -> Java Build path ) as shown in below screen shot and add the downloaded selenium-server-standalone-2.38.0.jar file. by clicking on the add external Jar's button. After this goto "Order and Export" tab click on "Select All" button and click "ok" button.
3.After completion of the above step now create a new java class ( Goto Project -> New -> Class) as shown in below ss and give name as TestWebDriver
4. After this now we will write a code to open Mozilla FireFox Browser and also open Google website inside it. The code for this is as below:
package com.rhb.selenium; // package name what I have given. It can differ with yours
import org.openqa.selenium.WebDriver; // Automatically imported by eclipse [This is for invoking the WebDriver class from selenium API]
import org.openqa.selenium.firefox.FirefoxDriver; // Automatically imported by eclipse [This is for invoking the FireFoxDriver class from selenium API]
public class TestWebDriver {
static WebDriver driver = null; // initialization
//the below method is made static to call this method inside our package without creating any instance for it.
public static void setup(){
driver = new FirefoxDriver(); // inbuilt method called from selenium class
driver.get("http://www.google.co.in"); // opens the website which is written inside the braces.
}
}
Click to expand...
Click to collapse
5. Now Lets create another java class called FunLib and inside this what we do is we will try to enter some text into the edit text box of the Google website and also we will click on the search button. the code for this is as below:
import org.openqa.selenium.By;
public class FunLib extends TestWebDriver {
public static void Search() throws InterruptedException {
driver.findElement(By.xpath("//div[@id='hplogo']")).click(); // clicks on the Google Logo
Thread.sleep(3000); // sleeps for 3000 milliseconds
driver.findElement(By.xpath("//input[@name='q']")).sendKeys("RHBROMS"); // type as RHBROMS in the edit text field
driver.findElement(By.xpath("//button[@id='gbqfb']")).click(); // Click on the Search button
Thread.sleep(3000); // again sleeps for 3000 milliseconds
driver.findElement(By.xpath("//li[1]/div/div/h3/a")).click(); // Click on the first link that is rhbroms.com
System.out.println("button got clicked"); // displays the msg on console.
}
}
Click to expand...
Click to collapse
6. Okay now you might be thinking as how to identify the edit text field as well as other elements.!! Its easy for that we need some Extensions for FireFox they are as below:
7. After installing these Extensions we now see how to use them to Identify the objects. Thing is we don't use all these but some, It again depends on which tool u want to use!!. which one is best for you.
8. First I will show you how to Identify the Google Logo by using Xpath. To do this open FireFox and open Google website and right click on Google Logo and select View XPath. After this you will see something like as shown below:
9. As you can see from the image as XPath is given as : id('hplogo') but thing is how to use this in our code.. Simple just add the tag type in this case it is <div> (The <div> tag defines a division or a section in an HTML document.) the changes what u have to do is as shown in below Screen Shot.
10. Now the same goes for other objects too..!! If you find any doubts on this feel free to ask me by either commenting here or by emailing me.
11. Now we will see how to execute our first Automation Script in the next chapter.
5. Execution using Junit and TestNG
5. Execution using Junit
1. First we will see how to execute our script via JUnit Suit.
2. Let us create a new JUnit test case (project -> New -> Junit test case) as shown in below screen shot:
3. Now let us give the Junit test case name as "Junit" as shown below in the screen shot. NOTE: Uncheck setup and teardown options.
4. Okay as we are done with creating new Junit test case just do the below editing:
package com.rhb.selenium; // package name
import junit.framework.TestCase; // auto import
import org.testng.annotations.Test; // auto import to give annotations that are necessary
public class Junit extends TestCase {
@Test
public void test1() throws Exception{
Main m = new Main(); // creating instance for Main class as "m"
m.setup(); // as setup is a method which is declared under Main class we can access it using access specifier "m"
m.Search(); // as Search is a method which is declared under Main class we can access it using access specifier "m"
}
}
Click to expand...
Click to collapse
5. To run the above JUnit Test right click on Junit.java file -> RunAs -> Junit Test
6. When you run the Junit test FireFox runs automatically in WebDriver mode as shown below and all the operations that we have specified in the Main class will be performed. Screen Shot of this is as shown below:
7. The below snap shows the test case is pass and the color is changed to Green. And also we got a msg at console as "button got clicked" what we have written in FunLib.java !!
8. The Result at FireFox WebDriver should be as shown below:
9. Okay now we will see how to execute using TestNG ( Easy one )
5a. Execution using TestNG
5a. Execution using TestNG
1. Don't worry it is very easy compared to JUnit.
2. I hope you have installed the plugin of TestNG to your Eclipse.
3. Lets Create a new java class with name TestNGSuite1. Copy paste the below code after creation:
package com.rhb.selenium;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.testng.annotations.Test;
public class TestNGSuite1 {
@Test
public void testngtest() throws FileNotFoundException, InvalidFormatException, IOException, Exception {
Main m = new Main(); // instance of Main class
m.setup(); // call for setup method
m.Search(); // call for Search method
}
}
Click to expand...
Click to collapse
3. Right click on TestNGSuite1.java file -> TestNG -> Convert to TestNG as shown in below screen shot:
4. Now you will see as below Screen Shot, here TestNG is converting our java file to executable xml format.
5. Now click on Finish button and you will see a Testing.xml file as shown below:
6. Now Just right click on the xml file -> RunAs -> TestNG Suite as shown below:
7. Finally you will see the final result as below:
6. DataDriven Testing using POI jar files and TestNG XSLT + ANT
6. DataDriven Testing using POI jar files
1.We go for data driven testing when we have some modules that need to be tested for multiple values. For example in a application which has a login page with username and password field we have to test these edit text boxes for multiple inputs, It can be a number or it also can be a string or both together.
2. Here I will take Google.com as example and show you how to extract data from a excel file and push the same to Google website.
3. First we will create an excel file with some data present in it to test our application. (An Excel file for testing our app is attached here)
4. To extract data from Excel we use “FileInputStream” Class by which we can create/delete and modify a file.
5. Now add POI.jar files to Java Build Path same as how we added Selenium Jar file.
6. After adding of POI jar files to Java Build Path you will see them added as shown below:
7. After this is done we will create a new java class and will give the name as "DataDriveTest" and extend it from "TestWebDriver" Class.
8. Now what we will do is we will open google.com enter "search" value as "RHBROMS" ( 1st value from the excel sheet ) click on the first link and then we will click on back button of the browser and then we will clear the search box and enter "xda developers" ( 2nd value from the excel sheet ) and click on first link that will be xda developers website.
9. The code for this is as written below with explanation.
package com.rhb.selenium;
// below package imports are for File I/O operations
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
// below packages are for excel sheet operations
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.openqa.selenium.By;
public class DataDriveTest extends TestWebDriver {
public static void test() throws Exception, IOException,
FileNotFoundException,InvalidFormatException {
String cellval1 = null; // set the current value of cellval1 as NULL
String cellval2 = null; // set the current value of cellval2 as NULL
FileInputStream fis= new FileInputStream("E:\\Test.xls");
Workbook wb = WorkbookFactory.create(fis); // creates object for workbook Test.xls
Sheet ws = wb.getSheet("Sheet1"); // opens Sheet1 from workbook Test.xls
int rc = ws.getLastRowNum(); // counts the number of rows which are used
for(int i=1; i<=rc; i++)
{
Row r = ws.getRow(i); // ponts to the i'th ROW
for (int j=0;j==0;j++){
{
Cell c = r.getCell(j); // points to the j'th Column
cellval1=c.getStringCellValue(); // gets the data from J'th cell
Cell c1 = r.getCell(j+1); // ponts to the J+1'th column
cellval2=c1.getStringCellValue(); // gets the data from J+1'th cell
driver.findElement(By.xpath("//div[@id='hplogo']")).click(); // Clicks on the google logo
driver.findElement(By.xpath("//input[@name='q']")).sendKeys(cellval1); // take the first value from first column and paste it at the search box
driver.findElement(By.xpath("//button[@id='gbqfb']")).click(); // clicks on the search button
Thread.sleep(3000); // sleeps for 3000milisecs
driver.findElement(By.xpath("//li[1]/div/div/h3/a")).click(); // clicks on first link
driver.navigate().back(); // clicks on the back button of the browser
driver.findElement(By.xpath("//input[@name='q']")).clear(); // clears the search box
driver.findElement(By.xpath("//input[@name='q']")).sendKeys(cellval2); // enters the second value from the excel sheet
driver.findElement(By.xpath("//button[@id='gbqfb']")).click(); // clicks on the search button again
Thread.sleep(3000);
driver.findElement(By.xpath("//li[1]/div/div/h3/a")).click(); // clicks on the first link
}
}
}
}
}
Click to expand...
Click to collapse
10. Now to execute this we have to do some editing at Main.java file as:
Code:
public class Main extends DataDriveTest {
public static void main(String args[]) throws FileNotFoundException, InvalidFormatException, IOException, Exception{
setup();
test();
}
11. And also in TestNGSuit1.java file as:
Code:
@Test
public void testngtest() throws FileNotFoundException, InvalidFormatException, IOException, Exception {
Main m = new Main();
m.setup();
m.test();
}
12. Now as usual convert the TestNGSuit1 file to TestNG and execute. :victory:
13. To see your TestNG results go to your eclipse workspace and open selenium project inside that you will find test-output folder. As shown in below Screen Shot:
14. For Generation of Graphical and more clean Results we use TestNG xslt with ANT. lets see how to do it in Next Chapter :laugh::laugh:
6. TestNG xslt with ANT
1. Download Ant from here: http://ant.apache.org/
2. Unzip it and rename the folder as ant.
3. Set ANT_HOME to environmental variables.( In windows 7 Right click on Computer -> properties -> “Advance system setting”
-> Choose Advanced Tab
-> Press Environment Variables Button
-> In the System Variables, click New Button
Give the Variable Name:ANT_HOME
Give the Value: E:\ant
Click OK )
as shown in Below Screen Shot.
4. Set ANT_HOME path,
go to path
Give the Value C:\ANT\bin
Click OK
5. To check ANT works properly or not
In the command prompt, type:
Code:
ant -version
you will see as below Screen Shot:
6. Now download testng-xslt from HERE
7. After this extract the downloaded zip file and go to testNG-xslt -> src -> main -> resources and copy the file testng-results.xsl and also copy this file from testNG-xslt -> lib that is saxon-8.7.jar and keep them at any folder for time being.
8. Now go to your project workspace and goto SeleniumTest -> test-output and paste testing-results.xsl that you copied.
9. and now goto eclipse and add saxon-8.7.jar to buildpath.
NOTE: the thing is you have to keep all your jar files in a same folder as I have kept at jar folder as shown below in my setup:
10. Now after doing all this create new xml file and call it as Build.xml
11. After creating this just copy paste the below code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<project name="SeleniumTest" default="compile" basedir=".">
<path id="cp">
<pathelement path="bin" />
<fileset dir="jars"/>
</path>
<!-- for compiling -->
<target name="compile">
<javac classpathref="cp" srcdir="src" destdir="bin"/>
</target>
<!-- for running -->
<target name="run" depends="compile">
<java classpathref="cp" classname="org.testng.TestNG" args="testng.xml"/>
</target>
<!-- for report generation -->
<target name="report" depends="run">
<xslt in="./test-output/testng-results.xml" style="./test-output/testng-results.xsl" out="./test-output/testng-xslt.html">
<param expression="${basedir}/test-output/" name="testNgXslt.outputDir" />
<classpath refid="cp"/>
</xslt>
</target>
</project>
12. After this save the file.
13. Now right click on the project and do as below and select TestNG:
14. Now Run the Build.xml file. and your results will be stored at Index.html at test-output folder.
To be continued .. NEXT will be Maven with TestNG!!
Excellent..
This tutorial helps in starting up with Selenium with all the configuration.
Thanks
Swaroop Bandagadde said:
This tutorial helps in starting up with Selenium with all the configuration.
Click to expand...
Click to collapse
Thank you @Swaroop Bandagadde for helping me to write this Tutorial !!..:victory: