Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6200615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:24:06+00:00 2026-05-24T04:24:06+00:00

What is the difference between asking for permission using <uses-permission> , and android:permission inside

  • 0

What is the difference between asking for permission using <uses-permission>, and android:permission inside the application and activity tags?

When I only use:

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

The app runs fine, however if also I use:

<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true" 
android:permission="android.permission.WAKE_LOCK">

or even:

<activity android:name=".android.Everlong"
          android:label="@string/app_name" android:screenOrientation="portrait" 
          android:permission="android.permission.WAKE_LOCK">

The app doesn’t start because of a security error…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:24:07+00:00Added an answer on May 24, 2026 at 4:24 am

    From the documentation:

    android:permission

    The name of a permission that clients must have to
    launch the activity or otherwise get it to respond to an intent. If a
    caller of startActivity() or startActivityForResult() has not been
    granted the specified permission, its intent will not be delivered to
    the activity. If this attribute is not set, the permission set by the
    element’s permission attribute applies to the activity.
    If neither attribute is set, the activity is not protected by a
    permission. For more information on permissions, see the Permissions
    section in the introduction and another document, Security and
    Permissions.

    uses-permission — At install time (of your App) the user must accept this permission.

    android:permission — When another App wants to call your App, you can specify which permission they need to request (at install of the other App) to call you.

    Basically, if another application wants to call YOUR Activity via an Intent, and you specify that you require a permission in this way, that App must have access to that permission. Otherwise, the Intent will be rejected by your App.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the difference between event objects and condition variables? I am asking in
Is there any difference between doing this... using System.Xml.Linq; XDocument xml = XDocument.Parse(page); or
Is there any difference between placing the #pragma once inside the include guards as
Is there a difference between compiling projects in *nix environments and MS Visual C++?
What's the difference between these two ways of declaring a function? function someFunc() {
Is there a performance difference between TCP connections to: localhost / 127.0.0.1 a domain
What is the difference between MVC1 and MVC2 ? Is everything in MVC1 also
What are the difference between three modes in rails like:- In development mode, Rails
What's the difference between: class Child(SomeBaseClass): def __init__(self): super(Child, self).__init__() and: class Child(SomeBaseClass): def
what is the difference between <asp:DropDownList ID=Combo OnSelectedIndexChanged=Change AutoPostBack=True runat=server/> and <asp:DropDownList ID=Combo SelectedIndexChanged=Change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.