Android :: Multiple Permissions Of Service?

Aug 13, 2010

I have a service which both downloads a file and saves it, and it seems I can only specify one permission.

<service android:enabled="true"
android:name=".DownloadService" android:permission="android.permission.INTERNET">
</service>

or
<service android:enabled="true"
android:name=".DownloadService" android:permission="android.permission.WRITE_EXTERNAL_STORAGE">
</service>

Android :: multiple Permissions of Service?


Android :: How To Assign Permissions To Service?

Sep 24, 2010

I created an application that starts a service. This service is expected to run in background. This service has to access the Location. I am currently unable to do so I have given permission to my Manifest file I think the issue is that the application has the permission, but the Service does not ! What happens is that the service keeps running even if the application is stopped .Does the Service need special / different permissions ? How do I assign permissions to Service ( my service class extends : Service).

View 2 Replies View Related

Android :: Not Allowed To Start Service Intent In Permissions

Aug 8, 2009

Having trouble with permissions. The error I get is this: Not allowed to start service Intent { comp= {com.commonsware.android.service/ com.commonsware.android.service.WeatherPlusService} } without permission private to package I installed the WeatherPlus app from Mark Murphy's dev book. I'm trying to call his weather service from a different app. I think I have an issue with permissions, not really sure how they work. I thought that you could just make your own, and then check against it. With that in mind, listed below is the client manifest, followed by the service manifest. I called my permission "mypermission". Code...

View 3 Replies View Related

Android :: Multiple Instances Of Service?

Apr 15, 2010

I would like to do this, let me know if it possible in android?

App1 --> bindService() or startService() to AndroidService1 App2 --> bindService() or startService() to AndroidService1 (same service)

I would like App1 and App2 to get different instances of AndroidService1. Why I want to do this is say App2 doesn't need the service any more & it calls stopService() then App1 should still continue to work with its own instance of service app.

View 2 Replies View Related

Android :: Multiple Activities Binding To A Service

Aug 3, 2010

I have a service component (common task for all my apps), which can be invoked by any of the apps. I am trying to access the service object from the all activities, I noticed that the one which created the service [startService(intent)] has the right informaion. But rest does not get the informaion needed.

My Code is as below:

CODE:................

If I invoke startService(intent). it creates a new service and runs in parallel to the other service.

If I don't invoke startService(intent), serviceObj.getData() retuns null value.

View 1 Replies View Related

Android :: Service Interacting With Multiple Activities

Jun 29, 2010

I'm trying to refactor/redesign an Android app. Currently, I've one UI activity (Activity 1) that creates a DataThread. This thread is responsible for network I/O and interacts (provides data) with the UI activity via a handler.

Now, I want to add another activity (a new UI screen with Video) - Activity 2. Activity 1 is still the main activity. Activity 2 will be invoked when the user clicks a button on Activity 1. Activity 2's data also comes from the DataThread.

My idea is to put the logic of my DataThread inside an Android Service (DataService). My question is - can more than on activity bind to my DataService at the same time? Is there a way to tell the service to provide data to a specific activity only?

View 1 Replies View Related

Android :: Access Service Across Multiple Applications

Apr 19, 2010

I have a service that i need to access across multiple Applications. Can anyone tell me how this can be done?

View 6 Replies View Related

Android :: Multiple Applications Using Single Service

Jan 14, 2010

I have to write an application which starts a service. There will be other applications which have to use the service. Is it possible to write an application that only starts service and finishes with the service running?? How can i communicate from the different applications to the service? Is it possible to expose an interface from the service so that application can pass data to the service?

View 2 Replies View Related

Android :: Multiple Binds To Single Service?

Dec 25, 2009

Is there anything preventing more than one activity from binding to the same running service?

View 2 Replies View Related

Android :: Aidl's - Service And Multiple Packages

Jul 20, 2010

I've created a service that is meant to communicated to an activity using aidl's and callback functions. I got it working just fine with my test activity in the same package. But I was wanting to expose this service to different activities running in a completely different .apk file. Is it possible to accomplish this? What does the separate package need to bind to my service and register the callbacks? Or am I going about this completely wrong and should I try a different method for conveying information back and forth between two packages.

View 3 Replies View Related

Android :: Service Gets Instantiated Multiple Times

Sep 27, 2010

IIUC, there should only be one instance of a given service, it is a singleton. However, my (audio engine) service gets instantiated multiple times, although I do nothing for it. When the service crashes (for example when I uninstall the app through adb), it gets scheduled for restart ("Scheduling restart of crashed service.. "). I understand this is an effect of the service being sticky. After that, when my app starts, it calls startService() and bindService(), and the service gets appropriately started and bound. But the service is then reinstantiated and onCreate() is called repeatedly, as many times it was scheduled for restart.

Each instance then wait for clients to bind and register, but onBind() is only called in the "main" service instance. The additional instances wait a bit for client to bind, and since that doesn't happen, they call stopSelf(). But stopSelf() has absolutely no effect in these "dead" instances, onDestroy() is never called.
The "main" service instance does work as expected, and when it decides to call stopSelf(), onDestroy() is indeed called. Worse, all these dead instances accumulate, they never gets destroyed. Therefore, their only possible end is a crash (which happen every time I launch/install through adb), and thus scheduled restart.
So that in the end I get many of these dead instances, which are restarted progressively once by minute approximately.

View 3 Replies View Related

Android :: Best IM App For IM Junkie (multiple Accounts On Same Service)

Jul 22, 2010

I not only have accounts in all the major IM vendors/formats, but I also have multiple accounts with each service. I have found Fring and Agile, but they appear (from use and FAQ) that they can only support one user per service. Agile is awesome, as it understands how to send video/camera shots directly, and fring seems not to be able to as easy. But that is secondary to being able to load all your accounts, eh? I guess I'm looking for Digsby functionality for Android!

View 4 Replies View Related

Android :: Bind Service To Multiple Activities Advice

May 19, 2010

I'm new to Android development and am working on a small test project. I have a service, which communicates with an SQLite3 database, and two activities. A main activity which fetches database information via the service and displays it and a second activity which allows me to add data to the database via the service.

Currently, I have a singleton class which implements the ServiceConnection interface and I'm binding this to the service in the the main activity using the bindService function. Because it's a singleton, I can then use this service connection in both the main activity and second activity to work with the database and it all seems to work quite well.

However, I'm all the time aware that the service connection is bound to the main activity and I'm wondering if this is the wrong/bad way to do it? Would I be best off having two service connections, one in each activity, and binding each to the service?

View 2 Replies View Related

Android :: Handling Events From One Service For Multiple Activities

Jun 10, 2010

I have a class A which extends TabActivity and creates Activities B, C and D as tabs in its onCreate() function. Also, class A initializes another service handler class S which is responsible for establishing a connection to a service and implementing callback handlers for the service. Any of the Activities B, C and D should be able to receive events from the service and update accordingly. If I receive any event in class S from the the service then I want to call a function in Activity B which would be responsible to update the UI elements in Activity B based on the event received. You can assume that the user is in Activity B when the event arrives.

Can I call an activity function like the following in the stub handler for the callback in my class S -

CODE:................

View 4 Replies View Related

Android :: One Local Service Multiple Binding Activities

Nov 20, 2010

I have a local Service to which multiple activites needs to bind. In the first launched Activity, bindService returns true and onServiceConnected is called. But in any additionally launched activites bindService returns false, and I can't get a reference to my Service.

How can multiple activities simultaneously be connected to a local Service?

View 3 Replies View Related

Android :: Want Connected To Phone Service Between Multiple Activities?

Jan 15, 2010

I have multiple activities and one service.. In MainActivity I successfully connect to service (using a class what implements ServiceConnection + bindService() + startService()) but when i try to apply same method in other activity i see in LogCat a error... It Is possible to connect to service in an other way: something like to make static my CounterServiceConnection object in MainActivity and use it in the second one?

View 2 Replies View Related

Android :: Activity Bind To Service - Multiple Thread Design

May 28, 2010

A new question about android and services. Currently I'm developing a App that should send images to a server. It should also be possible to send more images parallel. I made a service that creates for every image a new image. The activity can bind to that service and gather information about the progress. I want to show the current status for every image in a notification (and when the user clicks a notification, an activity with the progress for that image should be shown). But I get several problems with that approach. There are errors with binding, the notification pending event starts the activity completely new, so I lose information about currently sending images and so on. How I could design in a appropriate way.

View 1 Replies View Related

Android :: Designing Service For Consumption On Multiple Mobile Platforms

Apr 27, 2010

I am building and designing a (mostly) read-only interface to some data. I'll be uing ASP.NET MVC to build a psudo-restful API. I'm wondering if anyone can provide some resources for building full-client applications for various mobile platforms, iPhone, Android, Blackberry, Windows Mobile, etc. I'm thinking that serving up XML data is going to be the most simple and universal, but parsing XML in objective-C for example doesn't sound like fun to me, but maybe there are some good libaries out there to help ease this task?

In other words, what formt will be the quickest to implement on the client side? Are there any JSON parsrs for iPhone or Android? I know there are .NET JSON parsers, but not sure about other platforms -- is ther another format that might better? Or should I stick with pure XML and deal with it on each platform differently?

View 5 Replies View Related

General :: App Update Permissions - Any Way To Restrict Permissions?

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

Android :: Same Service In Multiple APKs / Want "best One" To Launch

Dec 17, 2009

I have the same service in multiple APKs. In each of the APKs, I am going to launch the service. Because the APK are difference "applications" that have been installed & upgraded at various times, the service implementation in each may be different. I am trying to figure out a way to make sure startService() runs the implementation that is newest.

I have been fiddling around with PackageManager and Manifest meta-data and categories but I can't seem to get my head around it. It's really a leader-election problem... has anyone ever done this ? Any clues?

View 8 Replies View Related

Android :: Pros - Cons Of Multiple Activities In An App Vs One Activity - Multiple Views

Aug 16, 2010

Are there design guidelines to help decide if an application with multiple views should be designed with multiple activities or just one activity and control the back button itself.

I've tried both. My most complex applications using one activity per screen. However, now that I'm successfully written an app with just one activity and handling the back button myself, I don't see any compelling reason to use multiple activities. The one activity application is much simpler and more straightforward.

What advantages of multiple activities am I missing?

View 8 Replies View Related

Android :: Use Multiple Activities Or Multiple Content Views

Feb 18, 2010

I'm working on an application using xml layouts.

I wish to know which is better:
1. Use few activities and change its contentview
2. Use an activity for each 'view' needed

If both works, in which case which option would be better?

View 1 Replies View Related

Android :: Should App's With Multiple Layouts Have Multiple Activities To Handle Each

Jul 1, 2010

I'm planning to develop and app that presents the users with several different screens (of different information).
Was wondering what would be the best way to implement this?

Is it better to have separate XML layouts and an activity to display and allow the user to interact with each screen of data?

OR would handling all of these in the same activity be more efficient (and dynamically load / unload each layout)?

View 2 Replies View Related

Android :: Showing Toasts In A Service From Worker Threads With Service Reference

Jun 24, 2009

I have a service running in the background.I have a background thread that gets a reference to the service from the application's main activity. But when the background thread calls a method in the service to display a toast, I get the "Looper not initialized exception".Why,if I have a valid, bound reference to a Service, does this still happen?

View 4 Replies View Related

Android :: Unable To Start Service Intent Service Not Found

Aug 20, 2009

I am getting following message when i try to launch service.Also is there any specific path on file system where we need to place the .apk file which contains my serivce component only.

View 2 Replies View Related

Android :: Service Auto Restarts On Breakpoint When Debugging A Service

Jul 22, 2010

I am trying to run the sample soft keyboard included in the SDK. I am using the debugger, and the literature says that to use a breakpoint while debugging a SERVICE, I need to include:

android.os.Debug.waitForDebugger();

So here is the portion of the code I modified:

CODE:...........

I have put a couple of breakpoints, at the statements indicated by the comments.

This is what happens: the debugger first stops at the breakpoint1, for a few seconds. But then the service restarts. For the life of me I can't figure out what makes the service to restart.

View 3 Replies View Related

Android :: What Are These Permissions Used For?

Jul 30, 2010

In android manifest code these permissions are used sometimes.for what these are used?
<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.READ_PHONE_STATE" />
<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.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" />

View 4 Replies View Related

Android :: How To Get Interface On Service Without Destroying Service At Unbind?

Mar 1, 2009

My service works exactly the way i want as long as i use start and stop and communicate using intents. However my activity needs to change the state of my service as well as retrieving state information.So i thought it would be nice to broadcast some kind of state_changed event from my service and use a binder interface to pull information from the service or change the services state based on user input.This works fine too. The only problem is that my service gets killed when i unbind it just as the documentation says.Is there any way to keep the service alive but still get an interface to control it directly. My activity offers the user a way to stop the service and the service kills itself anyway after it's work is done but i don't want the service to stop every time the activity is destroyed.

View 3 Replies View Related

Android :: How Do Edit An App's Permissions?

Sep 25, 2010

I know where to go to view them, but how can you change them?

View 1 Replies View Related

Android :: Reducing Permissions

Aug 30, 2010

I've been following the "Is there a way to request permissions from a user as you need them?" thread with a lot of interest, but even if someone is convinced to make the Android permissions system better, it doesn't do anything for right now.

So, I thought I'd start a thread for coming up with alternative ways to reduce the permissions your app needs.

My app absolutely needs internet access (it's useless without it), and it uses Google Maps extensively (it's the main activity), so I have the following :

CODE:.................

I want to be able to know if I have a network connection, hence the ACCESS_NETWORK_STATE. I also try to use GPS hence the "ACCESS_FINE_LOCATION", and if GPS is not available I try to find the user's location using something else hence "ACCESS_COARSE_LOCATION" and of couse the "INTERNET" permission. I also use the "My Location' feature of Google Maps.

So... the question is : Is there a robust way to use Google Maps, and be able to send requests to my server without all those permissions (in a user friendly way) ?

I'm also experimenting with C2DM, so I have the following:

CODE:................

If I want to use C2DM, it seems I am stuck with those... Anybody know

Now... I also want to use the camera (optional) and vibrate (optional but most users will want it) so I have to add :

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

Total 10 lines of permissions in the manifest.... AND this is AFTER removing 4 other permissions that a small percentage of users would have found very handy, AND not adding a few other features because of the permissions bloat they would have added

CALL_PHONE READ_CONTACTS GET_ACCOUNTS SEND_SMS

So... given all of this, is there a way to reduce the permissions I need any more than I already have? AND why do I need a total of 8 permissions just to ask my server for the data they want, and try to keep them current using C2DM? Surely those permissions could be reduced somehow.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved