DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • The 12 Biggest Android App Development Trends in 2023
  • Android Cloud Apps with Azure
  • Implement Real-time Locating in an Android App
  • How To Use Constraint Layout in Xamarin.Android

Trending

  • Spring WebFlux Retries
  • Parallelism in ConcurrentHashMap
  • Analyzing Stock Tick Data in SingleStoreDB Using LangChain and OpenAI's Whisper
  • How To Verify Database Connection From a Spring Boot Application
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Make your Android PhoneGap app less scary

Make your Android PhoneGap app less scary

Raymond Camden user avatar by
Raymond Camden
·
Feb. 22, 12 · Interview
Like (0)
Save
Tweet
Share
5.96K Views

Join the DZone community and get the full member experience.

Join For Free

For folks who are used to doing native Android development, this is old news, but for folks who may be new to it and coming from a PhoneGap perspective, I wanted to share a quick tip with you to help make your apps a bit less "scary" for your users. What am I talking about? Whenever you install an Android application, the device checks the app's descriptor file to see what permissions the app needs to run. By default, a PhoneGap Android app will simply have them all enabled. This means your users may see this...

And...

But wait, there's more....

That's three pages of text that most users won't bother reading, and those that do care will freak out since it's the app equivalent of a stranger asking to move into your house, become best friends with your dog, eat your food, and screw your spouse.

To change this, open up AndroidManifest.xml. Depending on your editor, you may get the plain text or a fancy editor. I recommend switching to plain text so you can see the following...

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />

This is - obviously - where your device would get the list of permissions it thinks the app requires. The docs do not make it very clear what the minimum requirements are, but from what I know (and Google), the minimum requirements are:

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

Most Google results mention android.permission.READ_PHONE_STATE as well, but that's not available in the 2.3.3 project I just created. Keep it in mind though as it may be present in other SDK versions. Here's how the install screen looks after this change:

 

From http://www.raymondcamden.com/index.cfm/2012/2/13/Make-your-Android-PhoneGap-app-less-scary

app Android (robot)

Opinions expressed by DZone contributors are their own.

Related

  • The 12 Biggest Android App Development Trends in 2023
  • Android Cloud Apps with Azure
  • Implement Real-time Locating in an Android App
  • How To Use Constraint Layout in Xamarin.Android

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: