[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Chandra Mouli
I tried a similar aidl thing a week ago. I hope you r binding to the service like bindService(*new*Intent(IRemoteService. *class*.getName()),Conn, Context.*BIND_AUTO_CREATE*); Going by the error it looks like you missed the intent filter tag for your service... i.e. On Thu, Feb 12, 2009 at

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans
When I built my client/service code I had two projects, one for the client (the Activity) and a different project for my Service. Now, I spent about 3 hours struggling until I realized that for some reason (probably because I was using an out of process service) I needed to not only declare my se

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Dianne Hackborn
That really should not fix things. :} I suspect that whatever is happening now is really not what you want. If the -real- service you are wanting to bind to does not have an intent-filter, you need to make sure you use android:exported="true" on it so other .apks can find it. Also you can do "ad

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans
I will try that, thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans
It didn't work. I commented out the service declaration in my Activity's manifest: And modified my service's manifest to include 'exported' like this: http://schemas.android.com/apk/res/android"; package="com.android.TestService" android:versionCode="1" android:versionName=

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Dianne Hackborn
Um. This is the package your service is in: http://schemas.android.com/apk/res/android"; package="*com.android.TestService*" And yet you are trying to start a service in the other package: Unable to start service Intent { comp={*com.android.servicemonitor*/com.android.TestService.TestServi

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans
On Feb 12, 2:47 pm, Dianne Hackborn wrote: > Um.  This is the package your service is in: > > http://schemas.android.com/apk/res/android"; >      package="*com.android.TestService*" > > And yet you are trying to start a service in the other package: > > Unable to start service > Intent { > comp=

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans
It turns out that you can avoid using the service reference in your client manifest if you declare what I presume is a global name in your service's manifest and simply refer to this name in your client code. This is what I added to my service's manifest: Then I could delete the entry in my c

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Dianne Hackborn
I replied to this in the other thread, but if you want to explicitly reference a component from one package that is in another, you need to explicitly build the ComponentName of both the package and class name of the target. The shorthand new Intent(this, ...) creates ComponentName objects whose p

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-12 Thread Hans
On Feb 12, 5:09 pm, Dianne Hackborn wrote: > I replied to this in the other thread, but if you want to explicitly > reference a component from one package that is in another, you need to > explicitly build the ComponentName of both the package and class name of the > target.  The shorthand new In

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-13 Thread Sunil . Maharana
by: android-developers@googlegroups.com 02/13/2009 01:40 AM Please respond to android-developers@googlegroups.com To Android Developers cc Subject [android-developers] Re: Unable to start service Intent error in Client-Server project On Feb 12, 2:47 pm, Dianne Hackborn wrote: > Um. T

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-13 Thread Android
Hi All, When my client code calls bindService it was fine and it calls onServiceConnected, there i am calling the interface method using the .Stub.asInterface(service) object and there only it gives me bunch of error as: 02-13 17:14:52.239: WARN/Parcel(1035): enforceInterface() expected

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-13 Thread Hans
Sunil, I'll zip up my test projects (a client in its own package and *.apk and a remote service it its own package, and *.apk, exposing 2 interfaces and using callbacks into the client), I'll post the URL here when I've done it. Hope it helps :). --~--~-~--~~~---~--~--

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-13 Thread Hans
Here's the URL: http://www.plugin-factory.com/storage/workspace.zip There are two projects in it: (1)ServiceMonitor - a simple activity that has 3 buttons and a text view. One buttons starts and binds to the service, the other stops and unbinds from the service, the third is a query button

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Sunil . Maharana
Hi Hans, Thanks for your help Hans, i have created two projects same as your project name and added your files, the TestService project is fine, but for  ServiceMonitor project it is giving error at the import statement only.It is not allowing to import the TestService as  "The import 'com.android

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans
Make sure you have added TestService to your build path for the service monitor :). I'm new to Eclipse myself :). The two projects are in the same workspace, yes? Just different folders I presume? The zip file I provided was the contents of my workspace, it had those two folders in it. You sh

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans
You should only need the AIDL file to reside in the TestService's folder because the IDL compiler will find it there. Again, make sure you have your build path setup properly for Service Monitor. Iirc, I tested this on a laptop I'd not used for anything and it built for me straight away when I p

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Dianne Hackborn
There apparently is an implementation of that class in your local client .apk. It is very clear from the logs that the client is trying to interact with -some- component in its package, as you can see right in the component name. On Thu, Feb 12, 2009 at 2:37 PM, Hans wrote: > > On Feb 12, 5:09

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Dianne Hackborn
On Sat, Feb 14, 2009 at 7:38 AM, wrote: > import com.android.TestService.*; Is this code part of the android platform? No? Then please don't use this namespace. Thanks. :) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans
I'm not trying to be argumentative for the sake of being argumentative Dianne, but if that was the case, how could the IPC calls to the remote process be resolved if they are only declared in the manifest for the service project which is in a different *.apk? This would mean that android was acci

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans
On Feb 14, 3:12 pm, Dianne Hackborn wrote: > On Sat, Feb 14, 2009 at 7:38 AM, wrote: > > import com.android.TestService.*; > > Is this code part of the android platform?  No?  Then please don't use this > namespace.  Thanks. :) > > -- > Dianne Hackborn > Android framework engineer > hack...@andr

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans
Crud Suni - I accidentally left an error call (from when I was testing out the weirdness of service creation the 'wrong' way) in the "StartService" method in the Service Monitor class... Right below the comment "//Attempt to start the service" there's a call: startService( new Intent( this, Test

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Hans
Fixed and re-uploaded in case anyone else uses it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe fro

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-14 Thread Dianne Hackborn
On Sat, Feb 14, 2009 at 1:14 PM, Hans wrote: > I'm not trying to be argumentative for the sake of being argumentative > Dianne, but if that was the case, how could the IPC calls to the > remote process be resolved if they are only declared in the manifest > for the service project which is in a d

[android-developers] Re: Unable to start service Intent error in Client-Server project

2009-02-15 Thread Sunil . Maharana
o android-developers@googlegroups.com To Android Developers cc Subject [android-developers] Re: Unable to start service Intent error in Client-Server project Make sure you have added TestService to your build path for the service monitor :). I'm new to Eclipse myself :). The two projects a