0% found this document useful (0 votes)
258 views70 pages

Android Project

This document summarizes a project report submitted by Shweta Dubey for their minor project on creating an Android application. The project was completed under the supervision of Santu Purkait at Netcamp Solutions Private Limited. The project involved learning to develop an application in Android and creating a database application that allows users to create an ID and access programs like a calculator, music player, camera, quiz, web browser and light sensor. The student acknowledges the guidance provided by Santu Purkait and Netcamp in completing the project.

Uploaded by

shweta dubey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
258 views70 pages

Android Project

This document summarizes a project report submitted by Shweta Dubey for their minor project on creating an Android application. The project was completed under the supervision of Santu Purkait at Netcamp Solutions Private Limited. The project involved learning to develop an application in Android and creating a database application that allows users to create an ID and access programs like a calculator, music player, camera, quiz, web browser and light sensor. The student acknowledges the guidance provided by Santu Purkait and Netcamp in completing the project.

Uploaded by

shweta dubey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 70

ANDROID PROJECT

PROJECT ALMANAC
Submitted By :
SHWETA DUBEY NETCAMP SUMMER TRAINNING
22190106 HRIT CAMPUS
:

CERTIFICATE
This is to Certify that this minor-project report “PROJECT
ALMANAC” based on ANDROID is submitted by SHWETA
DUBEY who carried out this project work under my supervision.
I approve this project for submission in the Bachelor of
Engineering & technology in the
Department of Computer Science & Engineering.

Affiliation
Mr. Santu Purkait
Director
Netcamp Solutions Private Limited
ACKNOWLEDGEMENT

It gives me immense pleasure to express my deepest sense of gratitude


and sincere thanks to my highly respected and esteemed guideSANTU
PURKAIT, NETCAMP, for their valuable guidance, encouragement and
help for completing this work. Their useful suggestions for this whole
work and co-operative behavior are sincerely acknowledged.

I would like to express my sincere thanks to SANTU PURKAIT, Director


(NETCAMP) giving me this opportunity to undertake this project.

I also wish to express my indebtedness to my parents as well as my family


member whose blessings and support always helped me to face the
challenges ahead.
At the end I would like to express my sincere thanks to all my friends and
others who helped me directly or indirectly during this project work.

Place: HRIT Ghaziabad Student Name: -


Date: 15/07/2019 SHWETA DUBEY
Abstract
Our topic for this training was to learn how to create an application in
android, the Google operating system for mobile devices. The design of
such an application is made in slightly modified Java. The purpose of the
final application is to help students to enhance their knowledge and
implement whatever they have learned. It is a system of databases that
allows the user to create their own id and use the given applications in it.
So I also used my knowledge of databases during my training.
This training allowed me to increase my knowledge in Java and Android,
the languages in which we had many difficulties, and also met a
wonderful people who made this training really enriching for me.
INTRODUCTION
Motivation:

As part of our AKTU (APJ Abdul Kalam Technical University), in the 4th
semester Training is required. We can either do it in company, or in a
university (domestic or abroad). This is the option I chose when the
opportunity was given to me .
So it is in the NETCAMP, IPEC Ghaziabad there I did my training. I was
under the tutelage of Mr. SANTU PURKAIT , Director (NETCAMP)
who offered me a project to do on an android application. Android is an
operating system for mobile devices.

OVERVIEW/OBJECTIVE:
This project was conducted in two stages: the first is to familiarize myself
with the development in android (development tools, coding
instructions, setting up the display). For the first part of my project, I
needed a topic that can be useful and accessible for me because of my
low skills in Java. Mr. SANTU proposed the idea of a mobile application to
create a app related to database and the authorized user can use its
programs. The application is consisting of a database that any student
can use it by signing up in it. In the second step the app consist of
calculator, music player, camera, quiz, web browser, light censor. These
all features and programs are included inside this application which can
be used by the users.
Improvement

I intend to improve the application once that when my training is ended,


because there was lack of time to finish this application, and so the
graphics are quite neglected. I also wish to add some more features to
my application which will be done as soon as I learn new topics in
android.
Contents

Acknowledgements.........................................................................................................................3

Abstract............................................................................................................................................4

Introdution.......................................................................................................................................5

My project: How to create Android application.............................................................................8

1.1 Android................................................................................................................................8
1.1.1 What is android?...............................................................................................................8
1.1.2 Specifications:...................................................................................................................8
1.1.3Characteristic of the market: ............................................................................................9
1.1.4. Why Android is better?....................................................................................................11

1.2 First project : .......................................................................................................................13


1.2.1 The basics of creating applications..................................................................................14
1.2.2 The project.......................................................................................................................16
1.2.3 Improvements .................................................................................................................68

2. What did I learn?....................................................................................................................69


2.1. Technicaly...........................................................................................................................69
2.2. Humanly..............................................................................................................................69

Conclusion........................................................................................................................................70
1.My project: How to create Android application.

1.1 Android

1.1.1 What is android?

Android is basically an operating system for smartphones. But we find now


integrated into PDAs, touch pads or televisions, even cars (trip computer) or
netbooks. The OS was created by the start-up of the same name, which is
owned by Google since 2005.

1.1.2Specifications:
This operating system is based on version 2.6 of linux, so it has a
monolithic system kernel, what means that all system function and
drivers are grouped into one block of code.

• Architecture:
Android consists of five layers:

-The Linux kernel 2.6-which includes useful drivers that allow for example
WIFI or Bluetooth.

-The library written in C and C + + that provide higher level functionality such
as an HTML engine, or a database (SQLite).
-A runtime environment for applications based on a virtual machine, made for
inefficient machines such as telephones. The aim is to translate JAVA in
machine language understood by Android. It comprises of DVM (Dalvik
virtual machine)

-A JAVA framework that allows applications running on the virtual machine


to organize and cooperate. Also the features of the android operating system
are available to us through API’s written in form of JAVA.classes.
1.1.3Characteristic of the market:

• Competitors

-The principal competitor is iPhone OS. It is mainly for


competing with Apple that Android has been created.
-Palm OS devices on PDA.
-Blackberry: which team the same name smartphones
-Windows Mobile: which team smartphones and PDAs.
-Sybian: Current Market Leader

• Key partners

-To help launch Android, Google has created an alliance of


thirty companies in order to develop standards for mobile devices. There is,
among others:
-Operators such as NTT Docomo, T-Mobile or Bouygues
Telecom
-Of-equipment manufacturers like Sony Ericsson or Samsung
-Manufacturers of semiconductors, including Intel and Nvidia
-Corporate businesses.

• Market share

The android market share continues to increase since its


inception, and is likely to continue climbing because it is favored by big
players like HTC, Sony Ericsson, Samsung, LG, Motorola, Dell, Acer .
Moreover, according to IDC, android will be the 2nd mobile operating system
used of the market in 2013.
Here is the state of the market from 2006 to 2009. You have to know that the
first mobile phone appeared in android date October 2008.
1.1.4. Why Android is better?

• Applications

-Google Applications

Android includes most of the time many Google applications


like Gmail, YouTube or Maps.
These applications are delivered with the machine most of the
time, except in certain cases, such as some phones running android on which
the provider has replaced Google applications by its own applications.
-widgets
With android, it is possible to use widgets which are small
tools that can most often get information. These widgets are directly visible on
the main window.

-Android Market
This is an online software store to buy applications.
Developers who created applications can add them into the store, and these
applications can be downloaded by users, they can be both free and paid.

• Multitasking

Android allows multitasking in the sense that multiple applications can run
simultaneously.
With Task Manager it is possible view all running tasks and to switch from one to
another easily.

• SDK

A development kit has been put at disposal of everybody. Accordingly, any


developer can create his own applications, or change the android platform. This kit
contains a set of libraries, powerful tools for debugging and development, a phone
emulator, thorough documentation, FAQs and tutorials
• Modifiability:

This allows everyone to use, improve or transform the functions of


Android for example transform
the interface in function of uses , to transform the platform in a real system
embedded Linux..
1.2 First Project:

1.2.1 The basics of creating applications


To begin to program for Android I needed some basics, because some elements are very
different, even if programming an application in Android uses the Java language,
therefore, an object-oriented language. Firstly, in an Android application, there is no main
method:
public static void main(String[] args){...}

The method that allows launching a program in java is not present in an application
android. This example is only the first of a long list. So, I'll try to explain what I had to
learn to use to create my first application which is the Task name Project ALMANAC .

Activity:
An activity is a user interface that allows the user to interact with the screen, to perform
actions.
For example, a text messaging application could have an activity that displays a list of
contacts to send messages. Once the contact is selected, activity could send information
to a second activity that could serve to send the message to the contact.
When an application is launched, what it displays is the result of an activity. At the code
level, for create an activity, you must create a class that extends the Activity class. An
activity has a required onCreate () method. It is the main method. To interact with the
program, through the activity, there must be something displayed, that is why the activity,
contains what is called views.

View:
a View is the basic building block for user interface components. A View occupies a
rectangular area on the screen. View is the base class for widgets, which are used to
create interactive UI components (buttons, text fields, etc.).There is different kinds of
views, for example a ListView is able to display only an interactive list of what you want
to display, while a WebView allows you to to display a web page. As said before, A view
occupies a rectangular area on the screen. To organize these rectangles on the screen,
there is a text file written in XML for every different screen.

Xml:

Xml means Extensible Markup Language. Android provides a


straightforward XML vocabulary that corresponds to the View classes and
subclasses. The goal of using Android's XML vocabulary, is to quickly
design UI layouts and the screen elements they contain, in the same way
that creating web pages in HTML : with a series of nested elements.

Here is an example:

<?xml version="1.0" encoding="utf-8"?>


<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, I am a TextView" />
<Button android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, I am a Button" />
</LinearLayout>

In the previous example, here's an XML layout that uses a vertical Linear
Layout to hold a TextView and a Button. It will be possible to modify
attributes the elements in the activity class that use this XML file.
Intent:
An activity can of course start another one, even if it but to do this, it will need
a special object called Intent. Intent is basis description of an operation to be
performed. It can launch an Activity, send a broadcast Intent to any interested
Broadcast Receiver components, and communicate with a background Service.
Intent performs binding between the codes in different applications. It can be
thought of as the link between activities. It is possible to add some
information’s to an Intent, thanks to an object called bundle, that you add to
the intent thanks to the method:
Intent.putExtras(Bundle objetbundle );

Android Manifest:
AndroidManifest.xml file is necessary for all android applications and must
have this name in its root directory. In the manifest you can find essential
information’s about the application for the Android system, information’s that
the system must have before it can run any of the application's code. Here is
what you can find in the Android manifest:
-The name of the Java package for the application. The package name serves
as a unique identifier for the application.
-The description of the components of the application: the activities, services,
broadcast receivers, and content providers that the application is composed of
and under what conditions they can be launched .
-The processes that will host application components.
-The permissions the application must have in order to access protected parts
of the API and interact with other applications.
-The permissions that others are required to have in order to interact with the
application's components.
-The list of the Instrumentation classes that provide profiling and other
information as the application is running. These declarations are present in the
manifest only while the application is being developed and tested; they're
removed before the application is published.
-The minimum level of the Android API that the application requires.
-The list of the libraries that the application must be linked against.
Whit all these elements, an application can be created.

1.2.2 The project

For my first application, I was not really comfortable with android, so in this
application there are some different screen, and so different activities, but it was a
good training to try how to communicate between the activities, how to display
elements (TextView, Buttons, Radio buttons, Radio group, Image view, Plain text
view, Web view ...) on the screen and how to interact with them.
Activity_main.XML
MAIN ACTIVITY.JAVA

package com.example.star.projectalmanac;

import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {


EditText e1, e2;
Button b1, b2;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b1 = (Button) findViewById(R.id.button);
b2 = (Button) findViewById(R.id.button2);

e1 = (EditText) findViewById(R.id.editText);
e2 = (EditText) findViewById(R.id.editText2);

b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(MainActivity.this,second.class);
startActivity(i);
finish();

}
});
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
String s2=e2.getText().toString();
if (s1.equals("")||s2.equals(""))
{
Toast.makeText(MainActivity.this, "please fill all entries",
Toast.LENGTH_SHORT).show();
}
else
{
SQLiteDatabasedb=openOrCreateDatabase("mahadev",MODE_PRIVATE,null);
db.execSQL("create table if not exists maa(name
varchar,passwordvarchar,emailvarchar,cityvarchar,phone varchar)");
String s3="select * from maa where name='"+s1+"'and
password='"+s2+"'";
Cursor cursor=db.rawQuery(s3,null);
if (cursor.getCount()>0)
{
Toast.makeText(MainActivity.this, "logged in successfully",
Toast.LENGTH_SHORT).show();
Intent j=new Intent(MainActivity.this,three.class);
startActivity(j);
finish();
}
else
{
Toast.makeText(MainActivity.this, "sorry user not found",
Toast.LENGTH_SHORT).show();
Intent k=new Intent(MainActivity.this,second.class);
startActivity(k);
finish();
}
}
}
});
}
}
Activity_second.XML
Signup.java

package com.example.star.projectalmanac;

import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class second extends AppCompatActivity {


Button b1,b2;
EditText e1,e2,e3,e4,e5;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
b1=(Button)findViewById(R.id.button3);
b2=(Button)findViewById(R.id.button4);
e1=(EditText)findViewById(R.id.editText3);
e2=(EditText)findViewById(R.id.editText4);
e3=(EditText)findViewById(R.id.editText5);
e4=(EditText)findViewById(R.id.editText6);
e5=(EditText)findViewById(R.id.editText7);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(second.this,MainActivity.class);
startActivity(i);
finish();
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
String s2=e2.getText().toString();
String s3=e3.getText().toString();
String s4=e4.getText().toString();
String s5=e5.getText().toString();
if (s1.equals("")||s2.equals("")||s3.equals("")||s4.equals("")||s5.equals(""))
{
Toast.makeText(second.this, "please fill all the entries",
Toast.LENGTH_SHORT).show();
}
else
{
SQLiteDatabasedb=openOrCreateDatabase("mahadev",MODE_PRIVATE,null);
db.execSQL(" create table if not exists maa(name
varchar,passwordvarchar,emailvarchar,cityvarchar,phone varchar)");
String s6="select * from maa where name='"+s1+"' and email='"+s3+"'
and phone='"+s5+"'";
Cursor cursor=db.rawQuery(s6,null);
if (cursor.getCount()>0)
{
Toast.makeText(second.this, "user already exist",
Toast.LENGTH_SHORT).show();
Intent j=new Intent(second.this,MainActivity.class);
startActivity(j);
finish();
}
else {
db.execSQL("insert into maa values('" + s1 + "','" + s2 + "','" + s3 + "','" + s4 +
"','" + s5 + "')");
Toast.makeText(second.this, "database updated successfully",
Toast.LENGTH_SHORT).show();
Intent k = new Intent(second.this, MainActivity.class);
startActivity(k);
finish();
}
}
}

});
}
}
ACTIVITY_THREE.XML
THREE.JAVA

package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class three extends AppCompatActivity {


Button b1,b2,b3,b4,b5;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_three);
b1=(Button)findViewById(R.id.button5);
b2=(Button)findViewById(R.id.button6);
b3=(Button)findViewById(R.id.button7);
b4=(Button)findViewById(R.id.button8);
b5=(Button)findViewById(R.id.button9);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(three.this,MainActivity.class);
startActivity(i);
finish();
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new Intent(three.this,mediaplayer.class);
startActivity(j);
finish();
}
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent k=new Intent(three.this,calculator.class);
startActivity(k);
finish();
}
});
b4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent l=new Intent(three.this,camera.class);
startActivity(l);
finish();
}
});
b5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent m=new Intent(three.this,special.class);
startActivity(m);
finish();
}
});

}
}
ACTIVITY_MEDIAPLAYER.xml
Mediaplayer.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.media.MediaPlayer;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class mediaplayer extends AppCompatActivity {


Button b1,b2,b3;
MediaPlayermp;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mediaplayer);
b1=(Button)findViewById(R.id.button10);
b2=(Button)findViewById(R.id.button11);
b3=(Button)findViewById(R.id.button12);
mp=MediaPlayer.create(this,R.raw.s);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(mediaplayer.this,three.class);
startActivity(i);
finish();

}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mp.start();
}
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mp.pause();
}
});
}
}
Activity_calculator.xml
Calculator.java

package com.example.star.projectalmanac;

import android.content.Intent;
import android.speech.tts.TextToSpeech;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import java.util.Locale;

public class calculator extends AppCompatActivity {


Button b1,b2,b3,b4,b5;
EditText e1,e2;
TextView t1;
TextToSpeech ts1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_calculator);
b1=(Button)findViewById(R.id.button13);
b2=(Button)findViewById(R.id.button14);
b3=(Button)findViewById(R.id.button15);
b4=(Button)findViewById(R.id.button16);
b5=(Button)findViewById(R.id.button17);
e1=(EditText)findViewById(R.id.editText8);
e2=(EditText)findViewById(R.id.editText9);
t1=(TextView)findViewById(R.id.textView);
ts1=new TextToSpeech(this, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int i) {
ts1.setLanguage(Locale.US);
ts1.setSpeechRate(0.5f);

}
});
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(calculator.this,three.class);
startActivity(i);
finish();
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
String s2=e2.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1+f2;
String s3=Float.toString(f3);
t1.setText(s3);
ts1.speak(s3,TextToSpeech.QUEUE_FLUSH,null);
}
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
String s2=e2.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1-f2;
String s3=Float.toString(f3);
t1.setText(s3);
ts1.speak(s3,TextToSpeech.QUEUE_FLUSH,null);

}
});
b4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
String s2=e2.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1*f2;
String s3=Float.toString(f3);
t1.setText(s3);
ts1.speak(s3,TextToSpeech.QUEUE_FLUSH,null);
}
});
b5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
String s2=e2.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1/f2;
String s3=Float.toString(f3);
t1.setText(s3);
ts1.speak(s3,TextToSpeech.QUEUE_FLUSH,null);

}
});
}
}
Activity_camera1.xml
CAMERA1.JAVA
package com.example.star.projectalmanac;

import android.content.Intent;
import android.graphics.Bitmap;
import android.provider.MediaStore;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class camera extends AppCompatActivity {


Button b1,b2;
TextView t1;
ImageView w1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_camera);
t1=(TextView)findViewById(R.id.textView);
b1=(Button)findViewById(R.id.button18);
b2=(Button)findViewById(R.id.button19);
w1=(ImageView)findViewById(R.id.imageView);

b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(camera.this,three.class);
startActivity(i);
finish();
}
});
b2.setOnClickListener(new View.OnClickListener() {
//for image capture
@Override
public void onClick(View view) {
Intent j=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivity(j);
finish();
}
});
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Bitmap b=(Bitmap)data.getExtras().get("data");
w1.setImageBitmap(b);
}
}
Activity_special.XML
Special.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class special extends AppCompatActivity {


Button b1,b2,b3;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_special);
b1=(Button)findViewById(R.id.button21);
b2=(Button)findViewById(R.id.button22);
b3=(Button)findViewById(R.id.button23);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(special.this,three.class);
startActivity(i);
finish();
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new Intent(special.this,lightsensor.class);
startActivity(j);
finish();
}
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent k=new Intent(special.this,quiz1.class);
startActivity(k);
finish();
}
});
}
}
Magicalmediaplayer.java

package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class special extends AppCompatActivity {


Button b1,b2,b3;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_special);
b1=(Button)findViewById(R.id.button21);
b2=(Button)findViewById(R.id.button22);
b3=(Button)findViewById(R.id.button23);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(special.this,three.class);
startActivity(i);
finish();
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new Intent(special.this,lightsensor.class);
startActivity(j);
finish();
}
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent k=new Intent(special.this,quiz1.class);
startActivity(k);
finish();
}
});
}
}
Activity_quiz.XML
Quiz.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;

public class quiz1 extends AppCompatActivity {


TextView t1;
Button b1,b2;
RadioButton r1,r2,r3,r4;
static int score=0;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_quiz1);
b1=(Button)findViewById(R.id.button24);
b2=(Button)findViewById(R.id.button25);
t1=(TextView)findViewById(R.id.textView2);
r1=(RadioButton)findViewById(R.id.radioButton);
r2=(RadioButton)findViewById(R.id.radioButton2);
r3=(RadioButton)findViewById(R.id.radioButton3);
r4=(RadioButton)findViewById(R.id.radioButton4);
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(quiz1.this,special.class);
startActivity(i);
finish();
}
});
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
score=0;
if (r3.isChecked())
{
++score;
}
else
{
--score;
}
Intent j=new Intent(quiz1.this,quiz2.class);
startActivity(j);
finish();
}
});
}
}
Activity_quiz2.XML
Quiz2.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;

public class quiz1 extends AppCompatActivity {


TextView t1;
Button b1,b2;
RadioButton r1,r2,r3,r4;
static int score=0;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_quiz1);
b1=(Button)findViewById(R.id.button24);
b2=(Button)findViewById(R.id.button25);
t1=(TextView)findViewById(R.id.textView2);
r1=(RadioButton)findViewById(R.id.radioButton);
r2=(RadioButton)findViewById(R.id.radioButton2);
r3=(RadioButton)findViewById(R.id.radioButton3);
r4=(RadioButton)findViewById(R.id.radioButton4);
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(quiz1.this,special.class);
startActivity(i);
finish();
}
});
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
score=0;
if (r3.isChecked())
{
++score;
}
else
{
--score;
}
Intent j=new Intent(quiz1.this,quiz2.class);
startActivity(j);
finish();
}
});
}
}
Activity_quiz3.XML
Quiz3.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;

public class quiz3 extends AppCompatActivity {


Button b1;
TextView t1;
RadioButton r1,r2,r3,r4;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_quiz3);
b1=(Button)findViewById(R.id.button27);
t1=(TextView)findViewById(R.id.textView4);
r1=(RadioButton)findViewById(R.id.radioButton9);
r2=(RadioButton)findViewById(R.id.radioButton10);
r3=(RadioButton)findViewById(R.id.radioButton11);
r4=(RadioButton)findViewById(R.id.radioButton12);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(r4.isChecked())
{
++quiz1.score;
}
else
{
--quiz1.score;
}
Intent i=new Intent(quiz3.this,quiz4.class);
startActivity(i);
finish();
}
});
}
}
activity_quiz4.XML
Quiz4.java
package com.example.star.projectalmanac
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;

public class quiz4 extends AppCompatActivity {


Button b1;
TextView t1;
RadioButton r1,r2,r3,r4;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_quiz4);
b1=(Button)findViewById(R.id.button28);
t1=(TextView)findViewById(R.id.textView5);
r1=(RadioButton)findViewById(R.id.radioButton13);
r2=(RadioButton)findViewById(R.id.radioButton14);
r3=(RadioButton)findViewById(R.id.radioButton15);
r4=(RadioButton)findViewById(R.id.radioButton16);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(r2.isChecked())
{
++quiz1.score;
}
else
{
--quiz1.score;
}
Intent i=new Intent(quiz4.this,quiz5.class);
startActivity(i);
finish();
}
});
}
}
Activity_quiz5.XML
Quiz5.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;

public class quiz5 extends AppCompatActivity {


Button b1;
TextView t1;
RadioButton r1,r2,r3,r4;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_quiz5);
b1=(Button)findViewById(R.id.button29);
t1=(TextView)findViewById(R.id.textView6);
r1=(RadioButton)findViewById(R.id.radioButton17);
r2=(RadioButton)findViewById(R.id.radioButton18);
r3=(RadioButton)findViewById(R.id.radioButton19);
r4=(RadioButton)findViewById(R.id.radioButton20);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(r1.isChecked())
{
++quiz1.score;
}
else
{
--quiz1.score;
}
Intent i=new Intent(quiz5.this,score.class);
startActivity(i);
finish();
}
});
}
}
Activity_score.XML
score.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class score extends AppCompatActivity {


Button b1,b2,b3,b4;
TextView t1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_score);
b1=(Button)findViewById(R.id.button30);
b2=(Button)findViewById(R.id.button31);
b3=(Button)findViewById(R.id.button32);
b4=(Button)findViewById(R.id.button33);
t1=(TextView)findViewById(R.id.textView7);
t1.setText("your score is:" +quiz1.score);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(score.this,facebook.class);
startActivity(i);
finish();
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new Intent(score.this,twitter.class);
startActivity(j);
finish();
}
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent k=new Intent(score.this,netcamp.class);
startActivity(k);
finish();
}
});
b4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent l=new Intent(score.this,three.class);
startActivity(l);
finish();
}
});
}
}
Activity_facebook.XML
Facebook.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;

public class facebook extends AppCompatActivity {


Button b1,b2;
EditText e1;
WebView w1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_facebook);
b1=(Button)findViewById(R.id.button34);
b2=(Button)findViewById(R.id.button36);
e1=(EditText)findViewById(R.id.editText10);
w1=(WebView)findViewById(R.id.webView);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
w1.loadUrl(s1);
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(facebook.this,score.class);
startActivity(i);
finish();
}
});
}
}
Activity_twitter.xml
Twitter.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;

public class twitter extends AppCompatActivity {


Button b1,b2;
EditText e1;
WebView w1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_twitter);
e1=(EditText)findViewById(R.id.editText11);
b1=(Button)findViewById(R.id.button35);
b2=(Button)findViewById(R.id.button37);
w1=(WebView)findViewById(R.id.webView2);
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(twitter.this,score.class);
startActivity(i);
finish();
}
});
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
w1.loadUrl(s1);
}
});
}
}
activity_netcamp.xml
Netcamp.java
package com.example.star.projectalmanac;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;

public class netcamp extends AppCompatActivity {


Button b1,b2;
EditText e1;
WebView w1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_netcamp);
b1=(Button)findViewById(R.id.button38);
b2=(Button)findViewById(R.id.button39);
e1=(EditText)findViewById(R.id.editText12);
w1=(WebView)findViewById(R.id.webView3);
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(netcamp.this,score.class);
startActivity(i);
finish();
}
});
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e1.getText().toString();
w1.loadUrl(s1);
}
});
}
}

1.3.3 IMPROVEMENTS

For this project, I had not time to do a better application. In fact it lacks
first interface easier to use with anything other than simple lists and text
boxes. The navigation could be improved, because right now it is only
repetitive actions that the user has the choice to make. Finally I have
managed to set up a camera, media player, calculator, quiz, lightsensor
music player ,web browser etc. but will some other application will be
introduced in it and also will be going to modify the give applications.
2. What did I learn?

2.1. Technically
First of all I gained additional skills in the Android language that was
difficult for me before. I learned also how to use a lot of the components in
Android studio such as the debugger. I also learned a new language that
is XML, a language I didn't know at all earlier. Finally, this project
allowed me to use my java skills acquired during my studies.
2.2. Humanly
This placement and this project brought me a lot of things on a human
level. First in relation to myself. I had to acquire a large autonomy.
Indeed I knew nothing about android before, and I had to learn how to
use, and create things on android by myself. This brought me a lot. This
autonomy is also linked to a research spirit. I had to try to find examples
by myself in the book, try to test new things, for having nowhere to find
answers.
Conclusion

Thanks to this training, which was also planned for this, I discovered a city, a
culture, and beautiful people also learned new skills, and used all the things
that I learned for two years. I do not regret anything in this experience and I
thank all those who have allowed such a thing feasible. The Android will
remain for in my life. I have learned many thing here which will definitely
going to help me in future not only in placement but also in my core and for my
final project.The people I met here are not just classmates, roommates and
professors, they are friends, and once again I thank you all.

You might also like