I am a newbie in android. Can anyone help me in running my asp.net web service in android application. I tried using SOAP OBJECT but the application force closes. The web service is the simple one which takes my name and returns HELLO + "my name". HELP me in code.
You can use this is library to full fill you need
This is Tutorial telling how to use this library to call webservice
Note : Source code also available
don't forget to give internet permission on manifest file
<uses-permission android:name="android.permission.INTERNET"/>
Refer : See Dummy Class calling SOAP method
Related
i want to access a wcf service so i added it as a web reference in my xamarin android project but whenever i try to create its client it does not recognize it.
i am attaching screenshots in a step by step order
This is the working wcf service
I added it as a web refrence
whenever i try to create its object it shows an error
When i right click on the web reference and select view in object browser it shows nothing
I tried rebuilding my solution, disabling windows firewall..
The service is hosted on other computer. Shall i host this service on my system and then try again? or is there any other fix? i am in desperate help!!
Ap per you original question "whenever I try to create its client it does not recognize it", In third screenshot I have found that assembly reference is missing to WebReference1. Try adding reference to your namespace assembly
using UIDummy.WebReference1;
Now create its client and see whether it recognizes or not.
I tried rebuilding my solution, disabling windows firewall.. The service is hosted on other computer. Shall i host this service on my system and then try again? or is there any other fix? i am in desperate help!!
The added web reference functions as namespace, you need to access the specific class under this namespace, for example,If I have a HelloWorld class under this wcf service like:
public class HelloWorldService : IHelloWorldService
{
public string SayHelloTo(string name)
{
return "Hello World to you, {name}";
}
}
You can use it using below codes after you add it as web reference:
WebReference1.HelloWorldService service=new WebReference1.HelloWorldService();
service.SayHelloTo("name");
I would like to have a background service running all time that register the device using the Parse API and emits Push Notifications, while having the main app developed in Qt with QML/JS. My question is: Is this possible? How can I do it? Is there any code-like example or documentation?
This is because I would like to write my application using Qt (QML + JS) and use Parse on the server side with it's PHP SDK.
Thanks for any help!
this should help (commercial solution):
http://plugins.v-play.net/plugins/parse/
I want to run an android app using bluemix. I followed these steps:
http://www.ibm.com/developerworks/library/mo-android-mobiledata-app/index.html#N10131
But I'm facing an exception saying that the Application ID is not found:
Exception: 07-21 13:03:04.017: E/AndroidRuntime(1776):
java.lang.RuntimeException: Unable to create application
com.ibm.bluelist.BlueListApplication:
com.ibm.mobile.services.core.internal.IBMBluemixException:
IBMBLUEMIX-0042E: Initialization failed because
I have used my own Application ID, secret and route but I'm still getting this error. Can any one please help on this?
Based on the Message ID, I think this is the full error message.
"Initialization failed because no applicationId was specified"
#whitfiea is correct. You need to make sure the AppID is correctly specified for the Mobile Cloud application you are trying to reach (as well as check the other values, the appSecret and the appRoute).
The appRoute should be something like "BlueList.mybulemix.net"
I would also suggested downloading a new set of IBM Client SDK for Android JARs for your project. I would also recommend downloading a new copy of the BlueList sample from JazzHub, as corrections have been made to the application.
One final suggestion, create a new Mobile Cloud Application Backend, just to make sure you are at the current code levels for the client-side and the cloud side.
1.Please try applicationRoute in bluelist.properties file without any prefix like http.
Make sure your application is of type Mobile Cloud under boilerplates.
Verify the below step given in article.
Your Android app will need basic network capability and permissions, so we've included the following permissions in the manifest file. Open up the AndroidManifest.xml file to take a look.
Thanks.
I'm currently developping a phonegap app with backbone but i'm not able to fetch my data from a cross domain website.
Testing the app on android gives me no results but testing it in chrome with "chromium-browser --disable-web-security" gives me a success response with the data I need.
Using phonegap I added the following lines of code:
config.xml
<access origin=".*"/>
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
json
[
{
"id":"918",
"merk":"Yamaha",
"type":"YZF R1"
...
Its a valid json file.
My backbone collectionName.fetch() doesn't work, and doing a simple ajax call isn't working either inside the app.
Is there any reason why I cannot fetch my data from the api in my phonegap android app!
I really could use some help
cheers!
From the file:// protocol there should be no limitations regarding same-origin, see here: http://en.wikipedia.org/wiki/Same_origin_policy#Corner_cases_and_exceptions
However it could be the server doesn't allow access to requests originating from file:// url's, check your server log. To doublecheck you could also access a publicly accessible webservice like Google Geocoding (see comment).
Edit: this is actually wrong...
This likely is because cross domain is only allowed within the same protocol. Since your phonegap app runs from file:// this introduces problems when connecting via http(s):// protocol.
See am doing an android application,it has a web back end,am using wordpress as the web back end,but how can i code web services in wordpress?suppose i need to fetch some contents from database and pass it as json to android phones.So where should i place the php script or how can i do this?Is it possible to do web services using wordpress?
Here is the code:
$select_qry="select * from admin_details where username='$uname' and password='$paswd'";
$result=mysql_query($select_qry);
$rows=mysql_num_rows($result);
if($rows>0)
$admin_arr=mysql_fetch_assoc($result);
json_encode($admin_arr);
How can i do this in wordpress?
Please help me..
Thanks
You can follow these steps:
Create a template with your PHP code
Create a page. Let's say the admin page is /my-service. Assign the template you created in step 1 to this page.
Your adroid application can now call your wordpress service via the URL . mydomain.com/my-service.
Notes:
I assumed you meant a REST service.
Creating web services in WP is possible, but not ideal because URL pathing would be very hard. i.e. Wordpress wouldn't know how to parse /player/id vs /player/id/status .. the first asks for all the player data, the second asks for a particular attribute of a player.