ANDROID LOCALIZER
{
"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"
}
NOTES:
Translating Android App Is Hard And Long Process
I Will Present You This App Which Can Help You To Do Basic Translation Progress Faster And More Accurate.
Purpose Of This App Is Basic Translation Job - For Disassembling And Assembling Android APK Files You Must Use Other Tools Like APK Tool
This App Is Originally Maded By Crew From ArtfulBits Team And All Credits Are Going To Them.
I'm Not responsible For Any Eventual Errors And Misbehaving Of Your Devices.
Big Thanks To ArtfulBits - Creator Of Android Localizer
【Software Information】
Software Name:Android Localizer
Version Information:1.5
Version Size:0.2 MB
Applicable Models / Systems:MS Windows PC - Windows Os Xp/Vista/7/8
Playstore Link:No Playstore/PC Software/Developer Website:http://www.artfulbits.com/products/free/ailocalizer.aspx
【Software】
Features
Automatic Translate (Google Translate)
Google Translate works now over JSON
Grid font become changeable
Stability improved
Remember last opened application for localization
Create new localization folder by copying "original" values
Edit values
Edit arrays
Save result in XML with original localization in comments
Create backup file of localization
Browsing in localization XML as in folders structure
Add localization key or array item
Delete XML files directly from GUI
FAQ:
Q: How auto translation works?
A: Select elements in grid which you want to translate and press "Auto translate" button on toolbar. If language on which you are working known to Google Translate service then application will start in background element by element translate selections. In any moment you can cancel that operation.
Q: After translation instead of unicode symbols I saw white boxes, what to do?
A: That often happens due to usage of fonts that does not support properly you localization symbols. To solve this open "Options" of application and change font to proper one. Application will remember your choice for future.
Q: Application fails all the time, what to do?
A: Application on fall shows message box to you and save the same information into LOG file. LOG file can be found in application folder. Please send us that LOG file and we will try to fix problem ASAP.
Q: How to create skipped elements?
A: At the current moment application does not support <skip/> tag. You should wait next release or modify sources of the project;
Q: Application searching for "notepad++.exe", but I don't have it. How to fix that?
A: You have two choices. change external editor settings or install Notepad++, First: Application has "aiLocalization.exe.config" file; In it you have to find section "ExternalEditor" and place there editor on your choice. Second: go by link Notepad++ and download it.
Q: I saw that application has customized Copyright in output XML. How to change it?
A: You have to edit application configuration file "aiLocalization.exe.config" and find in it section "Copyright".
Q: I set application folder correctly but tool does not recognize my Android project, what to do?
A: Application is searching for "AndroidManifest.xml" file in project. If application can not find it then it think that project does not belong to Android sources at all. So please check file existence.
【Update log】
1.5:
Automatic Translate (Google Translate)
Google Translate works now over JSON
Grid font become changeable
Stability improved
【Software screenshot】
【Software Download】
View attachment 2327641
Getting the following error while trying auto translate
---------------------------
Error
---------------------------
Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray
\
coolgal302006 said:
Getting the following error while trying auto translate
---------------------------
Error
---------------------------
Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray
\
Click to expand...
Click to collapse
Try To Redownload Software Aggain - Attachment Changed.
BalcanGSM said:
Try To Redownload Software Aggain - Attachment Changed.
Click to expand...
Click to collapse
same error throw Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray when i click auto translate
billy_cater said:
same error throw Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray when i click auto translate
Click to expand...
Click to collapse
Make Sure You Have Installed Latest Java JRE & JDK Packages Although With .Net Frameworks 3.5 & 4.5
The app is unable to show "values" folder. Only "values-xxx" is shown. An fix for this?
Also, will this going to be open source? I'm interested in this.
billy_cater said:
same error throw Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray when i click auto translate
Click to expand...
Click to collapse
Same error as this guy. Have the latest software as you stated.
BalcanGSM said:
Make Sure You Have Installed Latest Java JRE & JDK Packages Although With .Net Frameworks 3.5 & 4.5
Click to expand...
Click to collapse
JRE 1.7.0.25-b17, JDK 1.7 , .NET FRAMEWORKS 4.5 win8 64bit sir
Thanks,this is the what I needed
frenzyboi said:
The app is unable to show "values" folder. Only "values-xxx" is shown. An fix for this?
Also, will this going to be open source? I'm interested in this.
Same error as this guy. Have the latest software as you stated.
Click to expand...
Click to collapse
Unfortunately I got the same error, even that I've followed OP instructions.
Hi:
I get the following error while trying to save the translated file:
Can not save file due to error: An XML comment cannot contain '--', and '-' cannot be the last character. Do you want to save file into another location?
And two buttons with yes and no. On clicking yes, I try to save it to another location, but keep getting the same error.
Thanks for your help!
billy_cater said:
same error throw Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray when i click auto translate
Click to expand...
Click to collapse
Change link
http://translate.google.com/translate_a/t?client=t&sl=en&tl={1}&text={0}
with
http://translate.google.com/translate_a/t?client=j&sl=en&tl={1}&text={0}
---------- Post added at 06:32 PM ---------- Previous post was at 06:22 PM ----------
Can't save file because reader is not closed.
In MainForm.LoadDocuments() add
reader.Close();
at line 700
---------- Post added at 07:25 PM ---------- Previous post was at 06:32 PM ----------
Translation did not work on multiple sentences and didn't remove heading and trailing quotes. I've modified the code.
Code:
public static string TranslateText( string textToTranslate, string abbr )
{
string strLangPair = string.Format( "en|{0} ", abbr );
// generate google translate request
// http://translate.google.com/translate_a/t?client=j&sl=en&tl=ru&text=some%20text
string url = String.Format( "http://translate.google.com/translate_a/t?client=j&sl=en&tl={1}&text={0}",
textToTranslate, abbr );
WebClient webClient = new WebClient();
byte[] resultBin = webClient.DownloadData( url );
string charset = webClient.ResponseHeaders[ "Content-Type" ];
charset = charset.Substring( charset.LastIndexOf( '=' ) + 1 );
Encoding transmute = Encoding.GetEncoding( charset );
string result = transmute.GetString( resultBin );
// find result box and get a text
JObject item = JObject.Parse( result );
JToken token = item[ "sentences" ];
String translation = string.Empty;
foreach (JToken childToken in token)
{
string phrase = childToken["trans"].ToString();
translation += phrase.TrimStart('"').TrimEnd('"');
}
return translation;
}
Tostis said:
Change link
http://translate.google.com/translate_a/t?client=t&sl=en&tl={1}&text={0}
with
http://translate.google.com/translate_a/t?client=j&sl=en&tl={1}&text={0}
---------- Post added at 06:32 PM ---------- Previous post was at 06:22 PM ----------
Can't save file because reader is not closed.
In MainForm.LoadDocuments() add
reader.Close();
at line 700
---------- Post added at 07:25 PM ---------- Previous post was at 06:32 PM ----------
Translation did not work on multiple sentences and didn't remove heading and trailing quotes. I've modified the code.
Code:
public static string TranslateText( string textToTranslate, string abbr )
{
string strLangPair = string.Format( "en|{0} ", abbr );
// generate google translate request
// http://translate.google.com/translate_a/t?client=j&sl=en&tl=ru&text=some%20text
string url = String.Format( "http://translate.google.com/translate_a/t?client=j&sl=en&tl={1}&text={0}",
textToTranslate, abbr );
WebClient webClient = new WebClient();
byte[] resultBin = webClient.DownloadData( url );
string charset = webClient.ResponseHeaders[ "Content-Type" ];
charset = charset.Substring( charset.LastIndexOf( '=' ) + 1 );
Encoding transmute = Encoding.GetEncoding( charset );
string result = transmute.GetString( resultBin );
// find result box and get a text
JObject item = JObject.Parse( result );
JToken token = item[ "sentences" ];
String translation = string.Empty;
foreach (JToken childToken in token)
{
string phrase = childToken["trans"].ToString();
translation += phrase.TrimStart('"').TrimEnd('"');
}
return translation;
}
Click to expand...
Click to collapse
sir,where can i find that line and change as you ask i do not know how to edit exe file
billy_cater said:
sir,where can i find that line and change as you ask i do not know how to edit exe file
Click to expand...
Click to collapse
You should download sources from official site.
You need Visual Studio to edit sources and recompile the application. You can't edit exe file!
billy_cater said:
same error throw Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray when i click auto translate
Click to expand...
Click to collapse
Gotten the same error, Can someone make the change and upload it again please?
Which folder have to choose from browse tab? I', confused. Its saying invalid path
I have complied and improved it a little bit
mrjoy said:
Which folder have to choose from browse tab? I', confused. Its saying invalid path
Click to expand...
Click to collapse
hi, I have introduced the modifications and another useful thing, the text path for locating the decompiled apk folder. So this way one can copy and paste the path, which normally is tedious to find by browsing.
I have tried and it translates very well, congrats to the developers!!
Hope it can be helpful
ertioct said:
hi, I have introduced the modifications and another useful thing, the text path for locating the decompiled apk folder. So this way one can copy and paste the path, which normally is tedious to find by browsing.
I have tried and it translates very well, congrats to the developers!!
Hope it can be helpful
Click to expand...
Click to collapse
It would have been nice if you also provided the modified source files for download.
Besides that, it is pretty sad that xml tags are not really preserved. For example: the tag formatted="false" is not kept.
This can be really annoying.
What kind of license does it have? Maybe i can upload modified sources on google code like site?
How to auto - translate Portuguese ? Appears only symbols
crash on some apk files
example : line
thanks bro
Related
Hi
i work on my first app, the info-part is finished. now i want add a simple question/answer-part. the first part with button for answers and questions works fine, but with the checkboxes i have some problems.
i want two or three solutions for one question, wich can be choose if i am click on one of these checkboxes. the answer is showing up in MessageBox and work so far, but the checkbox don't be cleared!?
What i have to do, to clear the checkbox. please help me! i don't know so much about the source-code c#, so every explanation will help me! Thanks!
xaml.cs
Code:
private void checkBox6_Checked(object sender, RoutedEventArgs e)
{
MessageBox.Show("Richtig!");
checkBox6.?? = checkBox6.??;
}
private void checkBox7_Checked(object sender, RoutedEventArgs e)
{
MessageBox.Show("Richtig!");
checkBox7.?? = checkBox7.??;
}
xaml
Code:
<TextBlock Height="73" HorizontalAlignment="Left" Margin="13,489,0,0" Name="DerTextblock13" VerticalAlignment="Top" TextWrapping="Wrap" Width="436" FontSize="22">Question?</TextBlock>
<CheckBox Content="YES" Height="72" HorizontalAlignment="Left" Margin="5,518,0,0" Name="checkBox6" VerticalAlignment="Top" Checked="checkBox6_Checked" />
<CheckBox Content="NO" Height="72" HorizontalAlignment="Right" Margin="0,518,18,0" Name="checkBox7" VerticalAlignment="Top" Checked="checkBox7_Checked" />
Just need to change the IsChecked property.
checkbox6.IsChecked = false;
hi
thanks for your comment.. i have read and search about "checkbox6.IsChecked = false;" and test it, but it doesn't work. i got this error in attached image.. checkbox6 is in content not available, but there is in content the checkbox6 (Name="checkbox6" and Checked="checkBox6_Checked")..
so i still don't know, why i get this error.. sorry for my stupid question..
Control names are case sensitive. It should be checkBox6.IsChecked = false;
oh man, what a stupid error.. thanks, case sensitive was the right keyword!
how can i change background-image for other xaml-site
hi
i don`t want open a new thread, so i ask here.
new problem! how can i change the background-image for an other xaml-site?
i searched a lot and find a lot, but nothing show me exactly how i can realize this.
in the source-code below, you see that i can change the background-image for example on mainpage.xaml.
Now i want integrate in my setting.xaml and settings.xaml.cs the same checkboxes to change the background-image on the mainpage.xaml.
What i have to do? Thanks for help!
xaml.cs
Code:
private void checkBox2_Checked(object sender, RoutedEventArgs e)
{
Uri uriR = new Uri("image/angler.png", UriKind.Relative);
BitmapImage imgSource = new BitmapImage(uriR);
this.imagechange.Source = imgSource;
checkBox1.IsChecked = false;
}
private void checkBox1_Checked(object sender, RoutedEventArgs e)
{
Uri uriR = new Uri("image/new-background.png", UriKind.Relative);
BitmapImage imgSource = new BitmapImage(uriR);
this.imagechange.Source = imgSource;
checkBox2.IsChecked = false;
}
xaml
Code:
<CheckBox Content="Hintergrund" Height="72" Margin="54,-33,0,0" Name="checkBox2" Checked="checkBox2_Checked" Width="163" FontSize="18" />
<CheckBox Content="Hintergrund 2" Height="72" Margin="0,-33,49,0" Name="checkBox1" Checked="checkBox1_Checked" Width="187" FontSize="18" />
Well done very good
Not sure if it's the best way, but one option would be to store the value you want to use in IsolatedStorageSettings. Then, when the page loads, it checks the value in ISS and applies that background (in its OnNavigatedTo event handler is probably best).
GoodDayToDie said:
Not sure if it's the best way, but one option would be to store the value you want to use in IsolatedStorageSettings. Then, when the page loads, it checks the value in ISS and applies that background (in its OnNavigatedTo event handler is probably best).
Click to expand...
Click to collapse
thanks, i have found a code to read an image in IsolatedStorage.. see below..
but i got a error.. i found a example-project, all works fine and i can read a image-file from IsolatedStorage. but in my app it doesn't work and i got these error..
also i had added the namespaces in xaml.cs
using System.IO.IsolatedStorage;
using System.IO;
xaml.cs
xaml-code
Code:
<Image x:Name="imagechange" Margin="30,62,38,204" Stretch="Fill" />
<Button Content="lesen" Height="72" HorizontalAlignment="Left" Margin="269,533,0,0" x:Name="lesen" VerticalAlignment="Top" Width="160" FontSize="19" Click="lesen_Click" />
vs 2010 are showing no faults in debugmodus! But if i click on button "lesen", i got the attached error. Please, where is the fault or what i have to do now?
does anyone has a idea about my described problem. sorry for my stupid questions, but that's all new for me and i want to learn it..
Do you have actual file "logo.jpg" on your ISF? Insert before opening:
if (myIsolatedStorage.FileExists("logo.jpg"))
{
... your code ...
sensboston said:
Do you have actual file "logo.jpg" on your ISF? Insert before opening:
if (myIsolatedStorage.FileExists("logo.jpg"))
{
... your code ...
Click to expand...
Click to collapse
hi
i had added your comment to source-code.. now, nothing happen, if i click on the button for reading the file from isolated storage..
how can i add the file "logo.jpg" to isolated storage?? i thought, i only have to put the file to my current project, like i did it with other images and then i can save or read the file to isolated storage.
I think this must be the fault. How can manage it? thanks..
Code:
private void lesen_Click(object sender, RoutedEventArgs e)
{
BitmapImage bi = new BitmapImage();
using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
if (myIsolatedStorage.FileExists("logo.jpg"))
using (IsolatedStorageFileStream fileStream = myIsolatedStorage.OpenFile("logo.jpg", FileMode.Open, FileAccess.Read))
{
bi.SetSource(fileStream);
this.imagechange.Height = bi.PixelHeight;
this.imagechange.Width = bi.PixelWidth;
}
}
this.imagechange.Source = bi;
}
jayjojayson said:
i had added your code in comment to source-code.. now, nothing happen, if i click on the button for reading the file from isolated storage..
how can i add the file "logo.jpg" to isolated storage??
Click to expand...
Click to collapse
You may try to:
- download image from network and save to isf;
- copy from resource stream to isf;
- manually upload file to the app ISF using ISETool.exe or third-party tool.
jayjojayson said:
i thought, i only have to put the file to my current project, like i did it with other images and then i can save or read the file to isolated storage.
Click to expand...
Click to collapse
Wrong assumption.
P.S. Try this (btw, it's a first google link!): http://technodave.wordpress.com/201...ge-for-local-html-content-on-windows-phone-7/
hi
thanks a lot, it works... the first comment you have written are right..
i only have to save it first to isolated storage, before i can read the file.
thanks for your explanation to add files to ISF.. i have serach for that topic, but found nothing that describe how to added to ISF.. thanks for the link... i will read this in the evening...
now i have to find out, how i can change a image on a other site(xaml). than i can change for example in my setting.xaml the background in the mainpage.xaml
every day i learn new things, that's really exciting...
jayjojayson said:
now i have to find out, how i can change a image on a other site(xaml). than i can change for example in my setting.xaml the background in the mainpage.xaml
Click to expand...
Click to collapse
Sorry, I didn't read the whole thread before answering; seems like you are digging in the wrong direction. You don't need to use ISF (but it was a good practice for you), all you need is just a dynamical binding.
I'm too lazy to type code sample for you but (he-he!), our good friend google.com returned a good link for you http://www.eugenedotnet.com/2011/05...-property-in-silverlight-and-windows-phone-7/
P.S. Experience to use google should be "the must" in developer's experience.
entry Text in new line
Hi
i use google, my best friend, for a lot of my questions. but sometimes i don't know the right searchkeywords to do what i want to do (like image binding).
i have a new small problem. in my app i have 4 textboxes, that i use to write in some data. These 4 textboxes, i write to isolated storage in a textfile and let them summarized showing up in a textblock. This works fine.
Now, if i want write a new entry, these entry is written directly after the first entry.
example like is insert in textblock
Code:
▷Text - Text - Text - Text| ▷Text - Text - Text - Text|
But i want that the entry is written in a new line? How can i do this?
example like i want it
Code:
▷Text - Text - Text - Text|
▷Text - Text - Text - Text|
i know that i can create new lines with \n , \r\n and Environment.NewLine.
Code:
IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication();
//create new file
using (StreamWriter writeFile = new StreamWriter(new IsolatedStorageFileStream("fangbuch.txt", FileMode.Create, FileAccess.Write, myIsolatedStorage)))
{
string someTextData = text.Text + "▷" + datum.Text + " - " + fisch.Text + " - " + größe.Text + "cm" + " - " + gewicht.Text + "Kg" + " | " + "\r\n";
writeFile.WriteLine(someTextData);
writeFile.Close();
}
if i use one of the elements to create a new line, like is showing in code above, the new (second) entry overwrite the first entry. What can i do now? thanks for your help.
You're using FileMode.Create, which will overwrite an existing file. You need to either use FileMode.OpenOrCreate and then seek to the end of the file, or you need to use FileMode.Append (this is the preferred approach).
Additionally, the StreamWriter.WriteFile function automatically appends a newline for you. There's no need to have them manually placed at the end of your text string.
http://msdn.microsoft.com/en-us/library/system.io.filemode.aspx
I have SQLite DB file. I copy him to StorageFile and open it by SQLite
Code:
...............................
using SQLiteClient;
using Community.CsharpSqlite;
namespace PhoneApp1
{
public partial class MainPage : PhoneApplicationPage
{
// Конструктор
private string fileName = "DB";
public MainPage()
{
InitializeComponent();
IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication();
System.IO.Stream src = Application.GetResourceStream(new Uri(fileName, UriKind.Relative)).Stream;
IsolatedStorageFileStream dest = new IsolatedStorageFileStream(fileName, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, store);
src.Position = 0;
CopyStream(src, dest);
dest.Flush();
dest.Close();
src.Close();
dest.Dispose();
IsolatedStorageFile tmp= IsolatedStorageFile.GetUserStoreForApplication();
if (!tmp.FileExists(fileName))
{
return;
}
SQLiteConnection db = new SQLiteConnection(fileName);
try
{
db.Open();
SQLiteCommand cmd = db.CreateCommand("SELECT * FROM table");
var lst = cmd.ExecuteQuery<Test>();
ApplicationTitle.Text = "Selected " + lst.ToList().Count + " items\r\nTime ";
}
catch (SQLiteException ex)
{
ApplicationTitle.Text = "Error: " + ex.Message;
}
}
private static void CopyStream(System.IO.Stream input, IsolatedStorageFileStream output)
{
byte[] buffer = new byte[32768];
long TempPos = input.Position;
int readCount;
do
{
readCount = input.Read(buffer, 0, buffer.Length);
if (readCount > 0)
{
output.Write(buffer, 0, readCount);
}
} while (readCount > 0);
input.Position = TempPos;
}
}
public class Test
{
public Test()
{
}
int _id;
public int id
{
get { return _id; }
set { _id = value; }
}
}
}
Result : ApplicationTitle = unable to opendatabase file.
Why? Plz help.
Probably because you doing something wrong, for example, opening SQLiteConnection
Seems like correct syntax should be
Code:
new SqliteConnection("Version=3,uri=file:db")
Download and try source code from http://wp7sqlite.codeplex.com/SourceControl/list/changesets#
error "Couldn't open database file version=3,urlB"
file DB i created from command "backup DB File". It's right?
I have no idea what kind of file do you have. I just downloaded and ran example from sources mentioned above and it works fine (but with few assertions). BTW you should have a complete source code of SQLite, just debug into SQLite procedures and check what's wrong.
Example work fine. I want read database from project file (Content).He isn't located in StorageFile. I use him after i'm saving myfile to StorageFile .
evgen_wp said:
Example work fine. I want read database from project file (Content).He isn't located in StorageFile. I use him after i'm saving myfile to StorageFile .
Click to expand...
Click to collapse
I already understood you. Add your code (to save database file from resource stream to isf) to example, and test conn.Open() call using F11 (Step Into). You'll see what's wrong. I don't have your database file and have no idea what did you put inside
File did not have time to create. It is ... work now.he can open empty file but can't open file with data
P.S. I use Sqlite Client for Windows Phone from http://sqlitewindowsphone.codeplex.com/
Why don't you use another codeplex project I've posted above? It works fine for me (tested because of your question).
P.S. Don't forget to push "Thanks" button. It's not a paid Microsoft customer service and I'm not your support guy.
{
"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"
}
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:
App Protection Solution by Zillinium
____________________________________________
Solution to stop reverse engineering apk
REQUIREMENTS
A key hash of the final signed package
you can use this app KeyHasher to get the key hash
- https://forum.xda-developers.com/showthread.php?p=76415112#post76415112
(OPTIONAL APP) Android application AppProtect-Final.apk
Version 1 ( Manual Package Name Entry )
- goo.gl/jJ7puy
Version 2 ( App Selector )
- goo.gl/461t48
Write down your keyhash and package name
Copy and paste this boolean code into the starting activity
Edit the code and include you're package name and key hash
Code:
public boolean isModded()
{
// Start Edit Lines
String originalKeyHash="zCJEXAMPLE/KEYHASH/bRqo=";
String originalPackageName = "example.package.name";
// End Edit Lines - leave the rest as-is
String packageName = getPackageName().toString();
String currentKeyHash="";
try
{
PackageInfo info = getPackageManager().getPackageInfo(
packageName, PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures)
{
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
currentKeyHash = ((Base64.encodeToString(md.digest(), Base64.DEFAULT)).replaceAll(" ","").replaceAll("n",""));
}
}
catch (Exception error)
{ return false; }
finally
{ if (currentKeyHash.equals( originalKeyHash) && packageName.equals( originalPackageName))
{ return false; }
else
{ return true; } }
}
EXAMPLE USAGE - under setContentView
Code:
if (isModded())
{
new AlertDialog.Builder(this)
.setCancelable(false)
.setTitle("MODIFIED COPY")
.setMessage("This app is not an original.nThe developer of this application does not allow usage of modified copies, please obtain the original apk file from the developer to use this software.")
.setNegativeButton(" EXIT ", new DialogInterface.OnClickListener()
{
public void onClick (DialogInterface dialog, int which)
{
finishAndRemoveTask();
}
})
.setIcon(R.drawable.ic_launcher)
.show();
}
FURTHER PROTECTION
This solution is only a simple example and could
do with some serious improvements, It's easy to
bypass this code by editing strings in smali files
after reverse engineering to include the new keyhash,
therefore encryption or obfuscation would greatly
increase the security of this solution.. I personally use it as-is.
XDA:DevDB Information
AppProtect, Tool/Utility for all devices (see above for details)
Contributors
Zillinium
Version Information
Status: No Longer Updated
Created 2018-05-04
Last Updated 2018-05-03