[go: up one dir, main page]

0% found this document useful (0 votes)
2 views12 pages

unit 6 my notes

The document outlines essential aspects of Android application development, including the use of the Google Play Console for app management, obtaining a Map API key, and implementing SMS services. It also covers geocoding, creating signed APKs, deploying apps on the Google Play Store, and understanding the Android security model and permissions. Key steps for publishing an app and the importance of custom permissions are highlighted as well.

Uploaded by

rashinirale865
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)
2 views12 pages

unit 6 my notes

The document outlines essential aspects of Android application development, including the use of the Google Play Console for app management, obtaining a Map API key, and implementing SMS services. It also covers geocoding, creating signed APKs, deploying apps on the Google Play Store, and understanding the Android security model and permissions. Key steps for publishing an app and the importance of custom permissions are highlighted as well.

Uploaded by

rashinirale865
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/ 12

✅ 1.

Importance of Developer Console in Android Application Development


 The Google Play Console is a tool for developers to publish and manage Android
apps.
 It allows developers to:
o Upload APKs or AABs (app files)
o Monitor performance, crashes, and user reviews
o Track downloads and installs
o Set pricing and countries
o Manage in-app purchases, subscriptions, etc.
 It is essential for releasing apps and analyzing user feedback.

✅ 2. Process of Getting the Map API Key


To use Google Maps in Android apps, you need an API key. Steps:
1. Go to Google Cloud Console
2. Create a new project.
3. Enable Maps SDK for Android.
4. Go to Credentials and create a new API key.
5. Add API restrictions (optional).
6. Copy the key and paste it in your Android app (google_maps_api.xml).

✅ 3. SMS Service in Android Application Development


 Android provides APIs to send and receive SMS messages.
 Use the SmsManager class to send messages.
 Use BroadcastReceiver to receive incoming SMS.
Example:
java
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage("phoneNumber", null, "Hello!", null, null);
 You need the permission:
Xml
<uses-permission android:name="android.permission.SEND_SMS"/>

✅ 4. Concept of Geocoding and Reverse Geocoding


🔹 Geocoding
In mobile application development, Geocoding is the process of converting a location
name or address (like “Delhi”) into geographic coordinates (latitude and longitude).
It is used when a user enters an address, and the app needs to place it on a map.

🔹 Reverse Geocoding
Reverse Geocoding is the opposite. It converts latitude and longitude into a human-
readable address (like "MG Road, Bengaluru").
It is useful when an app gets GPS location from the device and needs to show the
current address to the user.
🔹 How It Works in Android (Code Example):
Java
Geocoder geocoder = new Geocoder(context);
List<Address> addresses = geocoder.getFromLocation(lat, lng, 1);
 This returns a list of Address objects containing street, city, country, etc.
🔹 Uses in Mobile Apps:
 Maps and Navigation
 Cab services (Uber, Ola)
 Food Delivery (Swiggy, Zomato)
 Weather apps
 Location tagging in social media
Key Points (For Revision):
 Geocoding → Address to Coordinates
 Reverse Geocoding → Coordinates to Address
 Done using Geocoder class in Android
 Essential in location-aware mobile apps
✅ 5. Steps to Create Signed APK for Android AppSteps:
1. Open Android Studio
o Open your completed Android project.
2. Go to Build > Generate Signed Bundle / APK
o Choose APK, then click Next.
3. Create or Use Keystore
o A keystore contains your app’s digital signature.
o If you don’t have one, create a new keystore file.
4. Enter Keystore and Key Details
o Provide:
 Key alias
 Key password
 Keystore password
 Path to keystore file
5. Select Build Type
o Choose Release for production (Play Store).
o Click Next.
6. Choose Destination Folder
o Select the folder where you want the APK file to be saved.
7. Click Finish
o Android Studio will generate the signed APK in the selected folder.

✅ 6. Steps for Deploying Android App on Google Play Store


 Create Developer Account
 Sign up at Google Play Console
 Pay $25 one-time fee.
 Prepare Signed APK or AAB
 Use Android Studio to generate a signed APK/AAB.
 Test and optimize your app.
 Create New App
 Enter app name, language, and app type.
 Accept policies.
 Fill Store Listing
 Add app icon, description, screenshots, category, etc.
 Upload APK/AAB
 Go to Release > Production and upload your file.
 Set Pricing & Countries
 Choose Free or Paid, and select regions.
 Publish App
 Review all sections and click Publish.
 App goes for Google review and then gets listed.

✅ 7. Android Security Model


The Android Security Model is designed to protect the user, device, and app data. It
ensures that apps run safely without harming the system or other apps.
🔹 Key Features of Android Security Model:
1. Application Sandbox
o Each app runs in its own sandbox (isolated environment).
o Apps can't access each other’s data without permission.
2. Permission-Based Access
o Apps must request user permission to access sensitive data (like camera,
location, contacts, etc.).
o Android uses runtime permissions from version 6.0 (Marshmallow) onwards.
3. Application Signing
o Every app must be digitally signed with a developer's certificate.
o It verifies the authenticity and integrity of the app.
4. Secure Inter-Process Communication (IPC)
o Apps communicate via Intents and Content Providers, protected by
permissions.
5. Google Play Protect
o Continuously scans installed apps for malware and harmful behavior.
Summary Points:
 Apps are sandboxed for safety.
 Permissions protect user privacy.
 Signing ensures app trust.
 IPC is controlled.
 Google Play Protect adds real-time protection.

✅ 8. Steps to Publish an Android Application


1. Create Developer Account
o Sign up on Google Play Console and pay $25.
2. Build Signed APK/AAB
o Use Android Studio to generate a signed release file.
3. Create App on Play Console
o Enter app name, type, and accept policies.
4. Fill Store Listing
o Add description, icon, screenshots, and contact info.
5. Upload APK/AAB
o Go to Release > Production, upload the file.
6. Set Pricing & Regions
o Choose free/paid and select countries.
7. Submit for Review
o Complete all steps and click Publish.

✅ 9. Explain SMS Service in Android Application Development


Android allows apps to send and receive SMS messages using built-in classes and
permissions.
🔹 Key Components:
1. Sending SMS – Using SmsManager class:
java
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage("9876543210", null, "Hello!", null, null);
2. Receiving SMS – Using BroadcastReceiver and SmsMessage to read incoming SMS.
🔹 Permissions Needed:
xml
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
🔹 Uses of SMS in Apps:
 OTP Verification
 Alerts and Notifications
 Emergency messaging
 Promotional messages
✅ Summary:
 SMS service allows apps to send/receive text messages.
 Uses SmsManager and BroadcastReceiver.
 Requires specific user permissions.

✅ 10. Describe Process of Getting the Map API Key


To use Google Maps in your Android app, you need a Map API Key from Google Cloud
Console.
🔹 Steps to Get Map API Key:
1. Go to Google Cloud Console
o Open: https://console.cloud.google.com
2. Create a New Project
o Click on “New Project” → Enter project name → Create.
3. Enable Maps SDK for Android
o Go to APIs & Services > Library
o Search for Maps SDK for Android and enable it.
4. Create API Key
o Go to APIs & Services > Credentials
o Click “Create Credentials” → Select API key
o Copy the generated key.
5. Restrict the API Key (Optional but Recommended)
o Set application restriction to Android apps
o Add your app’s SHA-1 fingerprint and package name
6. Use the Key in Your App
o Add the key in AndroidManifest.xml:
Xml
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY"/>
✅ Summary:
 Create a Google Cloud project
 Enable Maps SDK
 Generate and restrict API key
 Add the key in AndroidManifest.xml

✅ 11. Develop Android Application for the Following Operations on Google Map
Operations:
1. Show Map
2. Zoom and Navigate
3. Get Current Location
🔹 1. Display Map
 Use a MapFragment in your layout to show the map.
In activity_maps.xml:
xml
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
🔹 2. Zoom and Navigation
 When the map is ready, set zoom level and move camera to a location.
Example in onMapReady():
java
LatLng delhi = new LatLng(28.6139, 77.2090); // Example: Delhi
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(delhi, 15));
🔹 3. Get Current Location
 Use GPS to get user location.
Add permissions in AndroidManifest.xml:
xml
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
java
FusedLocationProviderClient fusedLocationClient =
LocationServices.getFusedLocationProviderClient(this);
fusedLocationClient.getLastLocation().addOnSuccessListener(location -> {
if (location != null) {
LatLng myLocation = new LatLng(location.getLatitude(), location.getLongitude());
googleMap.addMarker(new MarkerOptions().position(myLocation).title("You are
here"));
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 16));
}
});

✅ Summary (In Very Simple Points):


 Map is shown using a fragment.
 You can zoom and move on the map.
 Location is found using GPS and shown with a marker.
 Permissions are needed to access location.

✅ Android Security Model


The Android Security Model is used to protect user data, apps, and the device from
unauthorized access and harmful apps.
🔒 Key Points:
1. App Sandbox
o Every app runs in its own space (sandbox).
o Apps can’t access each other’s data.
2. Permissions
o Apps must ask for permission (e.g., camera, location).
o User can allow or deny.
3. App Signing
o Every app must be signed by the developer.
o This ensures the app is trusted.
4. Google Play Protect
o It scans apps for viruses and threats automatically.
5. Data Protection
o Android uses encryption and secure communication to keep data safe.
✅ Summary:
 Android keeps apps separate.
 Sensitive features need permission.
 Apps must be verified.
 Google Play Protect scans for safety.
 Data is protected using encryption.

✅ Permissions Required for Android Application Development

🔸 What are Permissions in Android?


Permissions are used to control access to sensitive features of the device like camera,
location, storage, SMS, etc.

An app must request permissions from the user to use these features.

🔹 Types of Permissions:

1. Normal Permissions
o These have low risk.
o Automatically granted during installation.
o Example:
 Access to internet
 Set wallpaper
 Check network state
2. Dangerous Permissions
o These involve user’s private data.
o Must be granted by the user at runtime (after Android 6.0).
o Example:
 Access location
 Read contacts
 Use camera
 Send SMS

🔹 How to Declare Permissions:

In AndroidManifest.xml file:

xml

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

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

🔹 Requesting Permission at Runtime (for dangerous permissions):

Java

if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)

!= PackageManager.PERMISSION_GRANTED) {

ActivityCompat.requestPermissions(this,

new String[]{Manifest.permission.CAMERA}, 101);

}
✅ Examples of Common Permissions:

PERMISSION PURPOSE
INTERNET For using internet
ACCESS_FINE_LOCATION For getting GPS location
CAMERA To use device camera
READ_CONTACTS To access contact list
SEND_SMS To send SMS from the app
READ_EXTERNAL_STORAGE To read files from storage

✅ Explain Custom Permission used by application

🔸 What is it?

Custom Permission is a user-defined permission created by the developer to protect app


components from unauthorized access.

🔹 Why use it?

To allow only trusted apps to access specific parts (like services or activities) of your app.

🔹 How to define:

In AndroidManifest.xml:

xml

<permission

android:name="com.example.MY_PERMISSION"

android:protectionLevel="dangerous" />

🔹 How to use:

Apply it to an activity/service:

xml

<service android:name=".MyService"

android:permission="com.example.MY_PERMISSION" />

🔹 How other apps request it:

Xml
<uses-permission android:name="com.example.MY_PERMISSION" />

✅ Summary:

 Custom permission = Your own permission


 Used for security between apps
 Defined in the manifest
 Other apps must ask permission to access

✅Important Tasks to Become an Android Application Publisher

1. Create Developer Account – Register on Google Play Console (one-time $25 fee).
2. Develop & Test App – Make sure the app works properly.
3. Create Signed APK/AAB – Sign your app for release.
4. Prepare Store Listing – Add app name, icon, screenshots, description.
5. Set Rating & Price – Choose content rating and make it free or paid.
6. Upload App – Submit APK/AAB on Play Console.
7. Publish – After review, your app goes live.

You might also like