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 7927349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:16:04+00:00 2026-06-03T19:16:04+00:00

I have a requirement where I need to restrict access to an activity of

  • 0

I have a requirement where I need to restrict access to an activity of a Monodroid Application. Hence i tried a spike where the application IntentSayHello would have an access restricted Activity called SayHelloActivity. As the first step i defined the permission tag in the AndroidManifest.xml of the application as below:

...
...
  </application>
  <permission
    android:name="intentsayhello.permission.SAYHELLO"
    android:protectionLevel="signature" android:label="@string/permlbl_restricted"
    android:description="@string/permdesc_restricted">  
  </permission>
</manifest>

Please note that i’m using protectionLevel = signature which means that any other application signed with the same certificate as IntentSayHello can only access the restricted activity.

Now i coded the SayHelloActivity as below:

    [Activity(Label = "SayHelloActivity", MainLauncher = true, Icon = "@drawable/icon", Permission = "intentsayhello.permission.SAYHELLO")]
    [IntentFilter(new string[] { "companyXYZ.intent.sayhello.MAIN" },Categories = new string[]{Intent.CategoryDefault},
        DataMimeType = "vnd.companyXYZ.say.hello/vnd.companyXYZ.activity")]
    public class SayHelloActivity : Activity
    {  
     .....
     .....
    }

After this i tested with a client application by invoking SayHelloActivity of IntentSayHello through an implicit intent and i got SecurityException as expected.

Permission Denial: starting Intent { act=companyXYZ.intent.sayhello.MAIN typ=vnd.companyXYZ.say.hello/vnd.companyXYZ.activity cmp=IntentSayHello.IntentSayHello/intentsayhello.SayHelloActivity }
from ProcessRecord{4094f850 9126:DiffKeyHello.DiffKeyHello/10097} (pid=9126, uid=10097) requires intentsayhello.permission.SAYHELLO

Now if i want my client Application to be given access to the SayHelloActivity of the restricted application, i’m supposed sign my client application with the same keystore (certificate) and also mention in the AndroidManifest.xml of the client application as below:

...
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="intentsayhello.permission.SAYHELLO" />
</manifest>

But when i did both of this, the client application still could not invoke the SayHelloActivity and same SecurityException is thrown.

I would like to know the directions/solution to this issue.
Thanks

  • 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-06-03T19:16:07+00:00Added an answer on June 3, 2026 at 7:16 pm

    Further search in mono android forum, i found that another way of doing this is to explicitly add the androidmanifest.xml in the .csproj file as below:

    <PropertyGroup>
      <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
    </PropertyGroup>
    

    Either of the above solutions works, only i do not know which/both are correct practice.

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

Sidebar

Related Questions

While developing my WordPress application i have a requirement where i need to show
I am using Asp.Net/C# in my application,I have a requirement where I need to
Very simple problem. I have a Delphi application and I want to restrict access
I have a requirement where I need to be able to access a list
I have a requirement that I need to restrict my kids from browsing some
I have a requirement where I need to access the database in dotnetnuke. Do
Hi i have a requirement i need your help for it:- I have a
I have the requirement that I need to open a document in Microsoft word
I have a requirement that I need to show my records in a gridview
I have a requirement wherein I need to display on a User form, a

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.