Android :: Consuming / Calling ASP.NET Web Service

Dec 17, 2009

I am trying to develop an application which calls the asp.net web service from android. I tried a lot but i got an exception while calling the SOAP_ACTION. I have tried with the localhost, local IP Address and also i have taken URL from the internet but it throws an exception.

Android :: consuming / calling ASP.NET web service


Android :: Consuming WCF Restful Service

Oct 30, 2010

I am trying to comsume a self-hosted WCF service which simply returns a String in JSON format. It takes a very long time around 2-3 minutes to get the response on Android Device, where as on any other computer it works fine. Could anyone help me on this?

View 2 Replies View Related

Android :: Getting JSON To Jersey Web Service And Consuming It

Jul 30, 2010

I've just recently started out with Android development, and have progressed to the point where I have written a very basic Hello World Jersey RESTful web service, and successfully called it from within my Android App.What I want to do now though, is send a new user record (just name and password for now) to a web service in JSON format.I can create my JSON in the Android app just fine, but I don't know how to get it into the HTTP Request in such a way that the corresponding web service that @Consumes JSON can get at it.

1) Create Android App User object

2) Turn that into JSON

3) Put it on the HTTP request

4) Call the web service

5) Web service retrieve JSON from request

6) Parse the JSON into server side User object and deal with as I see fit(Don't worry people, I'll be fine with this bit,

7) Profit! ;)

View 3 Replies View Related

Android :: Consuming WCF REST Service Is Very Slow

Aug 31, 2010

I have a WCF REST service built with C# and it returns an image as part of a CPU intensive operation. The client is running on Android (Java) By default, it will return a text JSON object that looks something like this:{"d",[9,0,77,12,11,...]}Those are they bytes of the image. Fine. However, all the solutions for decoding this JSON are intolerably slow. I've tried Gson, Jackson, and the built-in Android JSONObject class. I have no idea why they are so slow.As an alternative solution, I have my REST service return a GUID, and then that GUID can be used by the Android client to go to a regular URL that serves up the image as a regular binary stream, via an MVC controller. This works well, and it fast, and is pretty easy to handle on the Android side. However, it does feel like a bit of kludge and kind of a violation of the REST design principles.

View 4 Replies View Related

Android :: System Kills Service / No Other Resource Consuming Application Is Running

Mar 9, 2010

I just would like to ask if anyone have encountered this strange behavior with other phone models or specifically HTC Tattoo wherein I have this service running for almost 5 hrs then after sometime the system kills the service. The phone does not restart actually nor any other 3rd party applicaton running in the background. Its only the service I have is running. I was wondering what were the causes that would force to close my service. Another strange thing is that before the service was closed I still can see all the logs in the logcat but after I saw that the service was closed I don't see any log information already seems like the phone was totally disconnected from my eclipse.

View 2 Replies View Related

Android :: Calling Web Service

Sep 6, 2010

I am currently working on an application in android where I need to call the Web Service. I am working in Android and I don't have an idea about how to call a web Service in Android.So, can anybody please help me out in how to call a Web Service in Android Programming.

View 1 Replies View Related

Android :: Calling Activity From Service

Nov 19, 2010

i am writing an app in which i need a background service to call an activity and show some result.

View 4 Replies View Related

Android :: Get Calling Context In Service

Aug 30, 2010

So I'm working on a service that will handle requests to send data to a socket.I've done socket programming in a service before, but only within the same application. I'd like this to just sit and do nothing until any application wants to give it data to send. That's all well and good.I have register an intent filter and the usual stuff and can process the data. But I want to process the data coming from different activities in different threads (subsequent calls from the same application will be computed on the same thread).Is there a way to get the calling package or app or whatever? I'd prefer not to require passing in an identifier as an extra to prevent spoofing. (It's not a serious security concern, it's just each application needs its data processed in the order that it's received.)

View 1 Replies View Related

Android :: Exceptions With Calling Web Service Using IP

Nov 24, 2010

when I call web service from my machine using 'localhost' or 127.0.0.1 , I got exception. But if I give the public IP, it works fine. Why it is happening?And also, If I use my public IP, I can't access web service. But If I put the same code in another machine, and call that web service using the IP address of that machine, It works fine.

View 2 Replies View Related

Android :: Permission Denied When Calling Web Service

Jun 7, 2010

I'm trying to use .net SOAP web service with ksoap2 lib. Example from http://www.vimeo.com/9633556 shows how to do it correct. Below the code from that example. everything shoud work ok, but when I try to do a call inself (httpTransport.call) I get "Permission denied (maybe missing INTERNET permission)" exception. Moreover, I don't see in the Application info window among permissions the internet permission alert. Tried this on emulator and Google phone. Will be very appreciated if somebody could help with it. Thanks.

public void CelsiusToFahrenheit()
{
String SOAP_ACTION = "http://tempuri.org/CelsiusToFahrenheit";
String METHOD_NAME = "CelsiusToFahrenheit";
String NAMESPACE = "http://tempuri.org/";
String URL = "http://www.w3schools.com/webservices/tempconvert.asmx";..............

View 2 Replies View Related

Android :: Calling Method From Service Immediately

Sep 3, 2010

I'm pretty sure that android services are going to be the end of me.I have almost no hair left after the last few days.At first I was having a heck of a time getting the service to bind on an onclick of a button, got that straightened out from help here yesterday. Now I actually want the service to bind in the onCreate() method of the activity. That part is no problem, works as intended.My service is actually a socket service to connect TCP sockets to a socket server that I wrote.If I put the call to the method from the bound service mBoundService.StartSocketServer() inside a button click, bingo, works great. But I need this to fire up immediately when the activity loads, so directly under my bindService() call within my onCreate() method of the activity.When I place the call to start the socket inside my onCreate() I get a force-close.

This method (StartSocketServer()) spawns a new thread then opens the socket on that thread to my remote machine.I'm guessing that the problem lies with the new thread generation before the activity fully loads not sure.LogCat is fairly cryptic here. It does say something about thread attach failed, then shows an uncaught handler exception that has "Caused by: java.lang.NullPointerException" within it.Again, if I put this call to the method inside a button click, I"m in business, if it's in the onCreate() it fails. Is there some way inside an activity (presuming that my assumption is correct that it needs to fully load before spawning a new thread) to call the StartSocketServer() after it's loaded: ala body.onLoad() in html?

View 1 Replies View Related

Android :: No Value Being Returned With Ksoap Calling Web Service

Jun 3, 2010

I have a .Net Web Service which returns a single integer value. When i call upon it from my application, no value is returned. Nothing at all really happens. I set up breakpoints and watched it's progress and it seems the problem is coming from when i get to this line:androidHttpTransport.call(SOAP_ACTION, envelope);
I have a hunch that my URL string is the problem. I've tried replacing the "localhost" in my URL string with my local and network ip with no luck. Whenever i replace the localhost with the ip in my browser i get Server Cannot Access or Unable to Connect pages. Does anyone know a solution to this problem?

View 2 Replies View Related

Android :: Service Dies Without Calling OnDestroy

Dec 15, 2009

A service is setup by an activity with startService(service_intent). This service is meant to run 24 hours a day. After some amount of time, 5 or 6 hours sometimes but its not predictable, the service is killed.In the database log, the destroyed message does not show up and the notification #1 is not cancelled. Android makes no attempt to restart the service. The database log will show the startup of the replacement service if I trigger it by visiting the activity. What can I do to keep this service running or at least get it restarted by android automatically?

View 6 Replies View Related

Android :: Calling Background Service From BroadcastReceiver

May 24, 2010

I am trying to call a push notification background service from BroadcastReceiver class, but my application crashes.When I call this service through an Activity it's working, but my goal is to call this service from a BroadcastReceiver.

View 2 Replies View Related

Android :: Eclipse Plugin Calling A WCF Web Service In BasicHttpBinding

Nov 11, 2010

I'm trying to port an app over I wrote for the new Windows 7 Phone to the Android OS. I have Eclipse and the Android SDK. Can anyone point me in the right direction as to how I might call my WCF web service from my Java app? The WCF service is very basic and uses Soap 1.1 (basic http binding)

View 1 Replies View Related

Android :: Calling StopSelf In Service While Thread Is Running

Sep 14, 2010

Suppose I have code in the onStart() handler of my Service to launch a thread to do some stuff and then call stopSelf().stopSelf() gets called before the thread finishes.What exactly happens?I've tested this out myself and my thread continues to execute until it is finished.Does Android hear the stopSelf() call, but postpone it until the thread is finished?

View 1 Replies View Related

Android :: How To Serialize Double Value When Calling Soap Service?

Nov 19, 2010

I am having one web service and I have call that from the Android application by passing double value along with other values like String, int and float. When i call the web service I am getting Runtime exception saying cannot serialize the double value. Please some one help me to do call the web service if you know the solution.

View 1 Replies View Related

Android :: How To Stop Service Method Of Calling Activity Class?

Jul 2, 2010

I am trying to call my service class's stopService() method from my activity. But I don't know how to access stopservice method from my activity class. I have the below code but its not working. This is HomeScreen class:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
enablecheck = (CheckBox)findViewById(R.id.enablecheck);
enablecheck.setOnCheckedChangeListener(new OnCheckedChangeListener(){
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// TODO Auto-generated method stub
if(enablecheck.isChecked()){
startService(new Intent(HomeScreen.this, AutoService.class));
} else {
stopService(new Intent(HomeScreen.this, AutoService.class));
} } });
}
This is Service Class:
public class AutoService extends Service {
private static final String TAG = "AutoService";
private Timer timer;
private TimerTask task;
@Override
public IBinder onBind(Intent intent) {
return null;
} @Override
public void onCreate() {
Toast.makeText(this, "Auto Service Created", Toast.LENGTH_LONG).show();
Log.d(TAG, "onCreate");
int delay = 5000; // delay for 5 sec.
int period = 5000; // repeat every sec.
timer = new Timer();
timer.scheduleAtFixedRate(task = new TimerTask(){
public void run() {
System.out.println("done");
} }, delay, period);
}
@Override
public boolean stopService(Intent name) {
// TODO Auto-generated method stub
timer.cancel();
task.cancel();
return super.stopService(name);
} }

View 3 Replies View Related

Android :: Can Service Report Back To Calling Activity With Status

Jun 29, 2010

Is there a way that a Service can report back to the calling activity when the Service has reached a particular stage of processing? Consider a music player activity that initiates the actual music playing in the background as an Android Service. I want to detect and inform the Activity when the Service has reached the Mediaplayer's onPrepared. Is there a way that the Service can tell the calling Activity when the MediaPlayer's onPrepared is called, to let the Activity know that the audio is prepared and ready to play?I am basically looking to see if there is work around, rather than having a thread in the activity, pinging constantly to check if the Service has reached onPrepared.

View 2 Replies View Related

General :: ICS Find Which App Is Calling Service / Process

Jun 9, 2012

I am trying to reduce the battery consumption on my Note. I have several apps which use the GPS but the gpsd process is being called quite a lot, even when I am not using any GPS app.

Simple question - now that I have established which service is being called (using better battery stats) is there a way to determine which app(s) are using it? GT-N7000

View 2 Replies View Related

Android :: Block Non-Android Users Calling JSON Service

Nov 5, 2010

My Android application is calling a JSON service via HTTP and I would like to only allow my application to call the service and block others.What is the best way to do it?One way I can think of is using private/public key encryption. Can we embed a private key securely in the application?

View 3 Replies View Related

Android :: Emulator Is Very Slow And Consuming CPU Time?

Oct 10, 2009

few weeks ago I encountered a problem. My Android SDK 1.5 emulator became very slow and CPU consuming. This happened earlier, but was irregular just removing AVDs usually helped. Few weeks ago I installed Android SDK 1.6, tried to move my dev environment there and noticed that emulator runs very slowly. I rolled back to 1.5 and noticed that the same problem is there. What's going on: - emulator startup is pretty slow; - sometimes emulator hangs on startup; - sometimes after startup is complete I see Force close/Wait dialog for some Android applications/services (Alarm clock, messaging) - applications inside the emulator run MUCH slower than they ran before, I see delays in response even in launcher, when I just switching between icons with arrow keys (at this time CPU usage according to the task manager is from 35 to 50%, i.e. one core is completely busy). - now, when I'm typing this message, emulator (clean, newly created AVD, I haven't installed nothing there, just out of the box) occupied 50% of my CPU (and 140MB of RAM). Hardware: Intel Core2Duo T7500 (2.2GHz) + 2GB RAM. OS: Vista I don't have any problems with 1.6 on Linux (Kubuntu 7.10), emulator starts quickly, responds in a flash, and seldom consumes more than 20% of CPU time (usually in case my application is working with DB).

View 2 Replies View Related

Android :: How To Arrange Long (time Consuming) Actions?

Feb 10, 2010

For instance, we are in SomeActivity and the activity has a button that invokes moving files from one dir to another (let's call it job).On Android things change. I know there's the AsyncTask that is probably provided to solve my case. There's even a good example of how it should be used. But since there's no guarantee of how long an Activity instance will live the AsyncTask should be cancelled on onSaveInstanceState (and restarted on onRestoreInstanceState). This means using AsyncTask there's no guarantee we are able to fully fulfill the job once started. In some cases as sending an http post request for creating a user I would not want to get in "user already exists for this login" trouble on reruning the AsyncTask. This is possible since the AsyncTask can be interrupted while the request is already sent (and the server actually is doing its job - creating a new user), but the AsyncTask is canceled before we got the response.

View 2 Replies View Related

Android :: Need To Develop Application Consuming Ksoap2 Web Services

Jul 21, 2009

I need to develop the application consuming the ksoap2 web services .i have written php script in server i need to call that from server using ksoap2 in the xml form and should parse that response in the form of list . how can i do it i tried some example on ksoap i am not getting the response in xml form can any bode give me some help regarding this.

View 3 Replies View Related

Android :: How To Implement JNI Which Calls A Time Consuming Native Method

May 9, 2009

I need to implement a JNI which render image with 3-party native function. This function call is time consuming, it cost about 1s to return. I found during that time, even if I call the JNI within another Java thread, the whole Dalvik VM is blocked. UI is frozen. I guess that's because Dalvik doesn't implement Java thread with a native thread, so any time consuming native function call will block the whole VM. I wonder how to solve this problem. My best guess is I should create a pthread in JNI to call that 3-party native function. But I don't know how to implement this kind of JNI.

View 2 Replies View Related

HTC EVO 4G :: Maps Consuming Battery

Jun 16, 2010

Im having the a problem with maps. I killed it in task killer but it is still somehow consuming my battery. I haven't used it in 3 days.

View 6 Replies View Related

HTC Aria :: Something Consuming Data Plan

Jul 15, 2010

I'm a noob and this is my first phone with a data plan. I installed 3G watchdog and I see the usage going up even though I haven't done anything through the 3g network. I've done my app downloads and surfing via Wi-Fi and as the phone sits idle the usage creeps up ever so slightly. Is this from the phone updating and considered normal? The usage is about 1mb per day so after a month that's 30mb. Is something running in the background that shouldn't be and if so how do I find it?

View 3 Replies View Related

General :: Lowest Memory Consuming Text Messaging App?

Mar 26, 2013

what's the lowest memory consuming text messaging app?And maybe with feature like sms backup. I am currently using GoSMS but it consumes a lot of precious memory and I also can't hibernate it as I won't be able to know if I have received any message!

View 3 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







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