Universitas Sumatera Utara A-1 LISTING PROGRAM. Menu Enkripsi. package com.example.program;

Size: px
Start display at page:

Download "Universitas Sumatera Utara A-1 LISTING PROGRAM. Menu Enkripsi. package com.example.program;"

Transcription

1 A-1 LISTING PROGRAM Menu Enkripsi package com.example.program; import java.io.file; import java.io.fileinputstream; import java.io.filenotfoundexception; import java.io.fileoutputstream; import java.io.ioexception; import java.io.outputstreamwriter; import java.text.simpledateformat; import java.util.arraylist; import java.util.date; import java.util.random; import android.app.activity; import android.app.alertdialog; import android.content.activitynotfoundexception; import android.content.dialoginterface; import android.content.intent; import android.database.cursor; import android.graphics.bitmap; import android.graphics.bitmapfactory; import android.graphics.color; import android.graphics.bitmap.config; import android.graphics.drawable.bitmapdrawable; import android.net.uri; import android.os.bundle; import android.os.environment; import android.provider.mediastore; import android.util.log; import android.view.menu; import android.view.menuitem; import android.view.view; import android.widget.button; import android.widget.edittext; import android.widget.imageview; import android.widget.toast; public class Enkripsi extends Activity public int SELECT_PICTURE = 1; public String selectedimagepath; EditText nama, ukuran, kunci; ImageView img, imgxor, imgtranspos; Bitmap bmp; Button btn_pilih, btn_acak, btn_xor, btn_transpos, btn_reset, btn_save, btn_tampil; Integer x,y; ArrayList<Integer> kunci1 ; ArrayList<Integer> nilai_r = new ArrayList<Integer>(); ArrayList<Integer> nilai_g = new ArrayList<Integer>(); ArrayList<Integer> nilai_b = new ArrayList<Integer>(); ArrayList<Integer> nilai_rh = new ArrayList<Integer>(); ArrayList<Integer> nilai_gh = new ArrayList<Integer>(); ArrayList<Integer> nilai_bh = new ArrayList<Integer>(); Integer baris,kolom; String namafilekunci;

2 protected void oncreate(bundle savedinstancestate) super.oncreate(savedinstancestate); setcontentview(r.layout.enkripsi); nama = (EditText)findViewById(R.id.editText1); ukuran = (EditText)findViewById(R.id.EditText01); img = (ImageView)findViewById(R.id.imageView1); imgxor = (ImageView)findViewById(R.id.ImageView01); imgtranspos = (ImageView)findViewById(R.id.ImageView02); btn_tampil = (Button)findViewById(R.id.Buttonkunci); btn_tampil.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) File file=new File(namafilekunci); if(file.exists()) try Intent i=new Intent(Intent.ACTION_EDIT); i.setdataandtype(uri.fromfile(file),"text/plain"); startactivity(i); catch(activitynotfoundexception e) Toast.makeText(Enkripsi.this, "Proses gagal", Toast.LENGTH_LONG).show(); ); btn_pilih = (Button)findViewById(R.id.Buttonpilih); btn_pilih.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) Intent intent = new Intent(); intent.settype("image/*"); intent.setaction(intent.action_get_content); ); startactivityforresult(intent.createchooser(intent,"s elect Picture"), SELECT_PICTURE); btn_acak = (Button)findViewById(R.id.button1); btn_acak.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) kunci1 = new ArrayList<Integer>(); Random rand = new Random(); Bitmap bitmap = ((BitmapDrawable)img.getDrawable()).getBitmap(); for(int i=0; i<bitmap.getheight()*bitmap.getwidth();i++) kunci1.add(rand.nextint(256)); Toast.makeText(getBaseContext(), "Kunci Berhasil Dibuat", Toast.LENGTH_SHORT).show(); ); btn_xor = (Button)findViewById(R.id.Button03);

3 A-3 btn_xor.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) double starttime= System.currentTimeMillis(); Bitmap bitmap = ((BitmapDrawable)img.getDrawable()).getBitmap(); Bitmap hasil = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getheight(), Config.ARGB_8888); int p, R, G, B, k=0; for(int i=0; i<bitmap.getwidth();i++) for(int j=0; j<bitmap.getheight();j++) p = bitmap.getpixel(i, j); R = Color.red(p); G = Color.green(p); B = Color.blue(p); hasil.setpixel(i, j, Color.argb(255, R^kunci1.get(k), G^kunci1.get(k), B^kunci1.get(k))); k++; imgxor.setimagebitmap(hasil); double endtime= System.currentTimeMillis(); double total =(endtime-starttime)/1000; Toast.makeText(getBaseContext(), "Proses Enkripsi XOR selesai dengan waktu " + total + "s", Toast.LENGTH_SHORT).show(); ); btn_transpos = (Button)findViewById(R.id.Button02); btn_transpos.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) double starttime= System.currentTimeMillis(); Bitmap bitmap = ((BitmapDrawable)imgxor.getDrawable()).getBitmap(); Bitmap hasil = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getheight(), Config.ARGB_8888); int p, R, G, B, k=0; for(int i=0; i<bitmap.getwidth();i++) for(int j=0; j<bitmap.getheight();j++) p = bitmap.getpixel(i, j); R = Color.red(p); G = Color.green(p); B = Color.blue(p); nilai_r.add(r); nilai_g.add(g); nilai_b.add(b); nilai_rh.clear(); nilai_gh.clear(); nilai_bh.clear(); nilai_r = proses(nilai_r,1); nilai_g = proses(nilai_g,2);

4 A-4 ); nilai_b = proses(nilai_b,3); for(int i=0; i<bitmap.getwidth();i++) for(int j=0; j<bitmap.getheight();j++) hasil.setpixel(i, j, Color.argb(255, nilai_r.get(k), nilai_g.get(k), nilai_b.get(k))); k++; imgtranspos.setimagebitmap(hasil); double endtime= System.currentTimeMillis(); double total =(endtime-starttime)/1000; Toast.makeText(getBaseContext(), "Proses Enkripsi Transposisi Segitiga selesai dengan waktu " + total + "s", Toast.LENGTH_SHORT).show(); btn_reset = (Button)findViewById(R.id.Button04); btn_reset.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) img.setimageresource(r.drawable.ssss); imgxor.setimageresource(r.drawable.ssss); imgtranspos.setimageresource(r.drawable.ssss); nama.settext(""); ukuran.settext(""); ); btn_save = (Button)findViewById(R.id.Button05); btn_save.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) Bitmap bitmap = ((BitmapDrawable)imgtranspos.getDrawable()).getBitmap (); storeimage(bitmap); ); private void storeimage(bitmap image) File picturefile = getoutputmediafile(); if (picturefile == null) Log.d("ooo", "Error creating media file, check storage permissions: ");// e.getmessage()); return; try double starttime= System.currentTimeMillis(); FileOutputStream fos = new FileOutputStream(pictureFile); image.compress(bitmap.compressformat.png, 90, fos); fos.close();

5 A-5 namafilekunci = picturefile.getpath().substring(0, picturefile.getpath().length()-4) + "_k.txt"; File myfile = new File(namafilekunci); myfile.createnewfile(); FileOutputStream fout = new FileOutputStream(myFile); OutputStreamWriter myoutwriter = new OutputStreamWriter(fOut); for(int i = 0; i< kunci1.size()-1; i++) myoutwriter.append(kunci1.get(i).tostring()+"~"); myoutwriter.append(kunci1.get(kunci1.size()- 1).toString()+"\n"); myoutwriter.close(); fout.close(); String namafile = picturefile.getpath().substring(0, picturefile.getpath().length()-4) + ".txt"; myfile = new File(namafile); myfile.createnewfile(); fout = new FileOutputStream(myFile); myoutwriter = new OutputStreamWriter(fOut); for(int i = 0; i< nilai_rh.size()-1; i++) myoutwriter.append(nilai_rh.get(i).tostring()+"~"); myoutwriter.append(nilai_rh.get(nilai_rh.size()- 1).toString()+"\n"); for(int i = 0; i< nilai_gh.size()-1; i++) myoutwriter.append(nilai_gh.get(i).tostring()+"~"); myoutwriter.append(nilai_gh.get(nilai_gh.size()- 1).toString()+"\n"); for(int i = 0; i< nilai_bh.size()-1; i++) myoutwriter.append(nilai_bh.get(i).tostring()+"~"); myoutwriter.append(nilai_bh.get(nilai_bh.size()- 1).toString()+"\n"); myoutwriter.append(baris.tostring()+"\n"); myoutwriter.append(kolom.tostring()+"\n"); myoutwriter.close(); fout.close(); double endtime= System.currentTimeMillis(); double total =(endtime-starttime)/1000; Toast.makeText(this, "File Berhasil Disimpan dengan waktu " + total + "s", Toast.LENGTH_SHORT).show(); catch (FileNotFoundException e) Log.d("ooo", "File not found: " + e.getmessage()); catch (IOException e) Log.d("ooo", "Error accessing file: " + e.getmessage()); private File getoutputmediafile() File mediastoragedir = new File(Environment.getExternalStorageDirectory() + "/Pictures"); if (! mediastoragedir.exists()) if (! mediastoragedir.mkdirs()) return null; String timestamp = new SimpleDateFormat("ddMMyyyy_HHmm").format(new Date()); File mediafile; String mimagename="nur_"+timestamp +".jpg";

6 A-6 mediafile = new File(mediaStorageDir.getPath() + File.separator + mimagename); return mediafile; ArrayList<Integer> proses(arraylist<integer> temp, int x) int limit = 0, j = 1, i, row = 0, col = 0; ArrayList<Integer> temp2 = new ArrayList<Integer>(); i=0; limit = i*i; while(limit<temp.size()) i++; limit = i*i; row++; col = row + (row-1); String[][] triangle = new String[row][col]; int mid = ((col + 1) /2)-1; int idx = 0; for(i = 0; i<row; i++) for(j = mid-i; j<=mid+i; j++) if(temp.size() <= idx) triangle[i][j] = "-1"; else triangle[i][j] = temp.get(idx).tostring(); idx++; for(i=0; i<col; i++) for(j=0; j<row; j++) if(triangle[j][i]!= null && triangle[j][i]!= "-1") temp2.add(integer.parseint(triangle[j][i])); for(i=0; i<col; i++) for(j=0; j<row; j++) if(triangle[j][i]!= null) if(x==1) nilai_rh.add(integer.parseint(triangle[j][i])); else if(x==2) nilai_gh.add(integer.parseint(triangle[j][i])); else if(x==3) nilai_bh.add(integer.parseint(triangle[j][i])); baris = row; kolom = col; return temp2;

7 A-7 public void onactivityresult(int requestcode, int resultcode, Intent data) if (resultcode == RESULT_OK) if (requestcode == SELECT_PICTURE) Uri selectedimageuri = data.getdata(); selectedimagepath = getpath(selectedimageuri); nama.settext(selectedimagepath.tostring()); try File f = new File(selectedImagePath); bmp = BitmapFactory.decodeStream(new FileInputStream(f)); img.setimagebitmap(bmp); if (f.getpath().endswith(".jpeg") (f.getpath().endswith( ".jpg"))) img.setimagebitmap(bmp); else nama.settext(""); ukuran.settext(""); img.setimagebitmap(null); Toast.makeText(getBaseContext(), "Silahkan pilih gambar dengan ekstensi.jpg atau JPEG", Toast.LENGTH_SHORT).show(); x = bmp.getwidth(); y = bmp.getheight(); ukuran.settext(x.tostring()+" X "+y.tostring()); if ((bmp.getwidth() > 600) && (bmp.getheight() > 600 )) nama.settext(""); ukuran.settext(""); img.setimagebitmap(null); Toast.makeText(getBaseContext(), "silahkan pilih gambar lebih kecil dari 600 x 600 piksel", Toast.LENGTH_SHORT).show(); catch (FileNotFoundException e) e.printstacktrace(); public String getpath(uri uri) if( uri == null ) return null; String[] projection = MediaStore.Images.Media.DATA ; Cursor cursor = managedquery(uri, projection, null, null, null); if( cursor!= null ) int column_index = cursor.getcolumnindexorthrow(mediastore.images.media.d ATA); cursor.movetofirst(); String path = cursor.getstring(column_index);

8 A-8 cursor.close(); return path; return public boolean oncreateoptionsmenu(menu menu) getmenuinflater().inflate(r.menu.main, menu); return public boolean onoptionsitemselected(menuitem item) switch (item.getitemid()) case R.id.action_home: Intent home = new Intent(Enkripsi.this, MainActivity.class); this.finish(); startactivity(home); break; case R.id.action_enkripsi: Intent enkrip = new Intent(Enkripsi.this, Enkripsi.class); this.finish(); startactivity(enkrip); break; case R.id.action_help: Intent help = new Intent(Enkripsi.this, Help.class); this.finish(); startactivity(help); break; case R.id.action_dekripsi: Intent dekrip = new Intent(Enkripsi.this, Dekripsi.class); this.finish(); startactivity(dekrip); break; return super.onoptionsitemselected(item);

9 A-9 Menu Dekripsi package com.example.program; import java.io.bufferedreader; import java.io.file; import java.io.fileinputstream; import java.io.filenotfoundexception; import java.io.fileoutputstream; import java.io.filereader; import java.io.ioexception; import java.io.outputstreamwriter; import java.text.simpledateformat; import java.util.arraylist; import java.util.date; import android.app.activity; import android.content.activitynotfoundexception; import android.content.intent; import android.database.cursor; import android.graphics.bitmap; import android.graphics.bitmapfactory; import android.graphics.color; import android.graphics.bitmap.config; import android.graphics.drawable.bitmapdrawable; import android.net.uri; import android.os.bundle; import android.os.environment; import android.provider.mediastore; import android.util.log; import android.view.menu; import android.view.menuitem; import android.view.view; import android.widget.button; import android.widget.edittext; import android.widget.imageview; import android.widget.toast; public class Dekripsi extends Activity public int SELECT_PICTURE = 1; public String selectedimagepath; EditText nama, ukuran; ImageView img, imgxor, imgtranspos; Bitmap bmp; Button btn_pilih, btn_xor, btn_transpos, btn_reset, btn_save, btn_tampil; Integer x,y; ArrayList<Integer> kunci1 = new ArrayList<Integer>(); ArrayList<Integer> nilai_r = new ArrayList<Integer>(); ArrayList<Integer> nilai_g = new ArrayList<Integer>(); ArrayList<Integer> nilai_b = new ArrayList<Integer>(); ArrayList<Integer> nilai_rh = new ArrayList<Integer>(); ArrayList<Integer> nilai_gh = new ArrayList<Integer>(); ArrayList<Integer> nilai_bh = new ArrayList<Integer>(); int baris,kolom; String protected void oncreate(bundle savedinstancestate)

10 A-10 super.oncreate(savedinstancestate); setcontentview(r.layout.dekripsi); nama = (EditText)findViewById(R.id.editText1); ukuran = (EditText)findViewById(R.id.EditText01); img = (ImageView)findViewById(R.id.imageView1); imgxor = (ImageView)findViewById(R.id.ImageView02); imgtranspos = (ImageView)findViewById(R.id.ImageView01); btn_tampil = (Button)findViewById(R.id.Button06); btn_tampil.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) File file=new File(namafilekunci); if(file.exists()) try Intent i=new Intent(Intent.ACTION_EDIT); i.setdataandtype(uri.fromfile(file),"tex t/plain"); startactivity(i); catch(activitynotfoundexception e) Toast.makeText(Dekripsi.this, "error",toast.length_long).show(); ); btn_pilih = (Button)findViewById(R.id.Button01); btn_pilih.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) Intent intent = new Intent(); intent.settype("image/*"); intent.setaction(intent.action_get_content); ); startactivityforresult(intent.createchooser(in tent,"select Picture"), SELECT_PICTURE); btn_transpos = (Button)findViewById(R.id.Button03); btn_transpos.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) double starttime= System.currentTimeMillis(); Bitmap bitmap = ((BitmapDrawable)img.getDrawable()).getBitmap(); Bitmap hasil = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getheight(), Config.ARGB_8888); nilai_r = proses2(nilai_rh); nilai_g = proses2(nilai_gh); nilai_b = proses2(nilai_bh); int k=0; for(int i=0; i<bitmap.getwidth();i++)

11 A-11 ); for(int j=0; j<bitmap.getheight();j++) hasil.setpixel(i, j, Color.argb(255, nilai_r.get(k), nilai_g.get(k), nilai_b.get(k))); k++; imgtranspos.setimagebitmap(hasil); double endtime= System.currentTimeMillis(); double total =(endtime-starttime)/1000; Toast.makeText(getBaseContext(), "Proses Dekripsi Transposisi Segitiga selesai dengan waktu " + total + "s", Toast.LENGTH_SHORT).show(); btn_xor = (Button)findViewById(R.id.Button02); btn_xor.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) double starttime= System.currentTimeMillis(); Bitmap bitmap = ((BitmapDrawable)imgtranspos.getDrawable()).getBitmap(); Bitmap hasil = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getheight(), Config.ARGB_8888); int p, R, G, B, k=0; for(int i=0; i<bitmap.getwidth();i++) for(int j=0; j<bitmap.getheight();j++) p = bitmap.getpixel(i, j); R = Color.red(p); G = Color.green(p); B = Color.blue(p); hasil.setpixel(i, j, Color.argb(255, R^kunci1.get(k), G^kunci1.get(k), B^kunci1.get(k))); k++; imgxor.setimagebitmap(hasil); double endtime= System.currentTimeMillis(); double total =(endtime-starttime)/1000; Toast.makeText(getBaseContext(), "Proses Dekrip XOR selesai dengan waktu " + total + "s", Toast.LENGTH_SHORT).show(); ); btn_reset = (Button)findViewById(R.id.Button04); btn_reset.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) img.setimageresource(r.drawable.ssss); imgxor.setimageresource(r.drawable.ssss); imgtranspos.setimageresource(r.drawable.ssss); nama.settext(""); ukuran.settext("");

12 A-12 ); btn_save = (Button)findViewById(R.id.Button05); btn_save.setonclicklistener(new View.OnClickListener() public void onclick(view arg0) Bitmap bitmap = ((BitmapDrawable)imgxor.getDrawable()).getBitmap(); storeimage(bitmap); ); ArrayList<Integer> proses2(arraylist<integer> temp) int j = 1, i, row = baris, col = kolom; ArrayList<Integer> temp2 = new ArrayList<Integer>(); String[][] triangle = new String[row][col]; int mid = ((col + 1) /2)-1; int idx = 0; for(i = 0; i<col; i++) if( i >= mid) for(j = i-row+1; j<row; j++) triangle[j][i] = temp.get(idx).tostring(); idx++; else if(i<mid) for(j = row-i-1; j<row; j++) triangle[j][i] = temp.get(idx).tostring(); idx++; for(i=0; i<row; i++) for(j=0; j<col; j++) if(triangle[i][j]!= null && triangle[i][j]!= "-1") temp2.add(integer.parseint(triangle[i][j])); return temp2; public void onactivityresult(int requestcode, int resultcode, Intent data) String temp = ""; if (resultcode == RESULT_OK) if (requestcode == SELECT_PICTURE) Uri selectedimageuri = data.getdata(); selectedimagepath = getpath(selectedimageuri); temp = selectedimagepath.substring(0,selectedimagepath.length()- 4) + ".txt";

13 A-13 namafilekunci = selectedimagepath.substring(0,selectedimagepath.length()- 4) + "_k.txt"; nama.settext(selectedimagepath.tostring()); try File f = new File(selectedImagePath); bmp = BitmapFactory.decodeStream(new FileInputStream(f)); img.setimagebitmap(bmp); x = bmp.getwidth(); y = bmp.getheight(); ukuran.settext(x.tostring()+" X "+y.tostring()); catch (FileNotFoundException e) e.printstacktrace(); File file = new File(namafilekunci); try BufferedReader br = new BufferedReader(new FileReader(file)); String line; line = br.readline(); String[] tmp = line.split("~"); if(kunci1!=null) kunci1.clear(); for(int i=0; i<tmp.length; i++) kunci1.add(integer.parseint(tmp[i])); br.close(); catch (IOException e) e.printstacktrace(); file = new File(temp); try BufferedReader br = new BufferedReader(new FileReader(file)); String line; line = br.readline(); String[] tmp1 = line.split("~"); if(nilai_rh!=null) nilai_rh.clear(); for(int i=0; i<tmp1.length; i++) nilai_rh.add(integer.parseint(tmp1[i])); line = br.readline(); String[] tmp2 = line.split("~"); if(nilai_gh!=null) nilai_gh.clear(); for(int i=0; i<tmp2.length; i++)

14 A-14 nilai_gh.add(integer.parseint(tmp2[i])); line = br.readline(); String[] tmp3 = line.split("~"); if(nilai_bh!=null) nilai_bh.clear(); for(int i=0; i<tmp3.length; i++) nilai_bh.add(integer.parseint(tmp3[i])); line = br.readline(); baris = Integer.parseInt(line); line = br.readline(); kolom = Integer.parseInt(line); br.close(); Toast.makeText(this, "File Dibuka", Toast.LENGTH_LONG).show(); catch (IOException e) e.printstacktrace(); public String getpath(uri uri) if( uri == null ) return null; String[] projection = MediaStore.Images.Media.DATA ; Cursor cursor = managedquery(uri, projection, null, null, null); if( cursor!= null ) int column_index = cursor.getcolumnindexorthrow(mediastore.images.media.data) ; cursor.movetofirst(); String path = cursor.getstring(column_index); cursor.close(); return path; return uri.getpath(); private File getoutputmediafile() File mediastoragedir = new File(Environment.getExternalStorageDirectory() + "/Pictures"); if (! mediastoragedir.exists()) if (! mediastoragedir.mkdirs()) return null; String timestamp = new SimpleDateFormat("ddMMyyyy_HHmm").format(new Date()); File mediafile;

15 A-15 String mimagename="nur_"+timestamp +".jpg"; mediafile = new File(mediaStorageDir.getPath() + File.separator + mimagename); return mediafile; private void storeimage(bitmap image) File picturefile = getoutputmediafile(); if (picturefile == null) Log.d("ooo","Error creating media file, check storage permissions: "); return; try FileOutputStream fos = new FileOutputStream(pictureFile); image.compress(bitmap.compressformat.png, 90, fos); fos.close(); Toast.makeText(this, "File Berhasil Disimpan", Toast.LENGTH_SHORT).show(); catch (FileNotFoundException e) Log.d("ooo", "File not found: " + e.getmessage()); catch (IOException e) Log.d("ooo", "Error accessing file: " + public boolean oncreateoptionsmenu(menu menu) getmenuinflater().inflate(r.menu.main, menu); return public boolean onoptionsitemselected(menuitem item) switch (item.getitemid()) case R.id.action_home: Intent home = new Intent(Dekripsi.this, MainActivity.class); this.finish(); startactivity(home); break; case R.id.action_enkripsi: Intent enkrip = new Intent(Dekripsi.this, Enkripsi.class); this.finish(); startactivity(enkrip); break; case R.id.action_help: Intent help = new Intent(Dekripsi.this, Help.class); this.finish(); startactivity(help); break; case R.id.action_dekripsi: Intent dekrip = new Intent(Dekripsi.this, Dekripsi.class); this.finish(); startactivity(dekrip); break; return super.onoptionsitemselected(item);

16 B-1 I. DATA PRIBADI / Personal Identification DAFTAR RIWAYAT HIDUP CURRICULUM VITAE Nama : Nurhasanah Lengkap Tempat/ : Guntung/ 17 Oktober 1995 Tgl. Lahir Jenis Kelamin : Perempuan Agama : Islam Kebangsaan : Indonesia Alamat : Desa Empat Negri Dusun VII Kec. Lima Puluh Kab. Batu Bara Telepon : NurhasanahOktober17@gmail.com II. III. IV. KEMAMPUAN / Capabilities Bahasa Bahasa Pemrograman Database Lainnya : Bahasa Indonesia, Bahasa Inggris : C#, C++,Pascal : MySQL : HTML, Ms. Office PENDIDIKAN FORMAL / Formal Education [ ]S1 Ilmu Komputer, Fakultas Ilmu Komputer dan Teknologi Informasi [ ]MA Perguruan Cipta Simpang Dolok [ ]SMP Negeri 2 Lima Puluh [ ]SD Negeri No: PELATIHAN DAN SEMINAR / Trainings & Workshop 1) Peserta Seminar Nasional Melalui Inovasi Teknologi untuk Menciptkan Mahasiswa Kreatif dan Mandiri, [2017] 2) Peserta Seminar IMPACT Medan Success Has No Limit, [2016] 3) Peserta Workshop Bank Indonesia Goes To Campus Bersama NET., Universitas Sumatera Utara [2016] 4) Peserta Seminar Nasional Literasi Informasi (SENARAI) Fasilkom-TI Universitas Sumatera Utara [2014] 5) Peserta Seminar What Will You Be? IMILKOM [2013] V. LAINNYA / Others 1) Penerima Beasiswa Bidik Misi [ ] (CV Updated on April, 17th, 2017)

LISTING PROGRAM. com.example.jessicatamara.myapplication4;

LISTING PROGRAM. com.example.jessicatamara.myapplication4; A-1 LISTING PROGRAM MainActivity.java package import import import import import import com.example.jessicatamara.myapplication4; android.content.intent; android.support.v7.app.appcompatactivity; android.os.bundle;

More information

... 1... 2... 2... 3... 3... 4... 4... 5... 5... 6... 6... 7... 8... 9... 10... 13... 14... 17 1 2 3 4 file.txt.exe file.txt file.jpg.exe file.mp3.exe 5 6 0x00 0xFF try { in.skip(9058); catch (IOException

More information

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

@Bind(R.id.input_ ) EditText EditText Button _loginbutton; package cyborg.pantaucctv; import android.app.progressdialog; import android.content.intent; import android.os.bundle; import android.support.v7.app.appcompatactivity; import android.util.log; import android.view.view;

More information

DAFTAR RIWAYAT HIDUP

DAFTAR RIWAYAT HIDUP DAFTAR RIWAYAT HIDUP NAMA LENGKAP : RITA SIBURIAN NIM : 0613 4035 1629 TEMPAT TANGGAL LAHIR : PALEMBANG, 28 JANUAR 1995 ALAMAT : JL. TAPAK LEBAR II RT.008 KEL.SIDOREJO KEC. LUBUKLINGGAU BARAT II TELEPON

More information

LISTING CODE A-1. Indo_to_jawa_Fragments.java. package studio.arti.kamusjawaindonesia;

LISTING CODE A-1. Indo_to_jawa_Fragments.java. package studio.arti.kamusjawaindonesia; LISTING CODE A-1 Indo_to_jawa_Fragments.java package studio.arti.kamusjawaindonesia; import android.content.dialoginterface; import android.database.cursor; import android.database.sqlite.sqlitedatabase;

More information

MyDatabaseHelper. public static final String TABLE_NAME = "tbl_bio";

MyDatabaseHelper. public static final String TABLE_NAME = tbl_bio; Page 1 of 5 MyDatabaseHelper import android.content.context; import android.database.sqlite.sqliteopenhelper; class MyDatabaseHelper extends SQLiteOpenHelper { private static final String DB_NAME = "friend_db";

More information

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

Coding Menggunakan software Eclipse: Mainactivity.java (coding untuk tampilan login): package com.bella.pengontrol_otomatis; Coding Menggunakan software Eclipse: Mainactivity.java (coding untuk tampilan login): package com.bella.pengontrol_otomatis; import android.app.activity; import android.os.bundle; import android.os.countdowntimer;

More information

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

Workshop. 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking Workshop 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking 2. Create Intent with Parsing Data (Page 3 8) Making Phone Call and Dial Access Web Content Playing YouTube Video 3. Create

More information

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

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. - A dialog is a small window that prompts the user to make a decision or enter additional information. - A dialog does

More information

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

Tabel mysql. Kode di PHP. Config.php. Service.php 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;

More information

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

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 2 Workshop 1. Compare different layout by using Change Layout button (Page 1 5) Relative Layout Linear Layout (Horizontal) Linear Layout (Vertical) Frame Layout 2. Revision on basic programming skill - control

More information

Android Programs Day 5

Android Programs Day 5 Android Programs Day 5 //Android Program to demonstrate the working of Options Menu. 1. Create a New Project. 2. Write the necessary codes in the MainActivity.java to create OptionMenu. 3. Add the oncreateoptionsmenu()

More information

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

MAD ASSIGNMENT NO 3. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MAD ASSIGNMENT NO 3 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MainActivity.java File package com.example.tutorialspoint; import android.manifest;

More information

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time.

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time. A1 LISTING PROGRAM 1. Module SkripsiUmri.py import sys, operator, codecs, time class Timer(object): def init (self): self.t1= time.time() def getelapsedltime(self): # gets total elapsed from class initialsation

More information

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

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon

More information

package import import import import import import import public class extends public void super new this class extends public super public void new

package import import import import import import import public class extends public void super new this class extends public super public void new Android 2-D Drawing Android uses a Canvas object to host its 2-D drawing methods. The program below draws a blue circle on a white canvas. It does not make use of the main.xml layout but draws directly

More information

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

SMAATSDK. NFC MODULE ON ANDROID REQUIREMENTS AND DOCUMENTATION RELEASE v1.0 SMAATSDK NFC MODULE ON ANDROID REQUIREMENTS AND DOCUMENTATION RELEASE v1.0 NFC Module on Android Requirements and Documentation Table of contents Scope...3 Purpose...3 General operating diagram...3 Functions

More information

A-1. Listing Program. CariKata.java. package com.indah.kmp;

A-1. Listing Program. CariKata.java. package com.indah.kmp; A-1 Listing Program CariKata.java package com.indah.kmp; import java.io.bufferedreader; import java.io.file; import java.io.filenotfoundexception; import java.io.filereader; import java.io.ioexception;

More information

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

1 카메라 1.1 제어절차 1.2 관련주요메서드 1.3 제작철차 서피스뷰를생성하고이를제어하는서피스홀더객체를참조해야함. 매니페스트에퍼미션을지정해야한다. 1 카메라 1.1 제어절차 서피스뷰를생성하고이를제어하는서피스홀더객체를참조해야함. 매니페스트에퍼미션을지정해야한다. 1.2 관련주요메서드 setpreviewdisplay() : startpreview() : stoppreview(); onpicturetaken() : 사진을찍을때자동으로호출되며캡처한이미지가전달됨 1.3 제작철차 Step 1 프로젝트를생성한후매니페스트에퍼미션들을설정한다.

More information

LAMPIRAN A LISTING PROGRAM

LAMPIRAN A LISTING PROGRAM A-1 LAMPIRAN A LISTING PROGRAM FUNGSI public void StopWatchStart() stopwatch.reset(); stopwatch.start(); Cursor.Current = Cursors.WaitCursor; txtlog.text = ""; public void StopWatchStop(string Title) stopwatch.stop();

More information

Android File & Storage

Android File & Storage Files Lecture 9 Android File & Storage Android can read/write files from two locations: Internal (built into the device) and external (an SD card or other drive attached to device) storage Both are persistent

More information

Online Learning Application

Online Learning Application Online Learning Application Objective: It s a known fact that the Average screen sizes of our phones is increasing, thereby encouraging many to read and learn on the move. Keeping this trend in mind, you

More information

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); }

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } 59 LISTING PROGRAM Form Utama : using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation;

More information

COMP61242: Task 3 1 2/05/18

COMP61242: Task 3 1 2/05/18 COMP61242: Task 3 1 2/05/18 1. Introduction University of Manchester School of Computer Science COMP61242: Mobile Communications Semester 2: 2017-18 Laboratory Task 3 Communicating with Android Smart-phones

More information

Android Apps Development for Mobile Game Lesson Create a simple paint brush that allows user to draw something (Page 11 13)

Android Apps Development for Mobile Game Lesson Create a simple paint brush that allows user to draw something (Page 11 13) Workshop 1. Create a simple Canvas view with simple drawing (Page 1 5) Hide Action Bar and Status Bar Create Canvas View Create Simple Drawing 2. Create a simple animation (Page 6 10) Load a simple image

More information

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

Create Parent Activity and pass its information to Child Activity using Intents. Create Parent Activity and pass its information to Child Activity using Intents. /* MainActivity.java */ package com.example.first; import android.os.bundle; import android.app.activity; import android.view.menu;

More information

Arrays of Buttons. Inside Android

Arrays of Buttons. Inside Android Arrays of Buttons Inside Android The Complete Code Listing. Be careful about cutting and pasting.

More information

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i];

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i]; A-1 A LISTING PROGRAM 1. Fibonacci Code //membuat fungsi Fibonacci Code public static String GetFibonacciCode(int n) { StringBuilder fib = new StringBuilder("1"); int a, b, c; List fibs = new List();

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should

More information

B9: Việc cuối cùng cần làm là viết lại Activity. Tới Example.java và chỉnh sửa theo nội dung sau: Mã: package at.exam;

B9: Việc cuối cùng cần làm là viết lại Activity. Tới Example.java và chỉnh sửa theo nội dung sau: Mã: package at.exam; B9: Việc cuối cùng cần làm là viết lại Activity. Tới Example.java và chỉnh sửa theo nội dung sau: Mã: package at.exam; import java.util.arraylist; import android.app.activity; import android.app.alertdialog;

More information

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara A-1 LISTING PROGRAM mainform.vb Imports System.IO Public Class mainform Private Sub mainform_load(byval sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load enkripsirb.checked = True

More information

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() A- 1 LISTING PROGRAM Form1.cs (Pengirim) /* * Created by SharpDevelop. * User: Lia * Date: 3/13/2017 * Time: 9:43 PM * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

Lampiran Program : Res - Layout Activity_main.xml

More information

A-1 LAMPIRAN A LISTING PROGRAM. Kode Program Form Main: Universitas Sumatera Utara

A-1 LAMPIRAN A LISTING PROGRAM. Kode Program Form Main: Universitas Sumatera Utara A-1 LAMPIRAN A A LISTING PROGRAM Kode Program Form Main: #Region Project Attributes #ApplicationLabel: Samuel Panjaitan #VersionCode: 1 #VersionName: #SupportedOrientations: portrait #CanInstallToExternalStorage:

More information

Press project on the left toolbar if it doesn t show an overview of the app yet.

Press project on the left toolbar if it doesn t show an overview of the app yet. #3 Setting up the permissions needed to allow the app to use GPS. Okay! Press project on the left toolbar if it doesn t show an overview of the app yet. In this project plane, we will navigate to the manifests

More information

Android Coding. Dr. J.P.E. Hodgson. August 23, Dr. J.P.E. Hodgson () Android Coding August 23, / 27

Android Coding. Dr. J.P.E. Hodgson. August 23, Dr. J.P.E. Hodgson () Android Coding August 23, / 27 Android Coding Dr. J.P.E. Hodgson August 23, 2010 Dr. J.P.E. Hodgson () Android Coding August 23, 2010 1 / 27 Outline Starting a Project 1 Starting a Project 2 Making Buttons Dr. J.P.E. Hodgson () Android

More information

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

<uses-permission android:name=android.permission.internet/> Chapter 11 Playing Video 11.1 Introduction We have discussed how to play audio in Chapter 9 using the class MediaPlayer. This class can also play video clips. In fact, the Android multimedia framework

More information

Android Workshop: Model View Controller ( MVC):

Android Workshop: Model View Controller ( MVC): Android Workshop: Android Details: Android is framework that provides java programmers the ability to control different aspects of smart devices. This interaction happens through the Android SDK (Software

More information

ANN exercise session

ANN exercise session ANN exercise session In this exercise session, you will read an external file with Iris flowers and create an internal database in Java as it was done in previous exercise session. A new file contains

More information

Developing Android Applications

Developing Android Applications Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 21 October 2015 Android Lab 02 Advanced Android Features 2 Class Plan UI Elements Activities Intents Data Transfer

More information

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

MAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MAD ASSIGNMENT NO 2 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. Android Widgets There are given a lot of android widgets with simplified

More information

Appendix A : Android Studio Code For Android

Appendix A : Android Studio Code For Android Appendix A : Android Studio Code For Android Monitoring : ` public Pubnub pubnub; public static final String PUBLISH_KEY = "pub-c-798bd0f6-540b-48af-9e98-7d0028a5132a"; public static final String SUBSCRIBE_KEY

More information

Autonomous Configuration UI

Autonomous Configuration UI Autonomous Configuration UI The Autonomous Configuration tool is an Android app developed by Team 4106 to configure the robot s autonomous settings on the fly. Using the apps removes the need to recompile

More information

Basic GUI elements - exercises

Basic GUI elements - exercises Basic GUI elements - exercises https://developer.android.com/studio/index.html LIVE DEMO Please create a simple application, which will be used to calculate the area of basic geometric figures. To add

More information

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

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

More information

Eng. Jaffer M. El-Agha Android Programing Discussion Islamic University of Gaza. Data persistence

Eng. Jaffer M. El-Agha Android Programing Discussion Islamic University of Gaza. Data persistence Eng. Jaffer M. El-Agha Android Programing Discussion Islamic University of Gaza Data persistence Shared preferences A method to store primitive data in android as key-value pairs, these saved data will

More information

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

Create a local SQL database hosting a CUSTOMER table. Each customer includes [id, name, phone]. Do the work inside Threads and Asynctasks. CIS 470 Lesson 13 Databases - Quick Notes Create a local SQL database hosting a CUSTOMER table. Each customer includes [id, name, phone]. Do the work inside Threads and Asynctasks. package csu.matos; import

More information

Data Persistence. Chapter 10

Data Persistence. Chapter 10 Chapter 10 Data Persistence When applications create or capture data from user inputs, those data will only be available during the lifetime of the application. You only have access to that data as long

More information

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr.

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr. Kode Program Form Home namespace SkripsiLagi public partial class Form9 : Form public Form9() LISTING PROGRAM private void filetoolstripmenuitem_click(object sender, EventArgs e) Form2 fr = new Form2();

More information

PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE)

PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE) PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE) Network Connection Web Service K Candra Brata andra.course@gmail.com Mobille App Lab 2015-2016 Network Connection http://developer.android.com/training/basics/network-ops/connecting.html

More information

Android Hide Title Bar Example. Android Screen Orientation Example

Android Hide Title Bar Example. Android Screen Orientation Example igap Technologies 1 if(!activitycompat.shouldshowrequestpermissionrationale(this, Manifest.permission.READ_CONTACTS)) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_CONTACTS,

More information

LAMPIRAN PROGRAM. public class Listdata_adiktif extends ArrayAdapter<ModelData_adiktif> {

LAMPIRAN PROGRAM. public class Listdata_adiktif extends ArrayAdapter<ModelData_adiktif> { 1 LAMPIRAN PROGRAM JAVA Listdata_adiktif.java package com.example.win.api.adapter; import android.content.context; import android.support.annotation.nonnull; import android.view.layoutinflater; import

More information

Android Media. Pro. Developing Graphics, Music, Video and Rich Media Apps for Smartphones and Tablets

Android Media. Pro. Developing Graphics, Music, Video and Rich Media Apps for Smartphones and Tablets Utilize the Android media APIs to create dynamic mobile apps Pro Android Media Developing Graphics, Music, Video and Rich Media Apps for Smartphones and Tablets Shawn Van Every Pro Android Media Developing

More information

I/O STREAM (REQUIRED IN THE FINAL)

I/O STREAM (REQUIRED IN THE FINAL) I/O STREAM (REQUIRED IN THE FINAL) STREAM A stream is a communication channel that a program has with the outside world. It is used to transfer data items in succession. An Input/Output (I/O) Stream represents

More information

Manifest.xml. Activity.java

Manifest.xml. Activity.java Dr.K.Somasundaram Ph.D Professor Department of Computer Science and Applications Gandhigram Rural Institute, Gandhigram, Tamil Nadu-624302, India ka.somasundaram@gmail.com Manifest.xml

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM 46 LAMPIRAN A : LISTING PROGRAM 1. Mainform /* * Created by SharpDevelop. * User: User7 * Date: 28/09/2015 * Time: 9:38 * * To change this template use Tools Options Coding Edit Standard Headers. */ using

More information

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

POCKET STUDY. Divyam Kumar Mishra, Mrinmoy Kumar Das Saurav Singh, Prince Kumar POCKET STUDY Divyam Kumar Mishra, Mrinmoy Kumar Das Saurav Singh, Prince Kumar 1 Under Graduate Student, Department of Computer Science and Engineering, SRM University, Chennai, India 2 Under Graduate

More information

ANDROID PROGRAMS DAY 3

ANDROID PROGRAMS DAY 3 ANDROID PROGRAMS DAY 3 //Android project to navigate from first page to second page using Intent Step 1: Create a new project Step 2: Enter necessary details while creating project. Step 3: Drag and drop

More information

Android/Java Lightning Tutorial JULY 30, 2018

Android/Java Lightning Tutorial JULY 30, 2018 Android/Java Lightning Tutorial JULY 30, 2018 Java Android uses java as primary language Resource : https://github.mit.edu/6178-2017/lec1 Online Tutorial : https://docs.oracle.com/javase/tutorial/java/nutsandbolts/inde

More information

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

1. Location Services. 1.1 GPS Location. 1. Create the Android application with the following attributes. Application Name: MyLocation 1. Location Services 1.1 GPS Location 1. Create the Android application with the following attributes. Application Name: MyLocation Project Name: Package Name: MyLocation com.example.mylocation 2. Put

More information

Writing and reading files

Writing and reading files Writing and reading files Adaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University. Portions of this page are reproduced from work created

More information

Lampiran 2 MASTER TABEL

Lampiran 2 MASTER TABEL 64 Lampiran 2 MASTER TABEL No. No. Responden Umur Pendidikan Pekerjaan Paritas Kanker 1 427363 35 S1 PNS 4 Tidak 2 504024 36 SMA IRT 4 Tidak 3 500316 35 SMA IRT 5 Tidak 4 504014 35 SMA PNS 1 Tidak 5 447158

More information

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah. Islamic University of Gaza Faculty of Engineering Computer Engineering Department Mobile Computing ECOM 5341 By Eng. Wafaa Audah July 2013 1 Launch activitits, implicit intents, data passing & start activity

More information

shared objects monitors run() Runnable start()

shared objects monitors run() Runnable start() Thread Lecture 18 Threads A thread is a smallest unit of execution Each thread has its own call stack for methods being invoked, their arguments and local variables. Each virtual machine instance has at

More information

public AnimLayer(Context context, AttributeSet attrs, int defstyle) { super(context, attrs, defstyle); initlayer(); }

public AnimLayer(Context context, AttributeSet attrs, int defstyle) { super(context, attrs, defstyle); initlayer(); } AnimLayer.java package com.kyindo.game; import java.util.arraylist; import java.util.list; import android.content.context; import android.util.attributeset; import android.view.view; import android.view.animation.animation;

More information

TextView Control. EditText Control. TextView Attributes. android:id - This is the ID which uniquely identifies the control.

TextView Control. EditText Control. TextView Attributes. android:id - This is the ID which uniquely identifies the control. A TextView displays text to the user. TextView Attributes TextView Control android:id - This is the ID which uniquely identifies the control. android:capitalize - If set, specifies that this TextView has

More information

Introduction to Android Multimedia

Introduction to Android Multimedia Introduction to Android Multimedia CS 436 Software Development on Mobile By Dr.Paween Khoenkaw Android Intent Intent,Intent-filter What is Intent? -Intent is a message sent from one program to another

More information

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1); LISTING PROGRAM FORM PERTAMA : function varargout = pertama(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @pertama_openingfcn,...

More information

Terms: MediaPlayer, VideoView, MediaController,

Terms: MediaPlayer, VideoView, MediaController, Terms: MediaPlayer, VideoView, MediaController, Sisoft Technologies Pvt Ltd SRC E7, Shipra Riviera Bazar, Gyan Khand-3, Indirapuram, Ghaziabad Website: www.sisoft.in Email:info@sisoft.in Phone: +91-9999-283-283

More information

Listing Progam. Universitas Sumatera Utara

Listing Progam. Universitas Sumatera Utara 60 Listing Progam Listing Program Tabel Index

More information

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara A-1 LISTING PROGRAM 1. Form1.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using IronPython.Hosting; using Microsoft.Scripting;

More information

Dinabandhu Andrews Institute of Technology & Management. Affiliated to : Maulana Abul Kalam Azad University of Technology

Dinabandhu Andrews Institute of Technology & Management. Affiliated to : Maulana Abul Kalam Azad University of Technology Dinabandhu Andrews Institute of Technology & Management Affiliated to : Maulana Abul Kalam Azad University of Technology 1 STUDENT MANAGEMENT SYSTEM Presented by: Nilotpal Bose Sayantika Roy Subhojit Kundu

More information

ABSTRACT. As technology improves, the world of mobile devices has been continuously

ABSTRACT. As technology improves, the world of mobile devices has been continuously ABSTRACT As technology improves, the world of mobile devices has been continuously progressing. Mobile devices are getting more powerful and functional, providing endless opportunities to create diverse

More information

else if(rb2.ischecked()) {

else if(rb2.ischecked()) { Problem :Toy Calculator Description:Please design an Android application that contains 2 activities: cal_main and cal_result. The following figure is a suggested layout for the cal_main activity. For the

More information

CS Programming I: File Input / Output

CS Programming I: File Input / Output CS 200 - Programming I: File Input / Output Marc Renault Department of Computer Sciences University of Wisconsin Madison Fall 2017 TopHat Sec 3 (PM) Join Code: 719946 TopHat Sec 4 (AM) Join Code: 891624

More information

// MainActivity.java ; Noah Spenser; Senior Design; Diabetic Breathalyzer

// MainActivity.java ; Noah Spenser; Senior Design; Diabetic Breathalyzer // MainActivity.java ; Noah Spenser; Senior Design; Diabetic Breathalyzer package com.noahspenser.seniordesign; import android.os.parcel; import android.os.parcelable; import android.support.v7.app.appcompatactivity;

More information

Overview. Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework

Overview. Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework Implicit Intents Overview Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework Intents Intent asynchronous message used to activate one Android component

More information

Knox Manage manages the following application types: Internal applications: Applications for internal use

Knox Manage manages the following application types: Internal applications: Applications for internal use 15 Applications Knox Manage manages the following application types: Internal applications: Applications for internal use Public applications: Applications that are deployed through Google's Play Store

More information

FIFO PAGE REPLACEMENT : import java.io.*; public class FIFO {

FIFO PAGE REPLACEMENT : import java.io.*; public class FIFO { FIFO PAGE REPLACEMENT : import java.io.*; public class FIFO public static void main(string[] args) throws IOException BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int frames,

More information

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this.

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this. A - 1 LISTING PROGRAM 1. Form Menu Utama using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; namespace KompresiCitra / / Description of MainForm.

More information

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

ITU- FAO- DOA- TRCSL. Training on. Innovation & Application Development for E- Agriculture. Shared Preferences ITU- FAO- DOA- TRCSL Training on Innovation & Application Development for E- Agriculture Shared Preferences 11 th - 15 th December 2017 Peradeniya, Sri Lanka Shahryar Khan & Imran Tanveer, ITU Experts

More information

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license Android Android Mobile operating system developed by Google A complete stack OS, framework A rich set of applications Email, calendar, browser, maps, text messaging, contacts, camera, dialer, music player,

More information

Steps: First install hadoop (if not installed yet) by, https://sl6it.wordpress.com/2015/12/04/1-study-and-configure-hadoop-for-big-data/

Steps: First install hadoop (if not installed yet) by, https://sl6it.wordpress.com/2015/12/04/1-study-and-configure-hadoop-for-big-data/ SL-V BE IT EXP 7 Aim: Design and develop a distributed application to find the coolest/hottest year from the available weather data. Use weather data from the Internet and process it using MapReduce. Steps:

More information

Android writing files to the external storage device

Android writing files to the external storage device Android writing files to the external storage device The external storage area is what Android knows as the SD card. There is a virtual SD card within the Android file system although this may be of size

More information

1. Simple List. 1.1 Simple List using simple_list_item_1

1. Simple List. 1.1 Simple List using simple_list_item_1 1. Simple List 1.1 Simple List using simple_list_item_1 1. Create the Android application with the following attributes. Application Name: MySimpleList Project Name: Package Name: MySimpleList com.example.mysimplelist

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 4: WebView (Part 2) Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 4: WebView (Part 2) Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 4: WebView (Part 2) Emmanuel Agu WebView Widget WebView Widget A View that displays web pages Can be used for creating your own web browser OR just display

More information

Exception Handling CSCI 201 Principles of Software Development

Exception Handling CSCI 201 Principles of Software Development Exception Handling CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline Program USC CSCI 201L 2/19 Exception Handling An exception is an indication of a problem

More information

Lecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming

Lecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming University of Babylon College of Information Technology Department of Information Networks Mobile Fundamentals and Programming Lecture 7: Data Persistence : shared preferences Lecturer : Ali Kadhim Al-Bermani

More information

An Android Studio SQLite Database Tutorial

An Android Studio SQLite Database Tutorial An Android Studio SQLite Database Tutorial Previous Table of Contents Next An Android Studio TableLayout and TableRow Tutorial Understanding Android Content Providers in Android Studio Purchase the fully

More information

CS Programming I: File Input / Output

CS Programming I: File Input / Output CS 200 - Programming I: File Input / Output Marc Renault Department of Computer Sciences University of Wisconsin Madison Spring 2018 TopHat Sec 3 (AM) Join Code: 427811 TopHat Sec 4 (PM) Join Code: 165455

More information

TUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION

TUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION TUTOR FINDER APP REPORT OF MAJOR PROJECT SUBMITTED FOR PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTERS OF COMPUTER APPLICATION BISHAL MANDAL REGISTRATION NO: 151170510014 of 2015-2016

More information

VAMK ANDROID APPLICATION

VAMK ANDROID APPLICATION Richard Adeyeye VAMK ANDROID APPLICATION Technology and Communication 2014 VAASAN AMMATTIKORKEAKOULU UNIVERSITY OF APPLIED SCIENCES Degree Program in Information Technology ABSTRACT Author Adeyeye Richard

More information

Android Services. Victor Matos Cleveland State University. Services

Android Services. Victor Matos Cleveland State University. Services 22 Android Victor Matos Cleveland State University Notes are based on: Android Developers http://developer.android.com/index.html 22. Android Android A Service is an application component that runs in

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. Form Utama (Cover) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;

More information

Android SQLite Database Tutorial - CRUD Operations

Android SQLite Database Tutorial - CRUD Operations Android SQLite Database Tutorial - CRUD Operations by Kapil - Monday, March 21, 2016 http://www.androidtutorialpoint.com/storage/android-sqlite-database-tutorial/ YouTube Video Android SQLite Introduction

More information

Mobile Computing Practice # 2d Android Applications Local DB

Mobile Computing Practice # 2d Android Applications Local DB Mobile Computing Practice # 2d Android Applications Local DB In this installment we will add persistent storage to the restaurants application. For that, we will create a database with a table for holding

More information

LUCENE - ADD DOCUMENT OPERATION

LUCENE - ADD DOCUMENT OPERATION LUCENE - ADD DOCUMENT OPERATION http://www.tutorialspoint.com/lucene/lucene_adddocument.htm Copyright tutorialspoint.com Add document is one of the core operation as part of indexing process. We add Documents

More information