This app is to store a list of own things, location and bar code scanner of items. The list will be saved on the device locally and it can be synchronized over Rest Api both ways in cloud.

Introduction

Based on my previous app MyThings App v.1 I have further developed on it and built MyThings app version 2.

It is basically containing the minimum of following requirement plus some extra fancy creative and technical features.

1. The minimum requirement is:

Local database using SQLlite.

Create/Delete/View things from database.

Rest Api Synchronization

Ability of scanning bar-codes for new created things.

Search for thing based on scanning bar-code data in database.

2. Smart fancy features

Force update database by swiping on My Things fragment.

When screen get rotated the fields and searching result will keep remembered.

Icon added to the tab layout

When press overview button on phone hardware button it changes the tabs with logo and name of MyThings App.

Refreshing list view on fragment transparently without using intent (This was problem I have had in my previous assignment, it is fixed now)

3. Futuristic features

Building own Restful API to MyThings to sync both ways, it is build half way right now and because of time running out, it is put to side.

Adding Camera/Images of things to the list view.

Backend structure

MyThings App v.2 has the similar structure as previously, but it has got improvement on naming and variable conventions, Class are well structured, and in addition it has got google zxing barcode reading class library.

In my opinion the best documentation for coding is to make self-explaining code and structure. That makes it easier for team to understand. This is the case also in MyThings App.

When app get fired, the main activity launcher calls ThingsMainActivity class. Which is the skeleton of the app.

onCreate method must call super class implementation of this method which is part of life cycle, so in the beginning of onCreate I call CreateDummyThings.dummyCreate(this) method in class, it creates 3 dummy book in our local database. Off course we are able to create or delete more if we want so.

1.1. Local database

Our database structure under Database folder contains 3 class inspired directly from the Android Programming 2nd Edition book that we use in our course. I could have also used some example from Android Source site or Internet in general, but I found the examples are nice and well presented. Under Entity I have a Thing class that has the definitions of fields.

I have also a ThingLab class inspired from the book as well. It is the bind logic between database calls and the controller.

The method simply iterates our database and add all things table rows in our ArrayList elements, and return it as List that we can use to view it on our list view.

In case we want to search by barcode to find specific thing we simply create new method similar to getThings call it getThingsBarcode (String input) and the method works in the same way, the only difference is we add query inside the method like:

This is to demonstrate the concept, else it is possible to search everything and get single results or list (multiple) of results.

Deleting things require us to specify which element to delete, so our code snippet will look like this, it is similar to search query but here we ask for deleting the finding results. The method delete single results, as is right now.

Finally creating new things at the other hand requires us to pass data like what and where information as minimum and barcode is optional. So for example our dummy thing creating method called doCreate that pass the mentioned data to our addThing method and it will create those data in our table.

We see every day new technologies coming out to market but a few of those technologies are focused for people with special needs.

We have just finalized a research project called GuideBelt. It is simply a Bluetooth-based indoor navigation system for the visually impaired.

The GuideBelt, which is the product of this research, is such a solution that takes advantage of cheap Bluetooth beacons attached to places/objects of interest within an indoor space.

The implementation of the GuideBelt that has been the focus of this work is an early prototype, which uses phones to simulate the Bluetooth receivers (coupled with a vibration module). This was to allow us to focus on development of the algorithm rather than electronics. Therefore, the direction of this research is towards the implementation of the system with the actual technology necessary meaning with assembled electronic components (including Bluetooth modules and vibrators).

We have also wrote a research paper of our experiment that contains important details of the project.

We have made a little image site to present some images of the development:

In this paper we describe the concept, development and reflection for Pervasive Computing course (Spring 2015) at IT University of Copenhagen
where we built a context-aware mobile phone utilizing an iBeacon infrastructure.

Jan 3, 2015 |
Comments Off on Full guideline to make VHOST (Virtual Host) on XAMPP/WAMP

Note: To start with, the only difference for this guideline, between XAMPP and WAMP or other Apache packages for Windows, is question where those packages are installed on your computer.

Introduction: vhost (virtual host) is a great solution if you intend to develop many independent project in php and keep them isolated from each others, like:

Project 1 is based on php and has local url address php.localhost

Project 2 is a Laravel project with url laravel.localhost

Project 3 is a Codeigniter with url codeigniter.locathost

Project 4 is a WordPress with url wordpress.locathost

You are expected to have installed the latest version of XAMPP/WAMP. Btw, in my case, I have only installed Apache and MySQL.

*Note: By default, most web servers will uses port 80 as default port, in some situation if you have another web server installed like (Microsoft IIS), it uses port 80 as well OR in other cases SKYPE does also some times use port 80 like it is the case for some in Windows 8/10 for some users, in that case you can do two thing’s

Change your Apache port to port 8080, 8081 etc. or some other free ports (note: 8080 can some times also give some problems)

OR Change your others software/IIS port and keep Apache to default port 80 in case of Skype, just kill the Skype app and restart it after installing Apache on port 80, Skype will automatically get new port.

I have chosen to change my Apache to port 8080.

Note:
– For next section, we need to use text editor like notepad or regular IDE. I used sublime text editor.
– If you keep Apache to default port 80, skip this part and move on to Virtual hosts

Click on Config -> Apache (httpd.conf)
Or you find the file here C:XAMPPapacheconfhttpd.conf, C:XAMPPapache2confhttpd.conf, C:Bitnamiwampstackapacheconfhttpd.conf or C:Bitnamiwampstackapache2confhttpd.conf or similar location.

Change the line with

Listen 80

To 8080 or other, free ports.

Listen 8080

While we have httpd.conf file open we need to ensure that httpd-vhosts.conf is included:
Include conf/extra/httpd-vhosts.conf

Virtual hosts

Note: By default server documents are locate on C:XAMPPhtdocs or C:Bitnamiwampstackapache2htdocs that’s fine if you have only one project or many small test files. However, if you need to develop many projects then it suggested separating them by virtual host, as mentioned earlier.

Step 2. Setting Virtual host

Create a folder for your projects; I have create one in c:vhost you can call it projects etc.

In c:vhost folder we create a sub-folder domain1 or project1 or any other, it is up to you (c:vhostproject1)

Open httpd-vhosts.conf file C:XAMPPapacheconfextrahttpd-vhosts.conf Add following code in line depending on how many vhost you want to create:

Note: If you work on Laravel projects you can create unlimited Laravel projects as well as other frameworks like codeigniter, Yii, etc., the point is to
have your Laravel project/s on c:vhostlaravel1,c:vhostlaravel2 etc and make c:vhostlaravel1public as
DocumentRoot etc as showed before. Each Laravel project will have own
VirtualHost URL.

Save and close the file

Some additional information and notes:

If port is remain default 80 then the URL address will be localhost

If port is remain default 80 then the the VirtualHost tag should be changed to <VirtualHost *:80>

If port is changed to 8080, the URL address will be localhost:8080

And the vhost URL address could look like this project1.localhost:8080 etc

You can add unlimited projects and virtual host like this way.

We are not ready yet, read more.

Step 3. Edit Windows Host file

Stop Apache and MySQL services from XAMPP/WAMP.

Open hosts file in C:windowssystem32driversetc
you need Administrator privilege to edit the file.
I suggest to edit the file directly with Sublime text editor.

Add 127.0.0.1 project1.localhost at the end of the file, Save and close the file.