- •Introduction
- •Mobile Android platform
- •In addition, it was reported that Google will, at its discretion, remove applications on phones users if developers violated their terms of use.
- •Description of the main mobile platforms
- •Android sdk and jdk
- •Eclipse
- •Web Server
- •Php and json
- •The use case diagram
- •Figure 4 - Example of a use case diagram
- •3.2.2 Register.Java[11]
- •3.2.4 Succes.Java[11]
- •3.2.5 Call.Java[11]
- •3.2.6 JsonParser.Java[11]
- •Figure 9 - jsonParser.Java
- •3.5 User's Guide to the application's
- •4.2 Android Market
- •4.3.3 The costs of operation and maintenance of equipment
- •5.2 Analysis of dangerous and harmful factors
- •5.3 Production sanitation and health
- •5.6 Safety precautions when working with a computer
- •Figure 16 - location of fixtures
- •Conclusion
- •References [1] Android, the world's most popular mobile platform http://developer.Android.Com/about/index.Html
- •19.12.2007) Astana, Akorda, on May 15, 2007
- •[14] Php Cookbook: Solutions and Examples for php Programmers, Second Edition, David Sklar,August, 2006
Figure 9 - jsonParser.Java
3.3 PHP scripts[11]
In the application, php scripts are used for processing information with JSON for storing dates in the database. All the scripts are used to connect to the database. Table 7 includes a detailed description of php scripts. Figure 10 has an example of one php script.
Table 7 - Description of php scripts
Name |
Description |
Save.php |
Processes data and stores the contacts database |
Sav.php |
Clears the database from old contacts |
Login.php |
Checks the data for authorization |
Backup.php |
Copies the information from the database and sends to the application to save to phone |
Register.php |
Enters to the database of the new member |
DB_connect.php |
Creates a database connection |
DB_config.php |
Database Settings |
<?php
$response = array();
if (isset($_POST['login']) && isset($_POST['password'])) {
$login = $_POST['login'];
$password = $_POST['password'];
require_once __DIR__ . '/db_connect.php';
$db = new DB_CONNECT();
$men = mysql_query("SELECT * FROM users where login = '$login'");
if(mysql_num_rows($men) > 0){
$response["success"] = 2;
$response["message"] = "login zanyat.";
echo json_encode($response);
}else{ $result = mysql_query("INSERT INTO users(login, password) VALUES('$login', '$password')");
if ($result) {
$response["login"] = $login;
$response["success"] = 1;
$response["message"] = "Product successfully created.";
echo json_encode($response);
} else {
$response["success"] = 0;
$response["message"] = "Oops! An error occurred.";
// echoing JSON response
echo json_encode($response);
}
}
}
?>
Figure 10 - Register.php
3.4 XML files[11]
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. In this diploma project xml is used for designing the application. XML is face of application that visible for user. In table 8 xml’s used in diploma project. In figure 11 example of xml file.
Table 8 - XML descriptions.
Name |
description |
activity_main.xml |
For designing main page |
backup.xml |
For designing backup page |
Continue of Table 7 – variables of class JSONParser.java |
|
call.xml |
For designing call page |
login.xml |
For designing login page |
register.xml |
For designing register page |
simple.xml |
For creating list |
success.xml |
For designing logged in page |
styles.xml |
Design colors and font |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="login" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="password" />
<TextView
android:id="@+id/eError"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="@+id/bLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Login" />
</LinearLayout>
Figure 11 - Login.XML