#ciptaDataApp

android data app

android crud apps is an android apps that can insert, update, select, delete, upload data from android smartphone and the data will store in your backend server. and any changes and updates in backend will updated to the android smartphone too. we use mvc structure for the android struture and it is easy to develop. we use codeigniter for the backend & api and we use mysql for the database

technologies used by android data app

key feature that you can find

crud

insert, update, delete, select data

datatables

integrated with datatables

realtime

all data can be viewed realtime

pic

documentation

material that provides official information about the product

requirement

make sure your server meets or higher than the following requirements, this app will run on it.


server side requirement

  • server linux/unix (recommended), windows or mac os x
  • web server apache (recommended), microsoft iis or any similar web server
  • php version php v5.4 or above
  • database mysql v5 or higher suggested

client side requirement

  • chrome
  • firefox
  • safari
  • internet explorer 9+

installation

upload application. installation to server is a simple process that should not take more than a few minutes. the following installation guide will help you to install the app on your server.

  • unzip zip package.
  • upload the zip package folders into your server. normally the index.php file will be at your root.


import database. the application needs a mysql database to store data. you can either use your existing mysql database or create a dedicated mysql database for the application on your server. take note of the username, password, database name, and hostname as you create the database. you will enter this information for database configuration.

  • create new schema on your mysql database
  • import file database.sql

database configuration

database configuration. for the database configuration, open the application/config/database.php file with a text editor and set your database settings.


$active_group = 'default';
$query_builder = true;

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'localhost',      
    'username' => 'root',                   //fill with your username
    'password' => '',                       //fill with your password
    'database' => 'database_db',           //fill with your schema
    'dbdriver' => 'mysqli',
    'dbprefix' => '',
    'pconnect' => false,
    'db_debug' => (environment !== 'production'),
    'cache_on' => false,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => false,
    'compress' => false,
    'stricton' => false,
    'failover' => array(),
    'save_queries' => true
);


codeigniter model

this model use five methods, there are:

  • getbyquery. to select the data.
  • insert. to insert the data.
  • insertret. to insert the data and return the id.
  • update. to update the data.
  • delete. to delete the data.

codeigniter controller

we created the contoller with standarization and the code adheres to psr standards. every contoller user our method standarization, there are:

  • index() in this method you should provide the data for the main page.
  • gridview() to show into the table, you should retrieve data from database and declare it in this method.
  • generateid() this method is a function to generate id or unique id.
  • form() to show data and form that you can insert and update.
  • save() this method will save the data to the database.
  • view() to show data.
  • delete() this method will delete the data.

android structure

we created the android structure to make application clean and easy to develop, here is the structure:

  • dataaccess/ connection to the server.
  • features/ all activity and core function.
  • helpers/ function helpers.
  • libraries/ all libraries.
  • model/ data model.

android configuration

android configuration at build.gradle

android {
    compilesdkversion 28
    defaultconfig {
        applicationid "id.web.cipta.datamanagement"
        minsdkversion 19
        targetsdkversion 28
        versioncode 1
        versionname "1.0"
        testinstrumentationrunner "android.support.test.runner.androidjunitrunner"
    }
    buildtypes {
        release {
            minifyenabled false
            proguardfiles getdefaultproguardfile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    productflavors {
    }
}
                     


setup your url to server at constant.java

public static context applicationcontext = null;
public static string server_url = "http://104.cipta.web.id/"; // <---- change this url with yours
public static string base_url = server_url + "index.php/mdataaccess/";
public static string asset_url = server_url + "assets/uploaded/";
public static string jwt_key = "cptwb*";
public static string folder_save = "android/data/id.web.cipta.datamanagement/";
public static string default_filename = "acerqc_";
public static int request_camera = 101;
                     


dependencies at build.gradle

dependencies {
    implementation filetree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.github.d-max:spots-dialog:0.4@aar'
    implementation 'com.google.code.gson:gson:2.2'
    implementation 'com.squareup.okhttp3:okhttp:3.2.0'
    implementation 'com.alexzh:circleimageview:1.1.2@aar'
    implementation 'com.android.support:multidex:1.0.1'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.code.gson:gson:2.2'
}
                     

need more? yes, of course! those are very simple for you!
just contact us for the customization