I need to add it to my android manifest, and last time I did this (for internet permission) it was as easy as clicking Project -> Build Options -> and checking a box next to internet in the permissions. I don't see a check box for anything like Services or Android Services. How do I allow them in my manifest?
@KlutchSC You should already know to state what you have tried, and what you have tried is not working you should provide errors or description of what you are experiencing. Your Opening Post did not mention any of that, hence I sent you in the direction of the official documentation and samples, which should basically show you how to do this. I can't see why you find that rude, given that you did not provide enough information.
Adding a
[Service] attribute should generate the appropriate AndroidManifest.xml entries, which you can see in your
obj folder after you have built your project. It will NOT show up in the AndroidManifest.xml file you have in your project. Check that and see if they have been added appropriately.
Answers
You look in the documentation and find out you need to add a
Serviceattribute to your Android Service. If that is not enough for you, look in Xamarin's sample repository to find a Service Sample
-1 · 1Like
- 2Abuse
I find your answers to be very rude and please keep them out of my questions from now on. Thank you.
I went to the documentation and it told me to add it to an XML file. I don't have that in my build, as I said I added to my manifest in a completely different way then it is telling me in the online documentation.
If you can't help please don't post.
0 · Like
- Abuse
What documention have you read that tells you to add it to an xml file and it hat case which xml-file? What you have done in a different case has nothing to do with what you maybe have to do in this case. That you should know. It isn't always as easy as use a checkbox. And have you tried to do what Cheesebaron told you to do? What error do you get then? Or doesn't it work with that change?
0 · Like
- Abuse
yes I have tried what CheeseBaron told me to do.
I added (even before I came here) [Service] above the namespace as to inherit from the ServiceAttribute custom attribute. This is what it told me will auto-generate the service in my manifest on build.
I have done all this and it is still telling me (after I try to build) that I am missing it from my manifest.
I know that the Android Manifest is an XML file.
I would like to know how to generate the actual xml file (Manifest) so that I can manually add in my service.
That would be quite dumb to not allow it's developers to actually see and manipulate the xml file it's using for a manifest to build their solution.
0 · Like
- Abuse
Are you using visual studio or xamarin studio?
Ther you have what to do to get your manifest.xml
0 · Like
- Abuse
Instance {System.Net.WebException: Error: ConnectFailure (Network is unreachable) ---> System.Net.Sockets.SocketException: Network is unreachable at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in :0 at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x00000] in :0 --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00000] in :0 at System.Net.HttpWebRequest.GetRequestStream () [0x00000] in :0 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String method_name, System.Object[] parameters) [0x00000] in :0 } System.Net.WebException
0 · Like
- Abuse