Android Manifest Permission Requests for Android Apps- Hive Programmers

in StemSocial9 months ago

Greetings to my favorite Science community online, StemSocial.

It's @skyehi and we have finally entered a new year, 2024. It's been a successful year for me starting my series on Android App Development Tutorials for Beginners and I absolutely intend to continue it this year.

For my very first episode of the series this year, we're not exactly going to be building any App in particular but I'll share a blog about Android App permissions Requests.

Polish_20240101_150827826.jpgOriginal Image Source by cottonbro studio from Pexels

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

The Android Apps we build sometimes needs access to certain services or tools of the Android device.

For example, if we're building a barcode scanner App, the App would probably use your phone's camera system to scan the barcodes of products.

This would mean that, the App would need to request the permission to access the device camera.

As a developer, these permissions requests are so important for two main reasons.

The first reason is for the App to actually work. When building Apps, if you write a code to use a service and you do not request permission to access that service, it will not work at all.

I quite remember spending over 2 hours just trying to figure out why a Browser App I was building was just not showing the WebView element I designed.

Until I realized that I had forgotten to request internet permission since the App would need the internet to display any website.

That 2 hours worth of frustration made me understand the value of always requesting permission if your App will need the service.

The second importance of requesting permissions is to tell the users of your App, which services your App is accessing on their Android device.

When you go to the details menu of any App on the Google Play Store, you see the permissions requests or services that App would have access to.

Here's a screenshot I took on an Android phone of the permissions requests the developers of the famous Short video streaming App, TikTok made while building their App.

Polish_20240101_134803490.jpg

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

It would be shown in the details of their App on Google play store so that any user that wants to download the App would know the services the App is going to access on their phone.

From the screenshot above, Titkok requested to access;

  • Camera since users use the camera,
  • Contacts because you can share and sync your contacts on the App
  • Location because the App would need their user's specific location to show location based videos
  • Microphone because the content creators can use audio recording as part of their video recordings
  • Storage since videos can be downloaded to the device memory.

They had other permissions too which I'll get into in future blogs but the point I'm trying to make is that since they needed to use all those services, they had to request the permission inside the AndroidManifest.

So at least if you want to know how the Android Manifest of the Android version of the famous TikTok App looks like, well we can be sure they've got all those permissions requests. This ain't hacking ok 😂

So guys for today's blog I just wanted to share about 20 of the most used permissions so that just incase you don't know or have forgotten, you can totally refer to this blog.

Of course Android Studio has an auto completion system for when you attempt to write a code so they can show you a lot of the permission too.

2dk2RRM2dZ8gKjXsrozapsD83FxL3Xbyyi5LFttAhrXxr16mCe4arfLHNDdHCBmaJroMz2VbLrf6Rxy9uPQm7Ts7EnXL4nPiXSE5vJWSfR53VcqDUrQD87CZSpt2RKZcmrYrze8KanjkfyS8XmMCcz4p33NZmfHE4S9oRo3wU2.png

INTERNET Permission

  • The Permission Request Code

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

This Permission allows apps like Chrome or Facebook to access the internet of the Android Device.

CAMERA Permission

  • The Permission Request Code

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

This Permission allows apps like Instagram or Snapchat to use the device's camera.

READ_EXTERNAL_STORAGE Permission

  • The Permission Request Code

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

This Permission request is needed by Gallery apps or any App that would need to read images from external storage.

WRITE_EXTERNAL_STORAGE Permission

  • The Permission Request Code

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

This particular permission request code is mostly used by file manager Apps and any other App that would need to save files to the external storage of the user's Android device.

ACCESS_FINE_LOCATION Permission

  • The Permission Request Code

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

GPS navigation apps like Google Maps need this permission request for precise location information of users

READ_CONTACTS Permission

  • The Permission Request Code

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

Contacts apps need this permission to display and manage contact information.

SEND_SMS Permission

  • The Permission Request Code

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

Messaging apps like WhatsApp, telegram and essentially any texting App use this permission request to be able to send text messages.

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

RECEIVE_SMS Permission

  • The Permission Request Code

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

This Permission is required for SMS apps to receive and display incoming messages.

READ_PHONE_STATE Permission

  • The Permission Request Code

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

All Phone-related apps use this permission request to access information about the phone state.

CALL_PHONE Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.CALL_PHONE" />
    ```
    

Most dialer Apps utilize this permission request to initiate phone calls.

BLUETOOTH Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.BLUETOOTH" />
    ```
    

Bluetooth file transfer apps need this permission request to enable Bluetooth functionality in the App.

So an App like Xender that can share files via Bluetooth probably uses this permission.

NFC Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.NFC" />
    ```
    

Apps like Google Pay use this to enable Near Field Communication for contactless payments.

WAKE_LOCK Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    ```
    

Alarm clock apps use this permission request to keep the device awake for timely notifications.

VIBRATE Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.VIBRATE" />
    ```
    

This particular permission request is used by games and also messaging apps to trigger device vibration.

So when your phone vibrates while shooting in a game or receiving a text on Whatsapp, that App definitely requested this permission in Android Manifest.

READ_CALENDAR Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    ```
    

Calendar apps require this permission request to access and display calendar events.

I remember building a schedule App in this series and I got to use this permission to access phone calender.

WRITE_CALENDAR Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    ```
    

This Permission request is used by scheduling apps to add events to the device's calendar.

ACCESS_NETWORK_STATE Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    ```
    

This Permission request is mostly used by Network speed testing apps to determine network connectivity and also we can use this permission in Apps that would need to check if device Internet is on or off.

RECORD_AUDIO Permission

  • The Permission Request Code

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

Voice recording apps need this permission to record audio of a user.

READ_SMS Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="android.permission.READ_SMS" />
    ```
    

Most SMS backup apps use this to read and store SMS messages.

READ_HISTORY_BOOKMARKS Permission

  • The Permission Request Code

    ```xml
    <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
    ```
    

Browser apps like Chrome use this to access browsing history and bookmarks.

2dk2RRM2dZ8gKjXsrozapsD83FxL3Xbyyi5LFttAhrXxr16mCe4arfLHNDdHCBmaJroMz2VbLrf6Rxy9uPQm7Ts7EnXL4nPiXSE5vJWSfR53VcqDUrQD87CZSpt2RKZcmrYrze8KanjkfyS8XmMCcz4p33NZmfHE4S9oRo3wU2.png

That's all for today's blog guys. I hope you enjoyed this tutorial. From tomorrow we're going to be continuing our programming tutorial by building Apps.

We're slowly getting closer to the Intermediary level where we build more complex Apps and designs.

I'm happy to be part of this community and to contribute to this level. Thanks for the support last year and I'm looking forward to greater content this year. Happy New Year to @stemsocial and everyone

Have a great day and catch you next time on StemSocial. Goodbye 👨‍💻


You Can Follow Me @skyehi For More Like This And Others

Sort:  

Very interesting information! Never thought about this type of integration with android!

`


Want to Know more about Hivepakistan?

Ping Us On Hive Pakistan Discord server

To support HivePakistan, delegate Hive Power to hivepakistan and earn 90% curation reward :)

Here are some handy links for delegation


| 50 HP | 100 HP |500 HP | 1000 HP | 5000 HP | 10000 HP | 20000 HP |

A delegation of 500 or more HP makes you earn Hivepakistan supporter badge.


`

Thank you so much for the compliment, It's a whole series that started almost two months ago.... I'm proud we entered the new Year. I am committed to making more ❤️ happy New Year

Wonderful series from you,

Thank you so much really appreciate your comment

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

Thanks for including @stemsocial as a beneficiary, which gives you stronger support.