Notes
Notes
Ans –
Create an APK (Android Package) file for your app. This file contains all the necessary
resources and code for your app to run on Android devices.
Sign up for a Google Play Console account if you haven't already. You'll need a
Google account to do this.
Provide necessary information such as developer name, email address, and payment
details.
Create a new app by clicking on the "Create app" button and follow the prompts.
Fill in the details for your app's store listing, including title, description, screenshots,
promotional graphics, categorization, and contact details.
4. Upload APK:
Upload your APK file under the appropriate release track (e.g., production, beta,
alpha).
After uploading your APK, Google Play Console will perform checks to ensure it
meets quality and policy standards.
Once your app passes review, you can proceed to publish it by clicking the "Start
rollout to production" button.
1. **Declare Permissions**: In your app's `AndroidManifest.xml` file, declare only the permissions
that are considered dangerous or critical for the app to function.
2. **Check Permissions at Runtime**: Before performing operations that require permissions, check
if the permission is granted by the user. You can use the `ContextCompat.checkSelfPermission()`
method to check if a permission is granted.
3. **Request Permissions**: If the permission is not granted, request the permission from the user
at runtime. You can use the `ActivityCompat.requestPermissions()` method to request permissions.
5. **Explain Permission Requests**: When requesting permissions from the user, provide a clear and
concise explanation of why the permission is needed and how it will be used in the app.
6. **Handle Permission Denials**: If the user denies a permission request, gracefully handle the
denial and adjust the app's behaviour accordingly. You can also provide guidance on how the user
can manually grant the permission in the device settings.
7. **Test Customized Permissions**: Thoroughly test your app to ensure that the customized
permissions implementation works as expected and that the app behaves correctly in various
permission scenarios.
TelephonyManager
SmsManager
SmsProvider
SmsMessage
MmsMessage
Ans –
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 other
applications.
Therefore, one application does not have access to other applications’ files.
Android application has been signed with a certificate with a private key.
This allows the author of the application to be identified if needed. When an application is
installed in the phone it is assigned a user ID, thus avoiding it from affecting 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.
This is a way to ensure that a malicious application Cannot access / compromise the data of
the genuine application.
It is mandatory for an application to list all the resources it will Access during installation.
Q4. Elaborate the need of permissions in Android. Explain the permissions to set system
functionalities like SEND-SMS, Bluetooth.
Ans - 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.
Allows the app to send SMS messages. This may result in unexpected charges. Malicious apps may
cost you money by sending messages without your confirmation.
Allows the app to initiate and accept Bluetooth connections. Apps that utilize Bluetooth
functionality need this permission.