Android Project: Santu@netcamp - in YEAR:-2019-20
Android Project: Santu@netcamp - in YEAR:-2019-20
Android Project: Santu@netcamp - in YEAR:-2019-20
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.
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;
@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)
{
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;
@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;
@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;
@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;
@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;
@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;
@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;
@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;
@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;
@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;
@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;
@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
• 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