Pool Guy – Ideal Swimming Pool Management Application

Google-Play-Store

Click here to go to Pool Guy app in Google Play

Pool Guy will be the ideal swimming pool service management application. This app will help the user to manage your customers’ swimming pools easily and you can keep track of the test results of those pools. You can also keep track of the chemicals you applied to each pool and reports will be provided by the app to make sure whether you are in profits.

Features

1. You can add / edit / remove your customers and swimming pools, they owned.

2. You can assign a day/s to service a pool and you will be asked to enter a stop number which is the number of the pool that you are going to service on that day/s

3. You will be given your route everyday according to the stop number, you assigned. So you just have to see your route in the morning and follow the route given by the app.

4. You can add repairs or special services to a particular pool on a particular date and the app will take the responsibility of reminding you that event. (eg. Filter Cleaning Services, Repairs etc)

5. When you visit a pool, you can add the test results of the water. (eg. Free Chlorine, pH value, Salt Level, Total Alkalinity, Calcium Hardness, Cyanuic Acid, Phosphates, TDS, Filter Pressure or any note) The app will then show you the accepted and preferred ranges of each factor.

6. Then you can add the chemicals that you used on that pool. (eg. Chlorine-Liquid, Di-Chloro, Tri-Chloro, Acid Muriatic, Dry Acid, Soda Ash, Tabs, Salt, Water Clarifier, Potassium, Algacide, Phosphate Remover, Sodium Bicarbonatte)

7. The app will generate three kinds of reports. They are test reports, chemical reports and special notes reports

+ Test Reports – Test results you entered to the app can be seen by this. You can filter these reports by particular date range or by customer

+ Chemical Usage Reports – You can see the chemical usage and you can filter the report by a customer to see how much you have used the chemicals for a particular pool

+ Notes Reports – You can see the special notes you made for each pool

8. There will be a Profit and Loss Account feature. There you can see your income and your expenses monthly or weekly. Also you can see how much profit you gain from a particular customer.

Feedback

feedback-1

feedback-2

New Design

device-2014-12-15-232703    device-2014-12-15-232728    page my route

Important URLs

Freelancer Project

Freelancer Project Update 1

Freelancer Project Update 2

 

Advertisements

MiExchange Ops

I have designed an android application to utilise the web service interface designed to communicate with the Exchange Product. It is mainly designed for the operational engineers in a stock exchange. There are features such as live monitoring of system status, notification system, performance and the network traffic of the system. This application has a unique feature that the user interface is fully configurable. Therefore, without making a code change, operational engineers can configure this application to be deployed in any of their client site.

1     2     3

 

iSMS – Smart way to get SMS Notifications

iSMS

Click here to go to iSMS App in Google Play

iSMS App

Click here to go to iSMS App in Google Play

————————————————————————————————————————————-

Have you ever thought of allocating different SMS tones for your favorite contacts?

Do you like to allocate specific vibration patterns for your best friends?

This is the app you are looking for.

————————————-
iSMS Features in Detail :
————————————-

* You can select different contacts from your phone book and allocate different SMS tones for each number of them. Then if you get a text message from them, the allocated SMS tone will be played so that you can easily guess the person who messaged you

* When you get a text message from a contact which is not listed in this application, the default notification sound will be played.

* So what if you are in silent mode, so that how can you identify the person who has messaged you without looking at the phone? Vibration Patterns come in handy in this kind of scenario.

* You can setup a specific vibration pattern for your favorites so that if you are in a lecture or in an important meeting, you can guess the person, who messaged you without taking your phone out from your pocket.

* You can also create a custom vibration pattern as well. Enjoy this feature. It’s available in Version 2.0+

———————-
iSMS Benifits:
———————-

* Low Power Consumption (There are no full time services which run in background so that there won’t be any battery drain because of this application)

* You don’t want to switch your screen on which will consume more battery. You just can identify the person by the SMS tone and the Vibration Pattern.

Hope you will enjoy this app. Email me if you have any issue or any feature you like to add. I’m always looking forward to your valuable ideas.

————————————————————————————————————————–
If you like this app, don’t forget to motivate me by reviewing my app. It will mean alot.

SOME OF THE GREAT REVIEWS HAD SO FAR ————————————————————————

Review by Hirantha Sankalpa

Review by Ranj Sarraj

Review by Radu Avramescu

Review by Tharindu Wijewardane

Review by Asanka UdayaLike Us on Facebook – https://www.facebook.com/pages/ISMS-Smart-way-to-get-SMS-Notifications/309990439132217

Robotium for Android

Introduction

Robotium is an open source test framework that automatically writes powerful and robust black-box test cases for android applications, similar in nature to Selenium which is used for web application testing. Test Driven Development is a methodology where tests are written before the actual application.

  • Write a test case
  • Watch it failing
  • Write the actual source code in you application which enables the test to pass
  • Watch the test passing
  • Go back to step 1

With the support of Robotium, test case developers can write scripts for functional, system and acceptance testing and spanning multiple Android activities as well. Robotium is released under Apache License 2.0. Version 2.3 and it was released on April 21, 2011.
Robotium test is a subclass of junit.framework.Test case in which, by using the Robotium library, a Solo object is created which allows easy access to the views in your activities.
Through the solo object, you can set values in input fields, click on buttons and get results from other User Interface components. Methods of Assert class in JUnit can then be used to check those results.

Installation

It’s very simple to install Robotium for android. We just have to download the Robotium-Solo.jar file and add it to the build path of your project. You will understand in the future because I’m going to do a demo by using Robotium.

How to test Sample Android Application with Robotium

1. First of all you have to setup the android development environment. So, follow this document and at the end you will have the working environment installed in your PC.

2. Now we are going to build a simple calculator using android. Click on File menu, select New and click on the Others, From New window, Drag down to Android option, expand it, and select Android Project and Click on Next.

3. From New Android Project Window, enter Project Name as ‘AndroidCalculator’. Then click next

4. Select Android 2.2and click Next

5. Set the package name as ‘com.cse.calculator’ and click Finish.

6. Now you have completed in initializing the android project. Now go to Project Explore in Eclipse > Expand AndroidCalculator > Expand res folder > Expand layout folder. There should be a main.xml file. Open it.

7. Then paste the following code in main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="10dp" >

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="@string/hello"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#00ff00" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/txtFirstNumber" />

<EditText
android:id="@+id/etFirstNumber"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:inputType="numberDecimal" >
</EditText>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/txtSecondNumber" />

<EditText
android:id="@+id/etSecondNumber"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:inputType="numberDecimal" >
</EditText>

<TextView
android:id="@+id/tvAnswer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ff0000"
android:layout_marginBottom="10dp"/>

<Button
android:id="@+id/bMultiply"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/multiply"
android:textColor="#0000ff"
android:textSize="20dp" >
</Button>

</LinearLayout>

8. Now place this code in res > values > strings.xml

<?xml version="1.0" encoding="utf-8"?>

<resources>
<string name="hello">Enter two values and click on Calculate to multiply them.</string>
<string name="app_name">AndroidCalculator</string>
<string name="txtFirstNumber">Enter First Number</string>
<string name="txtSecondNumber">Enter Second Number</string>
<string name="multiply">Multiply</string>
</resources>

9. Now open src > com.cse.calculator > AndroidCalculatorActivity.java and paste the following code and save it.

package com.cse.calculator;

import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class AndroidCalculatorActivity extends Activity implements OnClickListener{

private EditText firstValue, secondValue;
private Button multiply;
private TextView answer;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

// initialize variables
firstValue = (EditText) findViewById(R.id.etFirstNumber);
secondValue = (EditText) findViewById(R.id.etSecondNumber);
multiply = (Button) findViewById(R.id.bMultiply);
answer = (TextView) findViewById(R.id.tvAnswer);

// add listener to the button
multiply.setOnClickListener(this);

}

/** called when multiply button is clicked **/
@Override
public void onClick(View v) {
switch(v.getId()) {
case R.id.bMultiply:
//Getting first & second values and passing to show result
showResult(firstValue.getText(), secondValue.getText());
break;
}
}

private void showResult(Editable first, Editable second) {
float num1 = Float.parseFloat(first.toString());
float num2 = Float.parseFloat(second.toString());
float result = num1 * num2;
answer.setText(String.valueOf(result));
}
}

10. Now run the android application by right clicking on the Project > Run As > Android Application

11. Let’s begin to create a Test Project for this calculator using Robotium. So go to File > New > Android Test Project.

12. Then, give the project name as ‘AndroidCalculatorTest’ and click next.

13. Then, select the android project (i.e. AndroidCalculator) to be tested and click finish.

14. In test project from project explorer window right click on com.cse.calculator.test select New then others. On New window expand Java and then expand Junit category and select Junit Test Case and click on Next.

15. On New Junit Test Case screen, most of the options will be automatically filled as we have already created test project (AndroidCalculatorTest) with project (AndroidCalculator). We need to enter the Name of Test case, which I will enter TestCal, as I am going to test (AndroidCalculatorActivity.java) of AndroidCalculator project. On next section check Setup(), tearDown() & Constructor options and click on Finish.

16. Now right click on the ‘AndroidCalculatorTest’ project > New > Folder and name the folder as ‘Robotium’

17. Then add the Robotium.jar file which is downloaded before, in the installation section in this tutorial to the Robotium folder. Right click on the jar file in the project explorer > Build Path > Add to build path. OK now you are go to go with Robotium

18. In our create test case we will access the contents of AndroidCalculator and do followings,

  • Call/Access first & second input controls (Edit Fields)
  • Enter values of our own choice
  • Access & Click on Multiply button
  • Put assert to verify their multiplication result into result field. And add following code into TestCal.java class and save it.

And add following code into TestCal.java class and save it.

package com.cse.calculator.test;

import java.util.ArrayList;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.EditText;
import android.widget.TextView;
import com.cse.calculator.AndroidCalculatorActivity;
import com.cse.calculator.R;
import com.jayway.android.robotium.solo.Solo;

public class TestCal extends ActivityInstrumentationTestCase2<AndroidCalculatorActivity> {

private Solo solo;

public TestCal() {
super("com.cse.calculator", AndroidCalculatorActivity.class);
}

@Override
protected void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation(), getActivity());
}

public void testDisplayBlackBox() {
// Enter 10 in first editfield
solo.enterText(0, "10");
// Enter 20 in first editfield
solo.enterText(1, "20");
// Click on Multiply button
solo.clickOnButton("Multiply");
// Verify that resultant of 10 x 20
assertTrue(solo.searchText("200"));
}

public void testDisplayWhiteBox() {
// Defining our own values to multiply
float firstNumber = 10;
float secondNumber = 20;
float result = firstNumber * secondNumber;

// Access First value (editfiled) and putting firstNumber value in it
EditText FirsteditText = (EditText) solo.getView(R.id.etFirstNumber);
solo.enterText(FirsteditText, String.valueOf(firstNumber));

// Access Second value (editfiled) and putting SecondNumber value in it
EditText SecondeditText = (EditText) solo.getView(R.id.etSecondNumber);
solo.enterText(SecondeditText, String.valueOf(secondNumber));

// Click on Multiply button
solo.clickOnButton("Multiply");
assertTrue(solo.searchText(String.valueOf(result)));
TextView outputField = (TextView) solo.getView(R.id.tvAnswer);

ArrayList<TextView> currentTextViews = solo.getCurrentTextViews(outputField);
assertFalse(currentTextViews.isEmpty());
TextView output = (TextView) currentTextViews.get(0);

// Assert to verify result with visible value
assertEquals(String.valueOf(result), output.getText().toString());
}

@Override
protected void tearDown() throws Exception {
solo.finishOpenedActivities();
}
}

19. Now as we are almost done so now its time to run our test case. Right click on TestCal.java file select Run As option and then click on Android Junit Test. It will start running Junit test. Select the emulator or device to run the test (we will be using Android default emulator) , and wait for a while to see the magic of Robotium.

If things are going fine

  • Emulator will load, Unlock it.
  • AndroidCalculator application will load
  • It will automatically enter first & second values in First and Second Edit Field, and click on
    Multiply button (you can see all this happening as record & play scripts)
  • After successfully execution it will show green bar showing the successful execution and all results are passed.

Pros and Cons for Robotium

Benefits:

  • Multiple application components that provide a screen with which users can interact in order to do certain work is provided in this framework.
  • Test cases are automatically generated when using this framework thus ensuring minimal time for code generation.
  • Compared to standard instrumentation tests readability of test cases is greater.
  • GUI components binding with the run-time help to improve the test cases as it will easier than with a non-GUI model.
  • Apache Ant and Apache maven which are build automation tools can be integrated with Robotium.

What we can’t do with Robotium:

  • Robotium has a big problem with auto scrolling methods for an example if you are looking for the text, which is not shown, Robotium will stack in the end of the scroll view and make assertTrue(false) function to stop scrolling.
  • You will need to implement some logic to click items in the scroll/list view. Because of Robotium clicks in the center of the view, you will always get exception or assertTrue(false) when try to click view with only 20% part shown.
  • Cross Activities testing, Robotium is able to work only with same certificate application, otherwise you will have to inject events exception (eg: you are not able to do clicks on screen keyboard).
  • Robotium has assertTrue(false) logic for reporting problems/unexpected situations instead of returning some Enum value or Boolean (success/fail) so for a good stress tests which run 24/7 you need to add your own methods which will not stop test, just handle ‘method fail to click x y’ result value.
  • Robotium has no mechanism to handle expected/unexpected alerts/pop ups/dialogues. For an example I/Os java script tests has very simple Boolean flag and callback for handling alerts.

Robolectric vs Robotium

Robolelectric is another testing tool which doesn’t need a device/emulator as Robotium.With compared to Robotium there are not only plus points but also the minus points. When talking about its plus points It can be pointed out as a very fast and stable testing tool which dramatically sped up TDD cycles and works really well for most common testing needs.

Robolelectric,

  • Runs in JVM
  • Shadows android SDK classes
  • No device/emulator necessary for run
  • High performance
  • great turnaround during development
  • powerful API

Few minus points,

  • Android API simulation isn’t 100% accurate
  • incomplete shadows
  • limited since not running on device
  • cannot distinguish between API levels

But Robolelectric is under development and is very useful because instrument/Emulator based test such as Robotium are painfully slow though they follow the Android API to the letter(Randomly fail). They are great for testing the edges of the API that aren’t simulated by Robolelectric and for testing actual phone behavior in the situation.

Calculon Vs Robotium

Calculon is a unit testing tool which runs on Dalvik, the process virtual machine (VM) in Google’s Android operating system. It is more focus to unit testing than Robotium.Calculon is a DSL for testing views and activities. As Robotium seems to most mature and reliable it is preferred. A test should be easy to write, easy to read. So calculon comes to the rescue for those. Calculon deployed as a JAR and is a DSL(as far as it is possible in java) as mentioned above. It is open source and tests with calculon are written as functional activity tests.

How to install Apache ANT

Here, I would like to explain you about how to build a Java Project using Apache ANT(Another Neat Tool). Maven is also a build tool but I prefer ANT over Maven. A build tool like ANT, can be used to automate certain repetitive work, not only to build Java projects. When creating jar files, compiling source codes , etc a build tool plays a major role.

So, enough talking about the tool. let’s get our hands dirty. First we have to install Apache ANT.

Linux Users – type in the terminal, apt-get install ant to install it.

Windows Users –

  • Download the ZIP file Apache ANT from this site.
  • Extract the file into any location (for this Example let’s assume that the zip file is extracted to the C drive).
  • Go to Environmental Variables Menu (Right click on the My Computer > Properties > Advanced System Settings > Environmental Variables)
  • Add a new User Variable (Not a System Variable). Variable Name – ANT_HOME , Variable Value – C:\apache-ant-1.8.2
  • Add another User Variable. Variable Name – JAVA_HOME, Variable Value – “Path to Java JDK”
  • Add “C:\apache-ant-1.8.2\bin” to Path variable (Path Variable is at the System Variables Section)

Now you are done with the installation part. To check whether the ANT is running without any errors, Open Command Prompt and type ant -version and there will be a massage displaying the compilation date. If not, try again. 🙂

Personal Life – Android Application

In day today life, you might have realized that what if there is an application in your phone to save your account usernames and passwords, safely. Sometimes, you might have some special photos which you don’t want to show to the others who use your phone. This is your app. This application enables the user to save username and passwords of your accounts. Also, here the user can write down notes which are personal.

This slideshow requires JavaScript.

This app is freely available in Android Market and Amazon app store.

GIS Application

This programming project was assigned by the campus when I’m in the 1st Semester in the department of Computer Science and Engineering. It’s just a basic java application which will show you a map and user have to give the current location and the destination. Then the application will show the shortest path to the destination. Sometimes, the path which is shown may not be the shortest path. The algorithm,used takes the traffic details into account and finds the easiest path to travel. In the program, I have used Dijkstra’s Algorithm to find the shortest path.

Snapshots –