PEMBANGUNAN APLIKASI M-RETSHOP BERBASIS LBS (LOCATION BASED SERVICES) PADA PLATFORM ANDROID TUGAS AKHIR
Sebagai Persyaratan Guna Meraih Gelar Sarjana Strata 1 Teknik Informatika Universitas Muhammadiyah Malang
Oleh : Rini Dwi Safitri 09560011
JURUSAN TEKNIK INFORMATIKA FAKULTAS TEKNIK UNIVERSITAS MUHAMMADIYAH MALANG 2014
i
LEMBAR PENGESAHAN
PEMBANGUNAN APLIKASI M-RETSHOP BERBASIS LBS (LOCATION BASED SERVICES) PADA PLATFORM ANDROID TUGAS AKHIR Sebagai Persyaratan Guna Meraih Gelar Sarjana Strata 1 Teknik Informatika Universitas Muhammadiyah Malang
Disusun Oleh : Rini Dwi Safitri 09560011
Tugas Akhir ini telah diuji dan dinyatakan lulus melalui sidang majelis penguji pada tanggal 7 Januari 2014
Menyetujui, Penguji I
Penguji II
Zamah Sari, S.T, M.T NIDN:0708087701
Wahyu Andhyka Kusuma NIDN:0720068701
Mengetahui Ketua Jurusan Teknik Informatika
Eko Budi Cahyono, S.Kom,MT NIP:108.9504.0330
ii
KATA PENGANTAR
Dengan memanjatkan puji syukur kehadirat Allah SWT yang telah memberikan limpahan rahmat dan hidayah–Nya, serta shalawat dan salam kepada Rasulullah SAW sehingga penulis dapat menyelesaikan skripsi yang berjudul :
“PEMBANGUNAN APLIKASI M-RETSHOP BERBASIS LBS
(LOCATION BASED SERVICES) PADA PLATFORM ANDROID” Di dalam tulisan ini disajikan pokok-pokok bahasan yang meliputi perancangan dan pembuatan aplikasi M-Retshop. Dengan menggunakan aplikasi ini konsumen dapat berbelanja kapan saja dan dimana saja melalui smartphone yang dimilinya secara online. Sehingga lebih mengefisiensi waktu konsumen untuk berbelanja kebutuhan sehari-hari. Peneliti menyadari sepenuhnnya bahwa dalam penulisan Tugas Akhir ini masih banyak kekurangan dan keterbatasan. Oleh karena itu peneliti mengharapkan saran yang membangun agar tulisan ini bermanfaat bagi perkembangan ilmu pengetahuan kedepan.
Malang, Januari 2014
Penulis
iii
DAFTAR ISI HALAMAN JUDUL ............................................................................................... i LEMBAR PERSETUJUAN ................................................................................... ii LEMBAR PENGESAHAN ................................................................................... iii LEMBAR PERNYATAAN ................................................................................... iv ABSTRAKSI ...........................................................................................................v ABSTRACT ........................................................................................................... vi LEMBAR PERSEMBAHAN ............................................................................... vii KATA PENGANTAR ........................................................................................... ix DAFTAR ISI ............................................................................................................x DAFTAR GAMBAR ........................................................................................... xiii DAFTAR TABEL ..................................................................................................xv BAB I PENDAHULUAN ........................................................................................1 1.1 Latar Belakang ..........................................................................................1 1.2 Rumusan Masalah .....................................................................................2 1.3 Tujuan........................................................................................................3 1.4 Batasan Masalah ........................................................................................3 1.5 Metode Penelitian ......................................................................................3 1.5.1 Metode Studi Kepustakaan ....................................................................3 1.5.2 Metode Pengembangan Aplikasi ...........................................................3 1.6 Sistem Penulisan .......................................................................................4 BAB II LANDASAN TEORI ..................................................................................6 2.1 Mobile Commerce (M-Commerce)............................................................6 2.1.1 Pengertian M-Commerce .......................................................................6 2.1.2 Tahapan Dalam M-Commerce ...............................................................7 2.1.3 Produk dan Jasa M-Commerce ..............................................................7 2.2 Teknologi Web Service..............................................................................8 2.2.1 Pengertian Web Service .........................................................................8 2.2.2 Arsitektur Web Service ..........................................................................9 2.2.3 Operasi Web Service ............................................................................10 2.3 Java Script Object Notation (JSON) .......................................................10 2.3.1 Pengertian JSON..................................................................................10 2.3.2 Struktur JSON......................................................................................11 2.4 Google Maps API ....................................................................................12 2.4.1 Pengertian API .....................................................................................12
iv
2.4.2 Pengertian Google Maps API ..............................................................12 2.4.3 Syntax pada Google Maps ...................................................................13 2.5 Location Based Service (LBS) ................................................................14 2.5.1 Metode LBS .........................................................................................15 2.5.2 Komponen LBS ...................................................................................15 2.6 IPAYMU .................................................................................................17 2.6.1 Status Akun IPAYMU .........................................................................18 2.6.2 Cara Kerja IPAYMU ...........................................................................18 2.6.3 Layanan IPAYMU ...............................................................................20 BAB III ANALISA DAN PERANCANGAN SISTEM ........................................21 3.1 Analisa Sistem .........................................................................................21 3.1.1 Analisa Masalah...................................................................................21 3.1.2 Analisa Arsitektur Sistem ....................................................................22 3.1.3 Analisa Kebutuhan Fungsional ............................................................23 3.1.4 Analisa Kebutuhan Non Fungsional ....................................................23 3.1.5 Use Case Diagram...............................................................................23 3.2 Analisa dan Perancangan Aplikasi ..........................................................26 3.2.1 Activity Diagram ..................................................................................26 3.2.1.1 Activity Diagram dari Use Case Registrasi .................................26 3.2.1.2 Activity Diagram dari Use Case Profile ......................................26 3.2.1.3 Activity Diagram dari Use Case Cart ..........................................27 3.2.1.4 Activity Diagram dari Use Case Product .....................................28 3.2.1.5 Activity Diagram dari Use Case Mapping ...................................28 3.2.1.6 Activity Diagram dari Use Case History......................................29 3.2.2 Sequence Diagram ...............................................................................29 3.2.2.1 Sequence Diagram dari Use Case Registrasi...............................29 3.2.2.2 Sequence Diagram dari Use Case Edit Profile ............................30 3.2.2.3 Sequence Diagram dari Use Case Cart .......................................31 3.2.2.4 Sequence Diagram dari Use Case Product ..................................32 3.2.2.5 Sequence Diagram dari Use Case Mapping ................................34 3.2.2.6 Sequence Diagram dari Use Case History...................................34 3.2.3 Class Diagram .....................................................................................35 3.2.4 Skema Relasi .......................................................................................36 3.2.5 Rancangan Database ...........................................................................36 3.2.6 Rancangan Interface ............................................................................39 BAB IV IMPLEMENTASI DAN PENGUJIAN ...................................................43 4.1 Implementasi ...........................................................................................43 4.1.1 Batasan Implementasi ..........................................................................43 4.1.2 Implementasi Perangkat Lunak ...........................................................43 4.1.3 Implementasi Perangkat Keras ............................................................44
v
4.1.4 Implementasi Web Service ..................................................................44 4.1.4.1 Konfigurasi Database Server .......................................................44 4.1.4.2 StoreUser .....................................................................................45 4.1.4.3 GetUserByEmailAndPassword .....................................................45 4.1.4.4 IsUserExisted ...............................................................................46 4.1.4.5 GetDataBarang ............................................................................46 4.1.4.6 Inputtransaksi ...............................................................................47 4.1.4.7 SearchingTransaksi.......................................................................48 4.1.4.8 Payment ........................................................................................48 4.1.5 Implementasi Interface Aplikasi Client ..............................................49 4.1.5.1 Implementasi Interface Registrasi ..............................................49 4.1.5.2 Implementasi Interface Login .....................................................50 4.1.5.3 Implementasi Interface Product .................................................52 4.1.5.4 Implementasi Interface Cart .......................................................57 4.1.5.5 Implementasi Interface Mapping ................................................64 4.1.5.6 Implementasi Interface History ..................................................65 4.2 Pengujian .................................................................................................65 BAB V KESIMPULAN DAN SARAN ................................................................70 5.1 5.2
Kesimpulan..............................................................................................70 Saran ........................................................................................................70
DAFTAR PUSTAKA .......................................................................................... xvi
vi
DAFTAR GAMBAR Gambar 2.1Tiga Entitas Dalam Arsitektur Web Service .........................................9 Gambar 2.2Logo IPAYMU ...................................................................................17 Gambar 2.3Merchant Mengajukan Permohonan ke IPAYMU .............................19 Gambar 2.4IPAYMU Menyetujui Permohonan Merchant ....................................19 Gambar 2.5Merchant Dapat Melakukan Integrasi Dengan IPAYMU ..................19 Gambar 2.6Jenis Merchant IPAYMU ....................................................................20 Gambar 2.7Jenis Layanan IPAYMU .....................................................................20 Gambar 3.1Arsitektur M-Retshop .........................................................................22 Gambar 3.2Use Case Diagram M-Retshop ...........................................................24 Gambar 3.3Activity Diagram Dari Use Case Register ..........................................26 Gambar 3.4Activity Diagram Dari Use Case Profile.............................................27 Gambar 3.5Activity Diagram Dari Use Case Cart ................................................27 Gambar 3.6Activity Diagram Dari Use Case Product ...........................................28 Gambar 3.7Activity Diagram Dari Use Case Mapping .........................................28 Gambar 3.8Activity Diagram Dari Use Case History ............................................29 Gambar 3.9Sequence Diagram Dari Use Case Registrasi .....................................30 Gambar 3.10Sequence Diagram Dari Use Case Edit Profile ................................31 Gambar 3.11Sequence Diagram Dari Use Case Cart ...........................................31 Gambar 3.12Sequence Diagram Update Cart Quantity ........................................32 Gambar 3.13Sequence Diagram Delete Cart ........................................................32 Gambar 3.14Sequence Diagram Dari Use Case Product ......................................33 Gambar 3.15Sequence Diagram Add to Cart ........................................................33 Gambar 3.16Sequence Diagram Dari Use Case Mapping ....................................34 Gambar 3.17Sequence Diagram Dari Use Case History .......................................35 Gambar 3.18Class Diagram ..................................................................................36 Gambar 3.19Skema Relasi Aplikasi M-Retshop ...................................................36 Gambar 3.20Rancangan Menu Login ....................................................................39 Gambar 3.21Rancangan Menu Register ................................................................39 Gambar 3.22Rancangan Menu Utama ...................................................................39 Gambar 3.23Rancangan Menu Utama Profile…………………………………………...40 Gambar 3.24Rancangan Sub Menu Lihat Profile ..................................................40 Gambar 3.25Rancangan Sub Menu Ganti Password Pada Profile ........................40 Gambar 3.26Rancangan Menu Utama Cart ...........................................................41 Gambar 3.27Rancangan Menu Utama Product .....................................................41 Gambar 3.28Rancangan Menu Utama Mapping....................................................41 Gambar 3.29Rancangan Menu Utama History ......................................................42 Gambar 4.1 Konfigurasi Database Server .............................................................44 Gambar 4.2 Konfigurasi Connect ke Server ..........................................................45 Gambar 4.3 Potongan Kode Fungsi storeUser .......................................................45 Gambar 4.4 Potongan Kode Fungsi getUserByEmailAndPassword .....................46 Gambar 4.5 Potongan Kode Fungsi isUserExicted ................................................46 Gambar 4.6 Potongan Kode Fungsi getDataBarang ..............................................47 Gambar 4.7 Potongan Kode Fungsi inputtransaksi ................................................47 Gambar 4.8 Potongan Kode Fungsi searchingTransaksi .......................................48 Gambar 4.9 Potongan Kode Fungsi payment ........................................................48 Gambar 4.10 Potongan Kode Class RegisterActivity............................................49 vii
Gambar 4.11 Tampilan Menu Register ..................................................................50 Gambar 4.12 Potongan Kode Class LoginActivity ................................................51 Gambar 4.13 Tampilan Menu Login ......................................................................51 Gambar 4.14 Tampilan Menu Product ..................................................................52 Gambar 4.15 Tampilan Sub Menu Categories Product ........................................52 Gambar 4.16 Potongan Kode Class ListBarang ....................................................53 Gambar 4.17 Tampilan List Product ......................................................................54 Gambar 4.18 Tampilan Informasi Barang .............................................................54 Gambar 4.19 Potongan Source Code Class ListBarang ........................................56 Gambar 4.20 Tampilan Menu Cart ........................................................................57 Gambar 4.21 Potongan Source Code Class Cart ...................................................58 Gambar 4.22 Tampilan Kotak Dialog Quantity .....................................................59 Gambar 4.23 Tampilan Menu Cart yang telah terupdate .......................................59 Gambar 4.24 Potongan Source Code Class CartListAdapter ................................60 Gambar 4.25 Tampilan Form Konfirmasi Pemesanan ..........................................61 Gambar 4.26 Tampilan Form Pilih Minimarket ....................................................61 Gambar 4.27 Tampilan Form Pilih Minimarket Sendiri........................................62 Gambar 4.28 Tampilan Form IPAYMU ................................................................62 Gambar 4.29 Potongan Source Code Form Konfirmasi Pemesanan .....................63 Gambar 4.30 Potongan Source Code Form Pilih Minimarket ...............................63 Gambar 4.31 Potongan Source Code Form IPAYMU ..........................................64 Gambar 4.32 Tampilan Menu Mapping .................................................................64 Gambar 4.33 Potongan Source Code Class Mapping ............................................65 Gambar 4.34 Tampilan Menu History ...................................................................65
viii
DAFTAR TABEL Tabel 3.1 Users ......................................................................................................37 Tabel 3.2 Barang ....................................................................................................37 Tabel 3.3 Transaksi ................................................................................................38 Tabel 3.4 Detail_Transaksi ....................................................................................38 Tabel 4.1 Tabel Pengujian Sistem..........................................................................66
ix
DAFTAR PUSTAKA [1]
Putra, Akbar Nuzul., Tambunan, Toufa D., Ramadhan, Kurniawan Nur. (2012). Aplikasi Wisata Kota BandungMenggunakan Metode LocationBased Services (LBS) pada Android. Bandung: Politeknik Telkom Bandung.
[2]
Amela, Dea., Sustyo Prakoso, Alsolendski., Putra Meisyenda, Eka. (2012). Analisa dan Perancangan Aplikasi E-Market dengan Location Searching dan Sistem Tracking Menggunakan Google Maps Pada Platform Android. Jakarta: Binus University.
[3]
Ferinata, A., Nugraha, A., & Setiawan, H. (2010). Perancangan dan Implementasi Aplikasi Mobile Bandung Guidance Berbasis Teknologi Location Based Service Menggunakan Platform BlackBerry. 14.
[4]
Ardiansyah.
(2011).
Mengenal
Location
Based
Service
(LBS).
(http://blog.uad.ac.id/ardi/2011/04/04/mengenal-location-based-servicelbs/, diakses tanggal 21 Desember 2012). [5]
Simon, Darwin., Edwin, Samuel., Anggawijaya, Jhonson., Lina Prasetyo, Yen. (2012). Pengembangan Aplikasi Supermarket Online Pada Platform Android dan iOS. Jakarta: Binus University.
[6]
Tiiyawulan.
(2012).
Waterfall,
Prototype,
Incremental.
(http://tiiyawulaan.blogspot.com/2012/11/waterfall-prototypeincremental.html. Diakses pada tanggal 25 November 2012). [7]
Wahyono Sri Widadi, Mochammad., Tarigan, A. (2012). Aplikasi LBS (Location Based Service) Berbasis Android Untuk Menentukan Lokasi Toko Beserta Jarak dan Promosi. Universitas Gunadarma.
[8]
Nur Hidayat, Agus., Aditya Muhammad, Noval., Suryotrisongko, Hatma. (2012). Integrasi Aplikasi Android dan Komputer Server sebagai Solusi Mobile Commerce dan CRM Studi Kasus Toko Game XYZ. Makalah disajikan dalam Seminar Nasional Teknologi Informasi & Komunikasi Terapan 2012 (Semantik 2012), Semarang 23 Juni 2012.
[9]
Supriyanto, Antok., Bre Sukma Kirana. (2008). Sistem Informasi Manajemen Pemesanan Makanan Cepat Saji Melalui Internet Dengan
x
Multi Outlet. Makalah disajikan dalam Seminar Nasional Informatika 2008 (semnasIF 2008), Yogyakarta 24 Mei 2008. [10]
Putra, Muhammad Iqbal Merdeka Eka. (2012). Aplikasi Ponsel Berbasis Android Untuk Penjualan Pada Kios Eceran Q-Mono Flower. Yogyakarta: Amikom.
[11]
Ghifary, Muhammad. (2011). Pemodelan dan Implementasi Antarmuka Web Services Sistem Informasi UNPAR. Bandung: UNPAR.
[12]
Sari, Olga Ceria. (2011). Perancangan Dan Pembuatan Aplikasi Untuk Pencarian Web Service Menggunakan Lucene. Surabaya: Institut Teknologi Sepuluh Nopember.
[13]
Hidayatullah, Syarif. (2011). Aplikasi Location Based Service Stasiun Pengisian Bahan Bakar Umum Terdekat Di Kota Depok Berbasis Android Dengan Menggunakan Eclipse Galileo. Depok: Universitas Gunadarma.
xi