0% found this document useful (0 votes)
12 views26 pages

Chapter 6

Chapter 6 discusses security and application development in Android, focusing on SMS telephony and email functionalities. It explains how to use the SmsManager API for sending SMS messages, the necessary permissions, and how to set up an email client using implicit intents. Additionally, it covers the Android security model, including permissions, shared user IDs, and the types of permissions required for accessing sensitive user data.

Uploaded by

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

Chapter 6

Chapter 6 discusses security and application development in Android, focusing on SMS telephony and email functionalities. It explains how to use the SmsManager API for sending SMS messages, the necessary permissions, and how to set up an email client using implicit intents. Additionally, it covers the Android security model, including permissions, shared user IDs, and the types of permissions required for accessing sensitive user data.

Uploaded by

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

Chapter 6

Security and Application Development

SMS telephony

 In Android, you can use SmsManager API or devices Built-in SMS application to send
SMS's
 Android SMS is stored in PDU (protocol description unit) format

 SmsManager class takes care of sending the SMS message.
 We just need to get an instance of it and send the SMS message.
 We need to add permission to SEND_SMS in the Android manifest file.

SmsManager smsManager = SmsManager.getDefault();


smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);

static SmsManager getDefault()


This method is used to get the default instance of the SmsManager

void sendTextMessage(String destinationAddress, String scAddress, String text,


PendingIntent sentIntent, PendingIntent deliveryIntent)
Send a text based SMS.
Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ifcdiv">
<uses-permission android:name="android.permission.SEND_SMS"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IFCDiv">
<activity android:name=".ttp"></activity>
<activity android:name=".login" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

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


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:hint="enter phone no"
android:id="@+id/ed1"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:hint="enter msg"
android:layout_below="@id/ed1"
android:id="@+id/ed2"/>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="submit"
android:id="@+id/b1"
android:layout_below="@id/ed2"
android:layout_centerHorizontal="true"/>
</RelativeLayout>

package com.example.contentpro;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {


EditText ed1, ed2;
Button b;
private static final int PERMISSION_REQUEST_CODE = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ed1 = findViewById(R.id.ed1);
ed2 = findViewById(R.id.ed2);
b = findViewById(R.id.b1);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (checkPermission()) {
sendMessage();
} else {
requestPermission();
}
}
});
}

private boolean checkPermission()


{
int result = ContextCompat.checkSelfPermission(this,
Manifest.permission.SEND_SMS);
return result == PackageManager.PERMISSION_GRANTED;
}

private void requestPermission()


{
ActivityCompat.requestPermissions(this, new String[]
{Manifest.permission.SEND_SMS}, PERMISSION_REQUEST_CODE);
}

private void sendMessage() {


String number = ed1.getText().toString();
String msg = ed2.getText().toString();
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(number, null, msg, null, null);
Toast.makeText(getApplicationContext(), "Message Sent",
Toast.LENGTH_LONG).show();
ed1.setText("");
ed2.setText("");
} catch (Exception e) {
Toast.makeText(getApplicationContext(), "Some fields are empty or message sending
failed", Toast.LENGTH_LONG).show();
}
}
}

Receive SMS
activity_main.xml:

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


<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

MainActivity.java:
package com.example.myapplication;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

IntentFilter i = new IntentFilter();


i.addAction("android.provider.Telephony.SMS_RECEIVED");
SMSReceiver sms = new SMSReceiver();
registerReceiver(sms, i );
}
}

AndroidManifest.xml:
<uses-permission android:name="android.permission.RECEIVE_SMS"/>

SMSReceiver.java:
package com.example.myapplication;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.widget.Toast;

public class SMSReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
try {
if
(intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED"))
{
Bundle bundle = intent.getExtras();
if (bundle != null) {
Object[] pdus = (Object[]) bundle.get("pdus");
if (pdus != null) {
for (Object pdu : pdus) {
SmsMessage smsMessage =
SmsMessage.createFromPdu((byte[]) pdu);
String sender =
smsMessage.getDisplayOriginatingAddress();
String messageBody = smsMessage.getMessageBody();
Toast.makeText(context, "SMS received from: " + sender +
"\nMessage: " + messageBody, Toast.LENGTH_LONG).show();
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

Email

 Email is messages distributed by electronic means from one system user to one or more
recipients via a network.
 To send an email from your application, you don’t have to implement an email client
from the beginning, but you can use an existing one like the default Email app provided
from Android, Gmail, Outlook, K-9 Mail etc.
 For this purpose, we need to write an Activity that launches an email client, using an
implicit Intent with the right action and data.

We can use ACTION_SEND action to launch an email client installed on your Android
device.
Following is simple syntax to create an intent with ACTION_SEND action.

Intent emailIntent = new Intent(Intent.ACTION_SEND);

Example:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="22dp"
android:layout_marginTop="16dp"
android:ems="10" />

<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/editText1"
android:layout_below="@+id/editText1"
android:layout_marginTop="18dp"
android:ems="10" >

<requestFocus />
</EditText>

<EditText
android:id="@+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/editText2"
android:layout_below="@+id/editText2"
android:layout_marginTop="28dp"
android:ems="10"
android:inputType="textMultiLine" />

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/editText1"
android:layout_alignBottom="@+id/editText1"
android:layout_alignParentLeft="true"
android:text="To:" />

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/editText2"
android:layout_alignBottom="@+id/editText2"
android:layout_alignParentLeft="true"
android:text="Subject:" />

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/editText3"
android:layout_alignBottom="@+id/editText3"
android:layout_alignParentLeft="true"
android:text="Message:" />

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/editText3"
android:layout_below="@+id/editText3"
android:layout_marginLeft="76dp"
android:layout_marginTop="20dp"
android:text="Send" />

</RelativeLayout>

mainActivity.java file
public class MainActivity extends AppCompatActivity
{
EditText editTextTo,editTextSubject,editTextMessage;
Button send;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
editTextTo=(EditText)findViewById(R.id.editText1);
editTextSubject=(EditText)findViewById(R.id.editText2);
editTextMessage=(EditText)findViewById(R.id.editText3);
send=(Button)findViewById(R.id.button1);
send.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View arg0) {
String to=editTextTo.getText().toString();
String subject=editTextSubject.getText().toString();
String message=editTextMessage.getText().toString();

Intent email = new Intent(Intent.ACTION_SEND);


email.putExtra(Intent.EXTRA_EMAIL, new String[]{ to});
email.putExtra(Intent.EXTRA_SUBJECT, subject);
email.putExtra(Intent.EXTRA_TEXT, message);
email.setType("message/rfc822");

startActivity(Intent.createChooser(email, "Choose an Email client :"));


}
});
}
}
Android security model
 Android is a multi-process system, in which each application (and parts of the system)
runs in its own process.

 Most security between applications and the system is enforced at the process level
through standard Linux facilities, such as user and group IDs that are assigned to
applications.

 Additional finer-grained security features are provided through a “permission”


mechanism that enforces restrictions on the specific operations that a particular process
can perform, and per-URI permissions for granting ad-hoc access to specific pieces of
data.

 The Android security model is primarily based on a sandbox and permission mechanism.

 Each application is running in a specific Dalvik virtual machine with a unique user ID
assigned to it, which means the application code runs in isolation from the code of all
others applications.

 Android application has been signed with a certificate with a private key Know the
owner of the application is unique.

 This allows the author of The application will be identified if needed.

 When an application is installed in The phone is assigned a user ID, thus avoiding it from
affecting it Other applications by creating a sandbox for it. This user ID is permanent on
which devices and applications with the same user ID are allowed to run in a single
process.

 It is mandatory for an application to list all the resources it will Access during
installation.

 The purpose of a permission is to protect the privacy of an Android user. Android apps
must request permission to access sensitive user data (such as contacts and SMS), as well
as certain system features (such as camera and internet).

 Permissions are divided into several protection levels. The protection level affects
whether runtime permission requests are required.
Android introduced shared user ID & permission to allow application components talk to each

other & enable application to access to critical system in Android devices.

Shared User ID
 Shared user ID enables Android system to share data between application
components.
 Both applications need to be signed with same digital certificate in order to be
assigned a shared user ID as shown in image.
 Developers will able to pass through the restriction on isolation model & both
applications will gain access to run in the same process.

Types of permissions

1. Install-time permissions

 Install-time permissions give your app limited access to restricted data, and they
allow your app to perform restricted actions that minimally affect the system or other
apps.

 When you declare install-time permissions in your app, the system automatically
grants your app the permissions when the user installs your app.
Android includes several sub-types of install-time permissions,

Normal permissions and Signature permissions.

a) Normal permissions

 These permissions allow access to data and actions that extend beyond your app's
sandbox.

 However, the data and actions present very little risk to the user's privacy, and the
operation of other apps.

b) Signature permissions

 If the app declares a signature permission that another app has defined, and if the two
apps are signed by the same certificate, then the system grants the permission to the
first app at install time. Otherwise, that first app cannot be granted the permission.

2. Runtime permissions

 Runtime permissions, also known as dangerous permissions, give your app additional
access to restricted data, and they allow your app to perform restricted actions that
more substantially affect the system and other apps.

 Many runtime permissions access private user data, a special type of restricted data
that includes potentially sensitive information. Examples of private user data include
location and contact information.

 The system assigns the "dangerous" protection level to runtime permissions.

3. Special permissions

 Special permissions correspond to particular app operations.

 Only the platform and OEMs can define special permissions.


 Additionally, the platform and OEMs usually define special permissions when they
want to protect access to particularly powerful actions, such as drawing over other
apps.

The Special app access page in system settings contains a set of user-toggleable operations.
Many of these operations are implemented as special permissions.

Declaring and Using Permissions

 The purpose of a permission is to protect the privacy of an Android user. Android apps
must request permission to access sensitive user data (such as contacts and SMS), as well
as certain system features (such as camera and internet).
 Depending on the feature, the system might grant the permission automatically or might
prompt the user to approve the request.

Permission Approval
 An app must publicize the permissions it requires by including <uses-permission> tags in
the app manifest.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.snazzyapp">

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

<application ...>
...
</application>
</manifest>

If your app lists normal permissions in its manifest the system automatically grants those
permissions to your app.

If your app lists dangerous permissions in its manifest such as the SEND_SMS permission
above, the user must explicitly agree to grant those permissions.

Request prompts for dangerous permissions

 Only dangerous permissions require user agreement. The way Android asks the user to
grant dangerous permissions depends on the version of Android running on the user's
device, and the system version targeted by your app.
1. Runtime requests
2. Install-time requests

Request prompts to access sensitive user information

 Some apps depend on access to sensitive user information related to call logs and SMS
messages.
 If you want to request the permissions specific to call logs and SMS messages and
publish your app to the Play Store, you must prompt the user to set your app as
the default handler for a core system function before requesting these runtime
permissions.

Permissions for optional hardware features

Access to some hardware features (such as Bluetooth or the camera) require an app
permission.
<uses-feature android:name="android.hardware.camera" android:required="false" />

Using Custom Permission

By defining custom permissions, an app can share its resources and capabilities with other
apps.
App signing
 All APKs must be signed with a certificate whose private key is held by their developer.
This certificate identifies the author of the app.
 The certificate does not need to be signed by a certificate authority; it is perfectly
allowable, and typical, for Android apps to use self-signed certificates.
 The purpose of certificates in Android is to distinguish app authors.
User IDs and file access
 At install time, Android gives each package a distinct Linux user ID.
 The identity remains constant for the duration of the package's life on that device.
 On a different device, the same package may have a different UID; what matters is that
each package has a distinct UID on a given device.

Defining and enforcing permissions

 To enforce your own permissions, you must first declare them in


your AndroidManifest.xml using one or more <permission> elements.
 For example, an app that wants to control who can start one of its activities could declare
a permission for this operation as follows:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp" >

<permission
android:name="com.example.myapp.permission.DEADLY_ACTIVITY"
android:label="@string/permlab_deadlyActivity"
android:description="@string/permdesc_deadlyActivity"
android:permissionGroup="android.permission-group.COST_MONEY"
android:protectionLevel="dangerous" />
...
</manifest>

LOCATION BASED SERVICES (LBSs)

 LBS app follows the location and offer extra services such as locating facilities close at
had .
 In LBS application map is the key components, which present the visual location of our
location.
 Geocoding is the process of transforming a street address or other description of a
location into a (latitude, longitude) coordinate

Creating the Project
Getting the Maps API Key

Creating API keys


The API key is a unique identifier that authenticates requests associated with your project for
usage and billing purposes. You must have at least one API key associated with your project.

1. Browse the site on your browser.


https://console. developers. google.com/project

2. Login with your google account.


3. Create a new project by clicking on Create Project option.

4. Add your project name and organization name in the fields present on the screen.
5. Now click on APIs and Services.

6. Enable APIs and services.

7. Select Google maps Android API


8. To create an API key for Maps click on Create credentials option and then select the
API key option

9. Click on the API key option to generate your API key. After clicking on this option
your API key will be generated
Displaying the Maps
1. Create new android project.
2. Select Google Maps Activity and then click finish.
3. Now open the google_maps_api_xml file and copy the api key

4. Activity_maps.xml file

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


<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapsActivity" />

5. AndroidManifest.xml file

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


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.map">

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

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />

<activity
android:name=".MapsActivity"
android:label="@string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>
</application>

</manifest>

6. Activity_maps.xml file

package com.example.googlemap;
import androidx.fragment.app.FragmentActivity;
import android.os.Bundle;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {

private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment)
getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}

@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;

// Add a marker in Sydney and move the camera


LatLng mumbai = new LatLng(19.085442, 72.875694);
mMap.addMarker(new MarkerOptions().position(mumbai).title("Marker in Mumbai"));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mumbai,10F));
}
}

7. Output
Geocoder

 Geocoder class for handling geocoding and reverse geocoding.

 Geocoding is the process of transforming a street address or other description of a


location into a (latitude, longitude) coordinate.

 Reverse geocoding is the process of transforming a (latitude, longitude) coordinate into


a (partial) address.

Application Deployment On Playstore

Signing of Application

 Application signing allows developers to identify the author of the application and to
update their application without creating complicated interfaces and permissions.
 Every application that is run on the Android platform must be signed by the
developer.
 Applications that attempt to install without being signed will be rejected by either
Google Play or the package installer on the Android device.
 On Android, application signing is the first step to placing an application in its
Application Sandbox. The signed application certificate defines which user ID is
associated with which application; different applications run under different user IDs.
 Application signing ensures that one application cannot access any other application
except through well-defined IPC.

Step-by-Step Process to Upload App To Google Play Store

1. Google Play Developer Console


 Developer console is kind of a backend controlling center, from where developers submit
an app to Play Store.

 There is a one-time fee of $25 by which a developer can open an account, loaded with
functions and control features.

 After paying this one-time fee, you can upload apps to Google Play Store for free.

 You need to fill out all the credentials asked while creating the account, such as your
name, country and more. Once you submit your account it will take upto 48 hours to get
approved.

2. Link Developer Account with Google Wallet Merchant Account

 If the app getting uploaded to Play Store supports in-app purchases, then you will need a
merchant account.
 To create one you can sign in to your Google Console account and click
on ‘Reports’ followed by ‘Financial Reports’ option.

 After this, you may select ‘Set up a merchant account now’ option and simply fill out
your details.

The merchant account will automatically get linked to your Google Console account and will
allow you to manage and examine app sales.

3. Create Application

Once you are logged into your developer or publisher account, here are a few steps you need
to take:

 In the menu, go to the ‘All applications’ tab


 You will see an option ‘Create Application’ – select it
 From the drop-down menu, choose the application’s default language
 Enter your application’s title (it can be changed later)
4. App Store Listing

 You are required to fill out all the information and details you have already prepared
with caution before. The table below shows what information you need to fill in the app
listing-

Make sure to use appropriate keywords in your app description to increase the chances of
your app showing up in searches. Along with this, make sure to use all the data we have
talked about in the prerequisite section for app listing.

5. Upload App Bundles or APK To Google Play


 Now, you are required to use the files such as App bundle or APK and signed app release
and upload them into your application.

 This is how you do it: Navigate to the ‘Release Management’ and then ‘App
Release’ tab in the menu.

 After this, you will be asked to choose any one type of release from four options- internal
test, close test, production release, and an open test.

Once, you have made a decision regarding which type of release you want, you may
select ‘Create Release’.

 At this point, you will be redirected to the New release to the production page. Here, you
are again required to make another decision- to opt for Google Play app signing on the
app or not. If you choose the latter, then simply click on the ‘OPT-OUT’ option.
 Now, select ‘Browse files’ and then look into how to upload apk to google
play store while naming and describing your release through on-screen instructions.

 You can also click on ‘Review’ to confirm the information. When everything is taken
care of, press ‘Save’.

6. Time For Content Rating

 The next step regarding how to publish apps on the Play Store is to rate your app. This is
crucial for it is listed as ‘Unrated’, it might get removed altogether from the store, so it is
imperative to rate the application.

 For Content Rating, you must again navigate to the menu on the left side of the screen
and then select the same. By clicking on ‘Continue’ you can move forward and then
type your email address in the respective field and then ‘Confirm’ it.

 Now, you may fill the questionnaire for your app rating. Follow this by selecting
the ‘Save Questionnaire’ and then choose the ‘Calculate Rating’ option to see your
app rating on the Play Store. The last thing to finalize your app’s content rating is to click
on ‘Apply’.

7. Fix App Pricing and Distribution


 Now, you have to be clear about what countries your app is going to be available in. The
point to note here is that Google doesn’t support publishing an app for all regions. The
app will be published in selected countries instead of world-wide.

 Moreover, assigning a price to your app is crucial. If you want your app to be free, make
sure that this decision is permanent, as Google does not allow you to convert free apps
into paid ones. Although, the price of the app can be altered.

 To do all this, go to the Pricing and Distribution tab in the menu, and then make a
choice whether your app is going to be Free or Paid. You may now select the countries
you want your app to be released. Additionally, if your application is suited for children
under the age of 13, you may select the option of ‘Yes’ for Primary Child-Detected. If
otherwise is the case, simply select ‘No’. Similarly, select the options for allowing ads
into your application.

8. Finally, Publish the Application

 Once you are confirmed about everything being correct, take the last step of this guide
on how to upload an app on Play Store, i.e, add the application to the platform.

 You need to go back to the ‘App Releases’ tab and then select ‘Manage Production’
followed by ‘Edit Release’. After this, click on ‘Review’ and then choose ‘Start rollout to
production’ option. To bring this process to an end select the ‘Confirm’ option and
Voila! You have successfully uploaded the app to the Google Play Store for free.

 All there is left to do now is to just wait for your application to get approved. It generally
took about two hours for your application to get reviewed. But with Google Play’s
updated privacy policy, it will now take hours and even days for the same,
encouraging mobile app development companies to create even more flawless
applications that get selected instantly. So, hold your excitement in the place and just
wait.
Step-by-Step Process to Upload App To Google Play Store

Step 1: Create a Developer Account


 Before you can publish any app on Google Play, you need to create a Developer
Account. You can easily sign up for one using your existing Google Account.
 You’ll need to pay a one-time registration fee of $25 using your international credit
or debit card. It can take up to 48 hours for your registration to be fully processed.

Step 2: Plan to Sell? Link Your Merchant Account


 If you want to publish a paid app or plan to sell in-app purchases, you need to create a
payments center profile, i.e. a merchant account.
 A merchant account will let you manage your app sales and monthly payouts, as well
as analyze your sales reports right in your Play Console.

Step 3: Create an App


 Now you have create an application by clicking on 'Create Application'. Here you
have to select your app’s default language from the drop-down menu and then type in
a title for your app. The title of your app will show on Google Play after you’ve
published.

Step 4: Prepare Store Listing


 Before you can publish your app, you need to prepare its store listing. These are all
the details that will show up to customers on your app’s listing on Google Play. You
not necessarily complete it at once , you can always save a draft and revisit it later
when you’re ready to publish.
 The information required for your store listing is divided into several categories such
as Product Details containing title, short and full description of the app, Your app’s
title and description should be written with a great user experience in mind. Use the
right keywords, but don’t overdo it. Make sure your app doesn’t come across as
spam-y or promotional, or it will risk getting suspended on the Play Store.
 Graphic Assets where you can add screenshots, images, videos, promotional graphics,
and icons that showcase your app’s features and functionality.
 Languages & Translations, Categorization where in category can be selected to which
your app belong to. Contact Details , Privacy Policy for apps that request access to
sensitive user data or permissions, you need to enter a comprehensive privacy policy
that effectively discloses how your app collects, uses, and shares that data.

Step 5: Upload APK to an App Release


 Finally upload your app, by uploading APK file. Before you upload APK, you need
to create an app release. You need to select the type of release you want to upload
your first app version to.
 You can choose between an internal test, a closed test, an open test, and a production
release. The first three releases allow you to test out your app among a select group of
users before you make it go live for everyone to access.
 This is a safer option because you can analyze the test results and optimize or fix your
app accordingly if you need to before rolling it out to all users.
 Once you create a production release, your uploaded app version will become
accessible to everyone in the countries you choose to distribute it in and click on
‘Create release.’
Step 6: Provide an Appropriate Content Rating
 If you don’t assign a rating to your app, it will be listed as ‘Unrated’. Apps that are
‘Unrated’ may get removed from Google Play.
 To rate your app, you need to fill out a content rating questionnaire An appropriate
content rating will also help you get to the right audience, which will eventually
improve your engagement rates.

Step 7: Set Up Pricing & Distribution


 Before you can fill out the details required in this step, you need to determine your
app’s monetization strategy. Once you know how your app is going to make money,
you can go ahead and set up your app as free or paid.
 You can always change your app from paid to free later, but you cannot change a free
app to paid. For that, you’ll need to create a new app and set its price.

Step 8: Rollout Release to Publish Your App


 The final step involves reviewing and rolling out your release after making sure
you’ve taken care of everything else.
 Before you review and rollout your release, make sure the store listing, content rating,
and pricing and distribution sections of your app each have a green check mark next
to them.
 Once you’re sure about the correctness of the details, select your app and navigate to
‘Release management’ – ‘App releases.’
 You can always opt for reviews by clicking on ‘Review’ to be taken to the ‘Review
and rollout release’ screen. Here, you can see if there are any issues or warnings you
might have missed out on. Finally, select ‘Confirm rollout.’ This will also publish
your app to all users in your target countries on Google Play.

Different Permission

For Sending SMS


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

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

Your application must also declare use of camera features, for example:
<uses-feature android:name="android.hardware.camera" />

Storage Permission
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Audio Recording Permission


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

Location Permission
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Internet Permission
<uses-permission android:name="android.permission.INTERNET" />

You might also like