Android Project: Santu@netcamp - in YEAR:-2019-20

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 45

ANDROID PROJECT

Santu Purkait NAME:- Rajat Chopra


Director SEMESTER:- VII
Netcamp Solution Private Limited COURSE:- B.Tech
santu@netcamp.in YEAR:- 2019-20
www.netcamp.in
+91 93310 90003
CERTIFICATE
This is to certify that Mr. RAJAT CHOPRA, student
of B.TECH from department of computer and
science, BABU BANARSI DAS INSTITUTE OF
GHAZIABAD has completed his software
development project in “ANDROID STUDIO” in our
organization during 05.07.19 to 25.07.19

His work and conduct during the project was


found good
We wish him all the best in all his future
endeavors.

Santu Purkait
Director of
Netcamp Solution Private Limited
+91 93310 90003
ACKNOWLEDGMENT
It is a pleasant task of acknowledging the help I
have received in developing this project work. I
am thankful to Mr. Santu Purkait (director
Netcamp solution private limited) for providing an
opportunity to work with ‘NETCAMP’ which has
really helped me to develop work discipline and
perseverance.
Thank You all for everything.

-RAJAT CHPORA
COMPANY PROFILE
Netcamp is a technology consulting and training based firm
specializing in IT networking domain to provide solutions and
services to our clients across the industry. 

At Netcamp, we focus on delivering value to our clients


through leading edge technologies that are future-oriented
and meet the challenging requirements of industry with a
view to enable clients take advantage of the growing
technology market. 

Through a range of practical training sessions and techniques


by leveraging information technologies we aim to enable our
clients solve complex problems with a strong commitment to
achieve client satisfaction. 

We implement hands on practical exposure in networking


technologies including Linux, Microsoft Windows 2003,
Internet, TCP/IP, Ethical Hacking and Telecommunications
through our meticulous & comprehensively designed
structure & courses that has a well defined interlink, with an
aim to bridge the gap between academics and industry. 
ABOUT ANDROID
World is contracting with the growth of mobile phone
technology. As the number of users is increasing day by day,
facilities are also increasing. Starting with simple regular
handsets which were used just for making phone calls,
mobiles have changed our lives and have become part of it.
Now they are not used just for making calls but they have
innumerable uses and can be used as a Camera , Music
player, Tablet PC, T.V. , Web browser etc . And with the new
technologies, new software and operating systems are
required.
Operating systems have developed a lot in last 15 years.
Starting from black and white phones to recent smart phones
or mini computers, mobile OS has come far away. Especially
for smart phones, Mobile OS has greatly evolved from Palm
OS in 1996 to Windows pocket PC in 2000 then to Blackberry
OS and Android.
One of the most widely used mobile OS these days is
ANDROID. Android is a software bunch comprising not only
operating system but also middleware and key
applications. Android Inc was founded in Palo Alto of
California, U.S. by Andy Rubin, Rich miner, Nick sears and
Chris White in 2003. Later Android Inc. was acquired by
Google in 2005. After original release there have been
number of updates in the original version of Android.
 

INDEX

1) Project Profile
Project Definition
System Requirement
Analysis
Design
Implementation
Project Management
Testing
Tools and Technology
Bibliography
Tools and Technology
 Tools
Android studio
Android SDK
Technology
Android
MySql
PHP (Codeigniter Framework)
Project Profile
Title : ENTERTAINMENT APP
Definition:
Android app is the app in which all the function(login,
signup, mediaplayer, calculator, camera and a special
media player) are include in this single app.
Description:
It facilitates to login for old promoters and registration
for new promoters.
It displays different types of menu like Live Media
player, calculator, camera and special functions like
Quiz, Magical music player, Text-to-speech
In this application you can listen song on media player,
calculate the values in calculator, capture image using
camera, In special function you can play quiz, magical
music player is their which work when your put phone
upside down, In special function you can write text
and text is speak.
Entertainment app is the app which is used for
entertainment, calculation, quiz, special function etc.
Project Profile
 Project Hardware Requirement
Android Device (cell / tablet …)
Computer / Laptop
Project Software Requirements
Front End
Android
Java Runtime Environment 1.6 or above
IDE(eclipse)
SDK-tools
PHP

Back End
MySql Database
 Project Network Requirements
Internet connection
CODE FOR MAIN
ACTIVITY
package com.example.rajat.netcamp;

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,e3,e4,e5;
Button b1,b2;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
e1=(EditText)findViewById(R.id.editText);
e2=(EditText)findViewById(R.id.editText2);
b1=(Button)findViewById(R.id.button);
b2=(Button)findViewById(R.id.button2);
b2.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new
Intent(MainActivity.this,Sign1.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,
"fill all", Toast.LENGTH_SHORT).show();
}
else
{
SQLiteDatabase
data=openOrCreateDatabase("netcamp",MODE_PRIVATE,null
);
data.execSQL("create table if not
exists hrit (name varchar,email varchar,password
varchar,city varchar)");
String s5="select * from hrit
where name='"+s1+"' and email='"+s2+"'";
Cursor
cursor=data.rawQuery(s5,null);
if(cursor.getCount()>0)
{

Toast.makeText(MainActivity.this, "login succesfull",


Toast.LENGTH_SHORT).show();
Intent j=new
Intent(MainActivity.this,Wel.class);
startActivity(j);
finish();
}
else
{

Toast.makeText(MainActivity.this, "user does not


exist login not done ", Toast.LENGTH_SHORT).show();
Intent k=new
Intent(MainActivity.this,Sign1.class);
startActivity(k);
finish();
}
}
}
});
}
}

ACTIVITY MAIN
(LAYOUT)
CODE FOR SIGNUP
package com.example.rajat.netcamp;

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 Sign1 extends AppCompatActivity {


EditText e3,e4,e5,e6,e7;
Button b3,b4;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign1);
e3=(EditText)findViewById(R.id.editText3);
e4=(EditText)findViewById(R.id.editText4);
e5=(EditText)findViewById(R.id.editText5);
e6=(EditText)findViewById(R.id.editText6);
b3=(Button)findViewById(R.id.button3);
b4=(Button)findViewById(R.id.button4);
b4.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new
Intent(Sign1.this,MainActivity.class);
startActivity(i);
finish();
}
});
b3.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e3.getText().toString();
String s2=e4.getText().toString();
String s3=e5.getText().toString();
String s4=e5.getText().toString();
if(s1.equals("")||s2.equals("")||
s3.equals("")||s4.equals(""))
{
Toast.makeText(Sign1.this,
"please fill all the values",
Toast.LENGTH_SHORT).show();
}
else
{
SQLiteDatabase
data=openOrCreateDatabase("netcamp",MODE_PRIVATE,null
);
data.execSQL("create table if not
exists hrit (name varchar,email varchar,password
varchar,city varchar)");
String s5="select * from hrit
where name='"+s1+"' and email='"+s2+"'";
Cursor
cursor=data.rawQuery(s5,null);
if(cursor.getCount()>0)
{
Toast.makeText(Sign1.this,
"value exist", Toast.LENGTH_SHORT).show();
}
else
{
data.execSQL("insert into
hrit values ('"+s1+"','"+s2+"','"+s3+"','"+s4+"')");
Toast.makeText(Sign1.this,
"database updated", Toast.LENGTH_SHORT).show();
Intent j=new
Intent(Sign1.this,MainActivity.class);
startActivity(j);
finish();
}
}
}
});
}
}

ACTIVITY
SIGNUP(LAYOUT)
CODE FOR WELCOME
PAGE
package com.example.rajat.netcamp;

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

public class Wel extends AppCompatActivity {


Button b1, b2, b3, b4, b5;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_wel);
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);
b5.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i = new Intent(Wel.this,
MainActivity.class);
startActivity(i);
finish();
}
});
b1.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j= new
Intent(Wel.this,Media1.class);
startActivity(j);
finish();
}
});
b2.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent k=new
Intent(Wel.this,Cal.class);
startActivity(k);
finish();
}
});
b3.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent l=new
Intent(Wel.this,Cam1.class);
startActivity(l);
finish();
}
});
b4.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent m=new
Intent(Wel.this,Spec.class);
startActivity(m);
finish();
}
});
}
}
ACTIVITY
WELCOME
PAGE(LAYOUT)
CODE FOR MEDIA
PLAYER
package com.example.rajat.netcamp;

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;
import android.widget.TextView;

public class Media1 extends AppCompatActivity {


Button b9,b10,b11,b12;
MediaPlayer mp;
TextView t1;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_media1);
t1=(TextView)findViewById(R.id.textView);
b9=(Button)findViewById(R.id.button10);
b10=(Button)findViewById(R.id.button11);
b11=(Button)findViewById(R.id.button13);
b12=(Button)findViewById(R.id.button12);
mp=MediaPlayer.create(this,R.raw.j);
b9.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
mp.start();

}
});
b10.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
mp.pause();
}
});
b11.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new
Intent(Media1.this,Wel.class);
startActivity(i);
finish();

}
});
b12.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new
Intent(Media1.this,Next1.class);
startActivity(j);
finish();
}
});
}
}
ACTIVITY
MEDIA(LAYOUT)
CODE FOR MAGICAL
MUSICAL PLAYER
package com.example.rajat.netcamp;

import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.media.MediaPlayer;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Mmplayer extends AppCompatActivity


implements SensorEventListener {
MediaPlayer mp;
SensorManager sm;
Sensor s;
Button b1;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mmplayer);
b1=(Button)findViewById(R.id.button33);
mp=MediaPlayer.create(this,R.raw.j);
sm=(SensorManager)getSystemService(SENSOR_SERVICE);
s=sm.getDefaultSensor(Sensor.TYPE_LIGHT);
sm.registerListener(this,s,SensorManager.SENSOR_DELAY
_NORMAL);
b1.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new
Intent(Mmplayer.this,Spec.class);
startActivity(i);
finish();
}
});
}

@Override
public void onSensorChanged(SensorEvent
sensorEvent) {
if(sensorEvent.values[0]>2)
{
mp.start();
}
else
{
mp.pause();
}
}

@Override
public void onAccuracyChanged(Sensor sensor, int
i) {

}
}
ACTIVITY
MAGICAL MUSICAL
PLAYER(LAYOUT)
CODE FOR
CALCULATOR
package com.example.rajat.netcamp;

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.EditText;
import android.widget.TextView;

public class Cal extends AppCompatActivity {


EditText e5,e6;
TextView t1;
Button b17,b18,b19,b20,b21,b22;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cal);
e5=(EditText)findViewById(R.id.editText7);
e6=(EditText)findViewById(R.id.editText8);
b17=(Button)findViewById(R.id.button17);
b18=(Button)findViewById(R.id.button18);
b19=(Button)findViewById(R.id.button19);
b20=(Button)findViewById(R.id.button20);
b21=(Button)findViewById(R.id.button22);
b22=(Button)findViewById(R.id.button21);
t1=(TextView)findViewById(R.id.textView3);
b17.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e5.getText().toString();
String s2=e6.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1+f2;
String s3=Float.toString(f3);
t1.setText(s3);
}
});
b18.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e5.getText().toString();
String s2=e6.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1-f2;
String s3=Float.toString(f3);
t1.setText(s3);
}
});
b19.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e5.getText().toString();
String s2=e6.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1*f2;
String s3=Float.toString(f3);
t1.setText(s3);
}
});
b20.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
String s1=e5.getText().toString();
String s2=e6.getText().toString();
Float f1=Float.parseFloat(s1);
Float f2=Float.parseFloat(s2);
Float f3=f1/f2;
String s3=Float.toString(f3);
t1.setText(s3);
}
});
b21.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new
Intent(Cal.this,Wel.class);
startActivity(i);
finish();
}
});
b22.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new
Intent(Cal.this,Cal.class);
startActivity(j);
finish();
}
});
}
}
ACTIVITY
CALCULATOR
(LAYOUT)
CODE FOR CAMERA
package com.example.rajat.netcamp;

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;

public class Cam1 extends AppCompatActivity {


Button b1,b2;
ImageView i1;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cam1);
b1 = (Button) findViewById(R.id.button23);
i1 = (ImageView)
findViewById(R.id.imageView4);
b2 = (Button) findViewById(R.id.button24);
b2.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i = new Intent(Cam1.this,
Wel.class);
startActivity(i);
finish();
}
});
b1.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i2 = new
Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(i2, 0);
}
});
}

@Override
protected void onActivityResult(int requestCode,
int resultCode, Intent data) {
super.onActivityResult(requestCode,
resultCode, data);
Bitmap
b2=(Bitmap)data.getExtras().get("data");
i1.setImageBitmap(b2);
}
}
ACTIVITY
CAMERA(LAYOUT)
CODE FOR SPECIAL
FUNCTION
package com.example.rajat.netcamp;

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

public class Spec extends AppCompatActivity {


Button b1,b2,b3,b4;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_spec);
b1=(Button)findViewById(R.id.button25);
b2=(Button)findViewById(R.id.button26);
b3=(Button)findViewById(R.id.button28);
b4=(Button)findViewById(R.id.button27);
b1.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new
Intent(Spec.this,Quiz1.class);
startActivity(i);
finish();
}
});
b3.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new
Intent(Spec.this,Wel.class);
startActivity(j);
finish();
}
});
b2.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent k=new
Intent(Spec.this,Mmplayer.class);
startActivity(k);
finish();
}
});
b4.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent l=new
Intent(Spec.this,Textto.class);
startActivity(l);
finish();
}
});

}
}
ACTIVITYSPECIAL
FUNCTION(LAYOUT)
CODE FOR QUIZ
package com.example.rajat.netcamp;

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{


Button b1;
TextView t1;
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.button29);
t1=(TextView)findViewById(R.id.textView4);
r1=(RadioButton)findViewById(R.id.radioButton
);
r2=(RadioButton)findViewById(R.id.radioButton
2);
r3=(RadioButton)findViewById(R.id.radioButton
3);
r4=(RadioButton)findViewById(R.id.radioButton
4);
b1.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
score=0;
if(r2.isChecked())
{
++score;
}
else
{
--score;
}
Intent i=new
Intent(Quiz1.this,Fist.class);
startActivity(i);
finish();
}
});
}

ACTIVITY
QUIZ(LAYOUT)
CODE FOR QUESTION
NO. 1
package com.example.rajat.netcamp;

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 Fist extends AppCompatActivity {


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

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fist);
b1=(Button)findViewById(R.id.button30);
t1=(TextView)findViewById(R.id.textView5);
r1=(RadioButton)findViewById(R.id.radioButton5);
r2=(RadioButton)findViewById(R.id.radioButton6);
r3=(RadioButton)findViewById(R.id.radioButton7);
r4=(RadioButton)findViewById(R.id.radioButton8);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(r3.isChecked())
{
++Quiz1.score;
}
else
{
--Quiz1.score;
}
Intent i=new Intent(Fist.this,Seco.class);
startActivity(i);
finish();
}
});

}
}

ACTIVITY
QUESTION
NO.1(LAYOUT)
CODE FOR QUESTION
NO.2
package com.example.rajat.netcamp;

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 Seco extends AppCompatActivity {


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

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_seco);
b1=(Button)findViewById(R.id.button31);
t1=(TextView)findViewById(R.id.textView6);
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(Seco.this,Thir.class);
startActivity(i);
finish();
}
});
}
}

ACTIVITY
QUESTION NO.2
(LAYOUT)
CODE FOR QUESTION
NO.3
package com.example.rajat.netcamp;

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 Thir extends AppCompatActivity {


Button b1,b2;
TextView t1;

@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_thir);
b1=(Button)findViewById(R.id.button32);
b2=(Button)findViewById(R.id.button36);
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(Thir.this,Spec.class);
startActivity(i);
finish();

}
});
b2.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
Intent j=new
Intent(Thir.this,Share.class);
startActivity(j);
finish();
}
});

}
}
ACTIVITY
QUESTION
NO.3(LAYOUT)
Bibliography

Web sites visited

• http://www.developer.android.com
• http://www.vogellla.com
• http://www.github.com

Books Referred
“Android Wireless Application Development” by
Lauren Darcey and Shane Condor

You might also like