By The Name of Allah. The Islamic University of Gaza Faculty of Engineering Computer Department Final Exam. Mobile Computing

Similar documents
Basic GUI elements - exercises

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

THE CATHOLIC UNIVERSITY OF EASTERN AFRICA A. M. E. C. E. A

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

Java Training Center - Android Application Development

Android App Development

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism

ANDROID SYLLABUS. Advanced Android

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

TextView. A label is called a TextView. TextViews are typically used to display a caption TextViews are not editable, therefore they take no input

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

Lab 1: Getting Started With Android Programming

Hello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial

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

Android Programming (5 Days)

Starting Another Activity Preferences

Embedded Systems Programming - PA8001

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

Mobile Programming Lecture 7. Dialogs, Menus, and SharedPreferences

Android Beginners Workshop

Android OA Android Application Engineer(R) Certifications Basic.

INTRODUCTION TO ANDROID

Accelerating Information Technology Innovation

Syllabus- Java + Android. Java Fundamentals

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

Figure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard.

MC Android Programming

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

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

Introduction To Android

MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs

Manifest.xml. Activity.java

Android HelloWorld - Example. Tushar B. Kute,

Mobile Application Development

Java & Android. Java Fundamentals. Madis Pink 2016 Tartu

Android Application Development Course 28 Contact Hours

Android Online Training

Mobile Programming Lecture 2. Layouts, Widgets, Toasts, and Event Handling

Agenda. The Android GUI Framework Introduction Anatomy A real word example Life cycle Findings

Practical Problem: Create an Android app that having following layouts.

Android Dialogs. Dialogs are simple visual objects that pop up and display a message or prompt for some user input.

CS 234/334 Lab 1: Android Jump Start

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

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

LECTURE 12 BROADCAST RECEIVERS

Introduction to Android Development

In this Class Mark shows you how to put applications into packages and how to run them through the command line.

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents

Android UI Development

Real-Time Embedded Systems

CSCU9YH Development with Android

CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L

Xin Pan. CSCI Fall

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Required Core Java for Android application development

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

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State

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

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

Notification mechanism

Software Development & Education Center ANDROID. Application Development

Solving an Android Threading Problem

Basic UI elements: Defining Activity UI in the code. Marco Ronchetti Università degli Studi di Trento

LECTURE 08 UI AND EVENT HANDLING

COMP4521 EMBEDDED SYSTEMS SOFTWARE

ANDROID APPS DEVELOPMENT FOR MOBILE GAME

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

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Switching UIs

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

ITG Software Engineering

Lab 1 - Setting up the User s Profile UI

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

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

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

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Mobile and Ubiquitous Computing: Android Programming (part 3)

Introduction to Android Android Smartphone Programming. Outline University of Freiburg. What is Android? Background University of Freiburg.

Embedded Systems Programming - PA8001

Android Programming Lecture 2 9/7/2011

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE)

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

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

Mobile Application Development - Android

Course Syllabus. Course Title. Who should attend? Course Description. Android ( Level 1 )

Software Engineering Large Practical: Storage, Settings and Layouts. Stephen Gilmore School of Informatics October 27, 2017

Saving application preferences

Database Lab Lab 6 DML part 3

Mobile Programming Lecture 9. Bound Services, Location, Sensors, IntentFilter

This lecture. The BrowserIntent Example (cont d)

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

COURSE SYLLABUS ANDROID. Industrial Training (4 MONTHS) PH : , Vazhoor Road Changanacherry-01.

14.1 Overview of Android

ANDROID PROGRAMS DAY 3

CSE 660 Lab 3 Khoi Pham Thanh Ho April 19 th, 2015

Android Application Model I

Interface ใน View class ประกอบด วย

else if(rb2.ischecked()) {

Transcription:

By The Name of Allah The Islamic University of Gaza Faculty of Engineering Computer Department Final Exam Dr. Aiman Ahmed Abu Samra Eng. Nour El-Deen I. Jaber Student Name ID Mark Exam Duration \ 1:30 (90 mins) Exam Date \ 8-8-2012

Question 1 : Choose the Correct answer (5 marks) 1- It is a good practice to put xml interface files in folder. a- Interface b- Layout c- Values d- Drawable 2- The registered-based virtual machine used to run Android applications on mobiles is a- Java Virtual Machine b- Google Virtual Machine c- Dalvik Virtual Machine d- Lunix 3- provide a mechanism for message-passing within and between activities a- Intents b- Broadcast Receivers c- Shared Preferences d- a+c 4- Using, application components announce that they can respond to action requests from any application installed on the device. a- Content Providers b- Intent Filters c- Broadcast receivers d- All of the above. 5- To listen for broadcasts only when the application is running we register it using a- Xml in manifest file. b- Java code. c- Xml in layout file d- a + b 6- Database queries in Android are returned as a- Resultset b- Dataset c- Cursor d- SQL table Dr. Aiman Ahmed Abu Samra 2

7- In order to share our application data with other application we use a- Intent b- Content Provider c- Database d- Manifest file 8- Considered the slowest sensor receive rate a- SensorManager.SENSOR_DELAY_FASTEST Specifies b- SensorManager.SENSOR_DELAY_GAME c- SensorManager.SENSOR_DELAY_UI d- SensorManager.SENSOR_DELAY_NORMAL 9- represents the local Bluetooth device. a- BluetoothDevice b- BluetoothAdapter c- BluetoothServerSocket d- BluetoothSocket 10- You can access the WIFIManger using the getsystemservice method,passing: a- Context.WIFI_SERVICE b- Context.WIFI_MANAGER c- WifiManger.WIFI_STATE d- WIFI_STATE_CHANGED_ACTION Fill the table with your answers 1 2 3 4 5 6 7 8 9 10 Dr. Aiman Ahmed Abu Samra 3

Question 2 : Answer the following questions A- (3 marks) Assume you have two activities, the first contains a button called "go" and an EditText called "name". The second activity contains only a TextView called "result". When the button is clicked you should move to the second activity and display what's is written in the EditText on the TextView. first.java go.setonclicklistener(new OnClickListener() { public void onclick(view v) { ; second.java B- (3 marks) You have the following interface, Write a complete code to show a Toast containing text from the EditText when the button is clicked. Assume any name to the xml file, EditText xml id and button xml id. public void oncreate(bundle savedinstancestate) { Dr. Aiman Ahmed Abu Samra 4

C- (4 marks) Write a complete code to view on a TextView the value of the Light Sensor. public void oncreate(bundle savedinstancestate) { Dr. Aiman Ahmed Abu Samra 5

D- (5 marks) Debug the following code: login.java public class login extends Activity { protected void oncreate(bundle savedinstancestate) { setcontentview(r.layout.main.xml); EditText name = (TextView) findviewbyid(r.id.edittext1); Button ok = (Button) findviewbyid(r.id.button1); button1.setonclicklistener(new View.OnClickListener() { public void onclick(view v) { SharedPreferences mypref = getsharedpreferences("logshared",activity.mode_private); SharedPreferences.Editor edit = mypref.edit(); edit.putint("name", name.gettext().tostring()); startactivity(welcome.class); ); welcome.java public class welcome { protected void oncreate(bundle savedinstancestate) { setcontentview(r.layout.welcome); SharedPreferences myprefsss = getsharedpreferences("sharedlog",activity.mode_private); Toast.makeText(this, myprefsss.getstring("myname",""), Toast.LENGTH_LONG).show(); Dr. Aiman Ahmed Abu Samra 6