Android :: Add Permissions To App Manifest Programatically?
Nov 19, 2010
I am trying to add permissions to my application manifest, so it can access other apps that the user installs at runtime. I thought the way to do this was to define a permission-tree in the manifest, and then use PackageManager.addPermission() to add permissions under that tree. However, I can't get this to work and the documentation I found wasn't conclusive. Could anybody show me how to do this by means of a simple example?
View 3 Replies
Jul 23, 2012
The permissions say that you must agree to allow them to delete files from your storage including your SD card; must agree to allow them to extract any information from your phone, etc. In other words they can do any thing they want with your phone and the data in it.
Is there any way to not grant these permissions and still get updates?
View 2 Replies
View Related
Jan 22, 2009
I create my Network provider and I want to start Activity from it. Is it necessary to create separate Activity with Manifest and then launch it using startActivity? Can I launch unregistered Activity directly from my provider?
View 5 Replies
View Related
May 20, 2009
is there some way to retrieve the manifest.xml of an application from the market, without installing the application? I think the official Market Application somehow get this file (or at least parts of it) to show needed permissions, etc. before installing. I'd be interested in seeing the IntentFilters defined by applications and their activities and processing this information in my application.
View 6 Replies
View Related
Mar 12, 2009
Is it possible to have two application tags (<application>)in the same AndroidManifest.xml file ?If yes - is there anything special that needs to be done, I am trying it, the syntax is accepted by the XML parser but when I install my second application is not available.
View 4 Replies
View Related
Nov 3, 2010
I am writing an application that will run on 2.0 and above. Now, I am thinking of adding the Data backup feature to the application. Is there anyway to modify the manifest file to include the metadata only if the phone is using Froyo(2.2). Ideally, i would like to avoid creating a separate application for just Froyo.
View 3 Replies
View Related
Jun 5, 2009
How can i request the versionName stored in manifext.xml from within my Code?
>manifest.xml
View 2 Replies
View Related
Sep 14, 2010
This should be simple but I can't find any info on this...
I simply want to read the package value in the android manifest...
CODE:......
The reason is simple I have to call context.getResources().getIdentifier(...)and I need the package.
Since this code will be reused in other apps I want to make it fool proof when I export it and therefore not have to change the value each time.
View 2 Replies
View Related
Oct 22, 2009
How do I indicate in the manifest multiple packages
View 4 Replies
View Related
Jul 11, 2010
So, I added the receiver (contained in application) in the manifest. Broadcast doesn't fire my broadcast receive.
<receiver android:name="mypkg.IncomingCallReceiver">
<intent-filter>
<action android:name="android.telephony.TelephonyManager.ACTION_PHONE_STATE_CHANGED"/ >
</intent-filter>
View 4 Replies
View Related
Jan 10, 2010
I have two applications A and B (in different packages). A can send an explicit intent to B to perform some kind of action. Then,I enforced a permission in application B called "my.permissions.B_PERMISSION ". The A application can still call B despite the fact that it doesn't have the appropriate <uses-permission> in its manifest. Have I understood something wrong?
View 7 Replies
View Related
Mar 5, 2010
One of my users is experiencing an odd problem on network access via my application. Checking his logs shows up the following exception. The odd thing is that I have "android.permission.INTERNET" in application AndroidManifest.xml and many users have already used my app with no problem (I've launched it 4 months ago).
java.net.SocketException: Permission denied (maybe missing INTERNET permission) at org.apache.harmony.luni.platform.OSNetworkSystem.createStreamSocketImpl(Native Method) at org.apache.harmony.luni.platform.OSNetworkSystem.createStreamSocket(OSNetworkSystem.java:187) at org.apache.harmony.luni.net.PlainSocketImpl.create(PlainSocketImpl.java:266) at java.net.Socket.checkClosedAndCreate(Socket.java:872) at java.net.Socket.connect(Socket.java:1019) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init> (HttpConnection.java:62) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager $ConnectionPool.getHttpConnection(HttpConnectionManager.java:145) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager .getConnection(HttpConnectionManager.java:67) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.get HTTPConnection(HttpURLConnection.java:821) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.con nect(HttpURLConnection.java:807) at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.get OutputStream(HttpURLConnection.java:1150) ......
View 2 Replies
View Related
Sep 26, 2010
I would like to start my own SMS editor when user selects "Send message" from contacts application. How do I define intent in manifest file to allow passing contact details to the editor?
View 1 Replies
View Related
May 28, 2010
I have one Application class to keep the global state of my application. But I'm unable to register it in Manifest file? Any idea how to do this?
View 1 Replies
View Related
Apr 20, 2010
Declaring receiver for RINGER_MODE_CHANGED_ACTION in the manifest
View 2 Replies
View Related
Sep 10, 2010
In my thread I create an inner activity 'B' at one point in order to launch another activity for result. I need to declare this in my Android manifest file but can not work out what the name of it is as the standard ".B" does not work as it says that activity does not exist. How can I declare this activity?
View 1 Replies
View Related
Jul 5, 2010
I have a launched android application that works fine most of the time. However 1 in about 1000+ runs I get an android.content.ActivityNotFoundException: Unable to find explicit activity class exception. The activity is declared in my manifest and I've never seen it crash myself. It is declared like this...
CODE:..........
The crash reports show it failing on all OS's from 1.5 to 2.1.
View 2 Replies
View Related
Aug 30, 2010
I see that multiple broadcasts (ACTION_TIME_TICK, for example) cannot be registered in the manifest, the must be explicitly registered via Context.registerReceiver(). I am having trouble with the ACTION_USER_PRESENT broadcast intent. Specifically, I test on the emulator and my application keeps force closing with the error:
CODE:...................
This is caused by
CODE:.......................
My manifest is fairly simple:
CODE:........
I am essentially attempting to create a Receiver that is awakened as soon as possible after my application is installed. The first time it is awakened, it registers a few listeners, and then it unregisters itself so it is never called again. (I really wish there was an intent fired immediately after your app had been installed, to allow a small bit of setup.
View 1 Replies
View Related
Aug 16, 2010
In the android manifest on the first line "" I'm getting an error marker (with a red X). When I mouse over the red x it says- "Manifest attribute 'minSdkVersion' is set to '2.1'. Integer is expected."
View 1 Replies
View Related
Jan 30, 2010
I am trying to access http link using HttpURLConnection to download a file, but getting this warning in LogCat
WARN/System.err(223): java.net.SocketException: Permission denied (maybe missing INTERNET permission)
I have added android.Manifest.permission to my application but its still giving the same exception. Any suggestions?
View 4 Replies
View Related
Sep 3, 2010
The AndroidManifest.xml contains the version name of the application, something like: android:versionName="1.0"
Now the question - is it somehow possible to access this version name in the source code, so that I can display it for example in an About Dialogue?
View 1 Replies
View Related
Sep 27, 2010
My requirement is, I want to auto increament the android:versionName value on every compilation of my build in eclipse. I can access it through packageInfo api but how can I modify it without doing manually.
View 3 Replies
View Related
Sep 30, 2009
I have some code that starts another activity based on a menu item selection:
..........
I've spent quite a bit of time on this and am inclined to file a bug report at this point. I can see a reference to the allegedly missing class in the classes.dex file inside the APK and the code works properly in the emulator. I haven't been able to find anything like this, so if there is, an RTFM pointer will be humbly accepted.
View 4 Replies
View Related
Sep 6, 2010
I am trying to understand the main differences between registering a BroadcastReceiver in the Manifest and registering it programmatically...
My understanding is basically as follows - would appreciate someone correcting my points if I am missing something.
Registered in Manifest:
- The OS will magically find and instantiate your class if needed, calling the onReceive() method, regardless what the running state of your application was
- Your receive will only get called once per broadcast (i.e. You can consider that registering in the manifest is like registering your 'class' for receiving the broadcast - and the broadcast instantiates your class as needed) (??)
Registered Programmatically:
- registering in code means that you are registering instances of your class to receive broadcast messages (i.e. if your code is a little sloppy, and you manage to register several times, you will end up with multiple BroadcastReceiver instances all having their onReceive() called for a broadcast
- to deregister, you need to deregister the specific BroadcastReceiver instance that you previously registered
- if your application gets destroyed by the OS, your onReceive() method will not be called for a broadcast
View 1 Replies
View Related
Jul 4, 2010
I have a app that uses ads. The ad id is set in the manifest id with a meta-data tag. I want to change this tag when i start the app in some cases (diferent id for some localisations) Can i do this in code?
View 1 Replies
View Related
Oct 12, 2010
I have a custom title bar that I would like to apply to all my activities. I have searched online and found a few ways of doing that however I have ran into a problem. It seems that despite the fact I have a TextView in my titlebar with id @android:/title, Android will not use the value defined in the manifest in android:label for each activity.
I tried also calling setTitle(R.string.myTitle) but it still will not render it! If I manually put some text in my TextView in the xml it shows up fine. How can I have a custom title bar that is linked and makes Android use my manifest values for labels? I do not want to lose the setTitle() or the XML attributes functionality.
View 2 Replies
View Related
Sep 25, 2010
In android manifest file, there is a field specifies application version. if I can read that value programmically in my android code?
View 2 Replies
View Related
Aug 25, 2010
I have a tab host with two tabs. I want one of those tabs to be a search screen. The content for the tab is a ListActivity. I'm pulling the content from a web service. My problem is, when I execute the search a new intent is pushed onto the screen. I've used the android:launchMode="singleTop" property in my manifest for the search activity. What that seems to have done is, once the new intent is pushed on top of the TabActivity, every time I run the search it reuses that intent. But I want the already existing intent which is set as the tab's content to be the one it uses.
View 3 Replies
View Related
Aug 24, 2010
I have an application that listens for screen off, and user present intents. Since you cant register to receive screen off intents from the manifest, I am registering them in a service. Do I really need to have a whole service to ensure that I always get notified of when the screen shuts off, and the user unlocks the phone? Seems really wasteful :-(
The code I use in my service:
@Override
public void onCreate() {
super.onCreate();
Log.d(TAG, "Service created.");
// register receiver that handles user unlock and screen off logic
IntentFilter filter = new IntentFilter(Intent.ACTION_USER_PRESENT);
filter.addAction(Intent.ACTION_SCREEN_OFF);
BroadcastReceiver mReceiver = new ScreenReceiver();
registerReceiver(mReceiver, filter);
}
View 3 Replies
View Related
Jan 23, 2010
How do you retrieve the current version code of an app's manifest? I don't need to access another application, I'm talking about My app accessing its own version code.
View 5 Replies
View Related