Tabel mysql. Kode di PHP. Config.php. Service.php

Similar documents
<uses-permission android:name="android.permission.internet" />

Coding Menggunakan software Eclipse: Mainactivity.java (coding untuk tampilan login): package com.bella.pengontrol_otomatis;

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Switching UIs

Android - JSON Parser Tutorial

LAMPIRAN. byte bcdtodec(byte val) { return( (val/16*10) + (val%16) ); } void setup() {

CSE 660 Lab 7. Submitted by: Arumugam Thendramil Pavai. 1)Simple Remote Calculator. Server is created using ServerSocket class of java. Server.

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop

MAD ASSIGNMENT NO 3. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.

Android Programs Day 5

Multiple Activities. Many apps have multiple activities

Fragment Example Create the following files and test the application on emulator or device.

Create Parent Activity and pass its information to Child Activity using Intents.

Android Application Development. By : Shibaji Debnath

PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE)

COMP61242: Task /04/18

Intents. Your first app assignment

1 카메라 1.1 제어절차 1.2 관련주요메서드 1.3 제작철차 서피스뷰를생성하고이를제어하는서피스홀더객체를참조해야함. 매니페스트에퍼미션을지정해야한다.

Mobile Development Lecture 9: Android & RESTFUL Services

LifeStreet Media Android Publisher SDK Integration Guide

Basic GUI elements - exercises

<uses-permission android:name="android.permission.internet"/>

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

@Bind(R.id.input_ ) EditText EditText Button _loginbutton;

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.

IPN-ESCOM Application Development for Mobile Devices. Extraordinary. A Web service, invoking the SOAP protocol, in an Android application.

Manifest.xml. Activity.java

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Getting Started With Android Feature Flags

PROGRAMMING APPLICATIONS DECLARATIVE GUIS

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android.

Accelerating Information Technology Innovation

EMBEDDED SYSTEMS PROGRAMMING Android Services

Our First Android Application

Software Practice 3 Before we start Today s lecture Today s Task Team organization

Create a local SQL database hosting a CUSTOMER table. Each customer includes [id, name, phone]. Do the work inside Threads and Asynctasks.


Mobile Software Development for Android - I397

EMBEDDED SYSTEMS PROGRAMMING Application Basics

Workshop. 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking

05. RecyclerView and Styles

Android/Java Lightning Tutorial JULY 30, 2018

MATLAB Production Server Interface for TIBCO Spotfire. Software. Reference Architecture

Android Navigation Drawer for Sliding Menu / Sidebar

1. Location Services. 1.1 GPS Location. 1. Create the Android application with the following attributes. Application Name: MyLocation

M.A.D Assignment # 1

Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB)

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

SMAATSDK. NFC MODULE ON ANDROID REQUIREMENTS AND DOCUMENTATION RELEASE v1.0

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State

Mobile Programming Practice Background processing AsynTask Service Broadcast receiver Lab #5

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2

MAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.

EMBEDDED SYSTEMS PROGRAMMING UI Specification: Approaches

POCKET STUDY. Divyam Kumar Mishra, Mrinmoy Kumar Das Saurav Singh, Prince Kumar

Dynamically Create Admob Banner and Interstitial Ads

Mobile Application Development MyRent Settings

CS 193A. Multiple Activities and Intents

ITU- FAO- DOA- TRCSL. Training on. Innovation & Application Development for E- Agriculture. Shared Preferences

Introduction to Android Development

Android JSON Parsing Tutorial

EMBEDDED SYSTEMS PROGRAMMING Android NDK

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Android UI Development

Learn about Android Content Providers and SQLite

Android Workshop: Model View Controller ( MVC):

Android Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr.

ANDROID PHONE KEY MICHAEL WONG POH HONG

Arrays of Buttons. Inside Android

Simple Currency Converter

StoppUhr. <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="start1"

Action Bar. (c) 2010 Haim Michael. All Rights Reserv ed.

ANDROID PROGRAMS DAY 3


EMBEDDED SYSTEMS PROGRAMMING Android NDK

Mobila applikationer och trådlösa nät, HI1033, HT2013

Android Application Model I

Data Persistence. Chapter 10

else if(rb2.ischecked()) {

Tip Calculator. xmlns:tools=" android:layout_width="match_parent"

Android Application development for importing Vehicles to Ethiopia Tracking system. Zekir Ahmed Awol

Appendix A : Android Studio Code For Android

1. Simple List. 1.1 Simple List using simple_list_item_1

LAMPIRAN. public class MainActivity extends AppCompatActivity {

A Crash Course to Android Mobile Platform

android-espresso #androidespresso

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering

Android File & Storage

Notification mechanism

2.2 IoT Internet of Things Android Studio

Group B: Assignment No 8. Title of Assignment: To verify the operating system name and version of Mobile devices.

Mobile Application Development

Android Service. Lecture 19

Software Practice 3 Today s lecture Today s Task Porting Android App. in real device

Vienos veiklos būsena. Theory

M.A.D ASSIGNMENT # 2 REHAN ASGHAR BSSE 15126

Action Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps.

Android Tutorial: Part 3

Meniu. Create a project:

An Overview of the Android Programming

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

Transcription:

Tabel mysql Kode di PHP Config.php Service.php

Layout Kode di Main Activity package com.example.mini.webandroid; import android.app.progressdialog; import android.os.asynctask; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.text.method.scrollingmovementmethod; import android.view.menu; import android.view.menuitem; import android.view.view;

import android.widget.button; import android.widget.textview; import org.json.jsonobject; import java.io.bufferedreader; import java.io.inputstreamreader; import java.net.httpurlconnection; import java.net.url; public class MainActivity extends AppCompatActivity implements View.OnClickListener { public static final String MY_JSON ="MY_JSON"; private static final String JSON_URL = "http://10.0.2.2:8080/androidpenjualan/service.php"; private TextView textviewjson; private Button buttonget; private Button buttonparse; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); textviewjson = (TextView) findviewbyid(r.id.textviewjson); textviewjson.setmovementmethod(new ScrollingMovementMethod()); buttonget = (Button) findviewbyid(r.id.buttonget); buttonparse = (Button) findviewbyid(r.id.buttonparse); buttonget.setonclicklistener(this); buttonparse.setonclicklistener(this); private void getdata(string url) { class GetDataJSON extends AsyncTask<String, Void, String> { ProgressDialog loading; protected void onpreexecute() { super.onpreexecute(); loading = ProgressDialog.show(MainActivity.this, "Please Wait...", null, true, true); protected String doinbackground(string... params) { String uri = params[0]; BufferedReader bufferedreader = null; try { URL url = new URL(uri); HttpURLConnection con = (HttpURLConnection) url.openconnection(); StringBuilder sb = new StringBuilder(); bufferedreader = new BufferedReader(new InputStreamReader(con.getInputStream())); String json; JSONObject object = null; while((json = bufferedreader.readline())!= null){ sb.append(json+"\n");

return sb.tostring().trim(); //return object.tostring(); catch(exception e){ System.out.println(e.toString()); return null; protected void onpostexecute(string s) { super.onpostexecute(s); loading.dismiss(); textviewjson.settext(s); GetDataJSON gj = new GetDataJSON(); gj.execute(url); public boolean oncreateoptionsmenu(menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getmenuinflater().inflate(r.menu.menu_main, menu); return true; public boolean onoptionsitemselected(menuitem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getitemid(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; return super.onoptionsitemselected(item); public void onclick(view v) { if(v==buttonget){ getdata(json_url); if(v==buttonparse){ showparseactivity(); private void showparseactivity() { //Intent intent = new Intent(this, ParseJSON.class); //intent.putextra(my_json,textviewjson.gettext().tostring()); //startactivity(intent);

Kode di Manifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.mini.webandroid" > <uses-permission android:name="android.permission.internet"/> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".mainactivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application> </manifest>