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.

Android :: Consuming WCF REST service is very slow


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 :: 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.

View 6 Replies View Related

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 :: 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 :: How To Send A JSONObject To A REST Service?

Jun 11, 2010

Retrieving data from the REST Server works well, but if I want to post an object it doesn't work:...

View 3 Replies View Related

Android :: Authenticate To REST Web Service From Droid App?

Sep 24, 2010

I need to pull data from a REST web service in my android app. The web service requires authentication.
I need to first call a login method, which will return me an authToken and JSESSIONID as part of the response header. I need to pass these items back with every request. I'm currently using: org.apache.http.impl.client.DefaultHttpClient.DefaultHttpClient() to call the login method. I can see the authToken and JSESSIONID are being returned in the response header.
Are there any existing tools or classes that might provide some sort of management functionality that I can easily integrate with my android app?

View 1 Replies View Related

How To Call REST Web Service From Android Application

Jul 29, 2010

i want to call REST Web Service from application.

View 7 Replies View Related

Android :: Send Json String To .NET REST Service From Java?

Oct 27, 2010

i am trying to send a json string from my android client to my .net Rest service...

HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://myURL");

JSONObject json = new JSONObject();
json.put("name", "i am sample");
StringEntity str = new StringEntity(json.toString());
str.setContentType("application/json; charset=utf-8");
str.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json; charset=utf-8"));
post.setEntity(str);
HttpResponse response = client.execute(post);

Response is bad request. am i sending the json object as string? is this code correct?

View 2 Replies View Related

Android :: Droid Could Not Access Published Rest Service / Solve It?

Nov 18, 2010

I published the rest service.. but the android app is showing null pointer exception.. but if it access my local machine's service its working well.. the service hosted has anonymous access..

this is my android code...

View 1 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 :: Example Of Rest Webservice

Sep 30, 2010

can anybody give example of rest webservice in android

View 1 Replies View Related

Android :: Login To Facebook Using REST API

Dec 7, 2009

I develop facebook application in android. i want to log in to facebook via HTTPClient , teh user give me username and password and then i connect to facebook.com/login. i want to make like this code http://stackoverflow.com/questions/1409220/facebook-getting-incorrect-signature-104-when-getting-session-key/1795229#1795229. but in android, i tried to do that but when i get the session, a XML contain invalid parameter returned

View 2 Replies View Related

Android :: Screen Capture For Rest Of Us

Sep 8, 2010

I am looking for a screen capture utility that DOES NOT require a rooted phone.HOW IDIOTIC, suppose I want to screen capture as a user, to help a developer do documentation? This is absurd that there's no apps for the rest of us honest users.there's something if I connect it to my PC. C'mon, I don't have to connect my home PC to some other computer to take screen snapshots. I want an app that works on the phone itself, and does not require root access.

View 27 Replies View Related

Android :: REST And Listviews Refresh?

Jul 22, 2010

In my app, I have different activities with listviews. The datas come from a server with a REST method, and it's only done once, when I start the application.

The pattern that I'd like to set is to precharge all the listviews with the JSONs that I already have in local, and in parallel, launch a thread that get the new JSONs files with my REST methods, and then update the listviews.

For now, when I start the app, I parse my JSONs files, and build all the lists of objects. I access them later in a static way, from my lists adapters.

So I would like to know the best way to launch this REST thread, and update the listview. Should I use AsyncTask ? A service ? and then, when I update my local JSONs, I have to re-parse them, updates the lists of object, and call in my adapters NotifyDataChanged ?

View 2 Replies View Related

Android : Layout - Ad Comes On The Top The Rest Of Which Should Be Webview

Jan 8, 2010

I want to add admob add in my application, I want to make application for every screensize, I am having a problem with is, I want to arrange a layout such that, ad comes on the top the rest of which should be webview. I can do it for normal screen sizes by hardcoding the screen size to desired px but it is not working on bigger screensizes, I want to add this in layout.xml.

View 2 Replies View Related

Android :: OpenSource REST Client For Droid?

Aug 10, 2010

Is there any Opensource REST / RESTful Client / Library for Android ? Please share me the links.

View 7 Replies View Related

Android :: REST Vs JSON APIs / Differences Between Them?

Nov 10, 2010

Wondering what the differences between REST and JSON APIs are, how you interface with them, and how to go about parsing the results. My goal is to build a small application for my android phone to tell me when the next train will get to the subway station by my house, using the developer API provided by the transit agency.

I'm learning C++ in university, but hope to go about this in Java. I'm sorry if this is more of a discussion question rather than a black and white answer question, but I can't find any information elsewhere.

View 2 Replies View Related

Android :: Trying For Developing Phone Rest Client Applications

Jun 8, 2010

I've watched many of the Google IO talks and one that I'm trying to reproduce is "Developing Android REST client applications"[1]. In this talk Virgil suggests you should not execute your RESTful queries inside a Thread/AsyncTask spawned from your Activity (which I had been doing), instead you should use a more complex architecture that uses a combination of a ContentProvider and a Service. From what I understood the reason for this design was so your data was more persistent between app restarts, and so your queries don't disappear if your Activity starts/stops (e.g on a screen rotation). I buy into both those reasons hence I'm trying to implement this. On the slides[2] page 45 We have an Activity calling a ContentProvider. Now the ContentProvider checks its local database, if the content is not there it sends an Intent to a service which fetches the content, inserts it into the ContentProvider, then the ContentProvider calls back to the Activity (with a ContentObserver) and the Activity can carry on. The question I have is how is this callback setup. The ContentProvider exposes simple methods, query, insert, update, delete which don't seem easy to adapt to a callback interface. It could be implemented by a Cursor which is designed to block, but that could be problematic as you don't' want to block your UI Thread. I'd appreciate if anyone could make this clearer to me, or show me some code. I'm hoping the Twitter app will be open sourced soon which apparently uses this architecture.

View 16 Replies View Related

Samsung :: Developing Android REST Client Applications

Sep 1, 2010

I've read through the note of the topic "Developing Android REST Client Applications" from Google IO 2010, but I still have no idea on how to start. Can anyone show me a code example? Either the code for "Option A: Use a Service API" or "Option B: Use the ContentProvider API"

View 4 Replies View Related

Android :: How To Utilize REST To Post GPS Data Into Application?

Apr 14, 2010

I am a student in the process a building an Android app that can post a GPS track into a Rails application. I would like to do things the "Rails" way and take advantage of the REST. My rails application basically has 3 models at this point: users, tracks, and points. A user has_many tracks and a track has_many points. A track also has a total distance. Points have a latitude and longitude. I have successfully been able to create an empty track with:
curl -i -X POST -H 'Content-Type: application/xml' -d '<track><distance>100</distance></track>' http://localhost:3000/users/1/tracks

That is pretty cool. I am really impressed that rails do this. Just to see what would happen I tried the following:
curl -i -X POST -H 'Content-Type: application/xml -d '<track><distance>100</distance><points><point><lat>3</lat><lng>2</lng></point></points></track>' http://localhost:3000/users/1/tracks

Fail! The server spits back:
Processing TracksController#create (for 127.0.0.1 at 2010-04-14 00:03:25) [POST]
Parameters: {"track"=>{"points"=>{"point"=>{"lng"=>"2", "lat"=>"3"}}, "distance"=>"100"}, "user_id"=>"1"} User Load (0.6ms) SELECT * FROM "users" WHERE ("users"."id" = 1) ActiveRecord::AssociationTypeMismatch (Point(#-620976268) expected, got Array(#-607740138)): app/controllers/tracks_controller.rb:47:in 'create'

It seems my tracks_controller doesn't like or understand what it's getting from the params object in my tracks_controller.rb:
def create @track = @user.tracks.build(params[:track])

My xml might be wrong, but at least Rails seems to be expecting a Point from it. Is there anyway I can fix TracksController.create so that it will be able to parse xml of a track with nested multiple points? Or is there another way I should be doing this entirely?

View 1 Replies View Related

Android :: How To Design REST Writing PHP To Handle HTTPs?

Mar 2, 2010

In short, I am writing an Android application that I want to have pull data from a remote database. I was looking into .NET web services, but this http://stackoverflow.com/questions/297586/how-to-call-web-service-with-android question pointed me away from that direction.

Is REST as simple as writing some short PHP to handle something like https://www.example.com/data.php?employee=michael and have it return relevant XML or JSON data? That to me seems like what has been described to me by various sites and videos. Also, is this the best way to do this kind of operation over the internet for mobile devices, desktop applications, etc?

View 2 Replies View Related

Android :: How Can I Access Rest Of Stuff In Drawable Folder

Jul 22, 2009

How can I access the rest of the stuff in the drawable folder, such as the Android emoticons? I can use many of what is in the drawable folder by doing "drawable.XXX" but not all of them are available when I do that.

View 2 Replies View Related

Android :: Email Does Not Sync / Fix It - Get Rest Of Folders On Phone?

Sep 1, 2010

New to Andriod but seem to have figures most out, ...but.. I have added my hotmail account under the mail app standard on the sonyericsson x10, and the mail is comming through, but when I delete it on the web or laptop it does not delete it on phone neither does it update that I have read the email. It does sync but emails stay on phone. Any body have a fix or answer for me?
Also I have several folders in my hotmail account, the phone only displays Inbox, drafts, outbox, sent, trash. How do I get the rest of the folders on the phone?

View 1 Replies View Related







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