Android :: Strange Error With Return String From Web Service
Aug 13, 2010
I have a strange issue. I am using KSOAP2 to create a soap request to a .net webservice. I do this in a few other places and everything works fine. The webservice basically queries a data base and takes the values from the data reader and creates a string. This string is then returned. When I run the webservice on my local machine(Without using android) it works fine. When I run it from the webserver (still not android) it works fine. When I call it from my phone however the line: String hazards = (String)envelope.getResponse().toString () ; //Get response from .net Web service Simply is filled with anyType{}. Now if I go to the webservice and I manually type in the contents from the database to represent what the string concatenation should be it works perfectly. The line: String hazards = (String)envelope.getResponse().toString(); //Get response from .net Web service Now returns the string value i need. Does anyone have any idea why this is happening or know a better place to ask this question?
View 4 Replies
Nov 11, 2010
I am new in Android. I encounter the following situation, I have a background running service, which will get a keep-updating string from a webpage, I need to show this keep-updating string in my UI through Activity, since this string is get from service, I am wondering, How can the service pass the string to Activity so that activity can render the string on UI.
View 5 Replies
View Related
Dec 1, 2009
Given that scripting is not natively supported in Android and wrapping libraries like javax.script.ScriptEngine into your app will make it too large, is it possible to send a javascript string to an invisible WebView and have it evaluate the string and return you the results (another string)?
I want to go this route because I want to save all my scripts to disk so my app can remain small.
View 3 Replies
View Related
Dec 1, 2009
Given that scripting is not natively supported in Android and wrapping libraries like javax.script.ScriptEngine into your app will make it too large, is it possible to send a javascript string to an invisible WebView and have it evaluate the string and return you the results (another string)? I want to go this route because I want to save all my scripts to disk so my app can remain small. edit I need Java code to evaluate javascript strings not the other way around. addJavascriptInterface() doesn't help.
View 2 Replies
View Related
Jul 29, 2009
I'm trying to write a basic application with http get request. Eclipse validated my code, but when I using IOException in Android console I have this strange messages:
CODE:...............
And my application doesn't load into the emulator.
This is my code:
CODE:..................
View 3 Replies
View Related
Jan 21, 2010
I have already posted on their developer group but based on everything I've seen I don't expect a reply. I have a strange problem. When I added and adview to my app it imported a bunch of comments that all start with /** Eclipse is acting like it is not a comment. Although it isn't erroring out it has now marked anything starting with R.id as not existing. Is this something I can remedy in eclipse or is it time to chuck my dreams of being mega rich off of all the admob revenue I will be receiving? Writing code is one of few things that teaches me I don't know everything. Join the Closed Beta of Call Girl Manager http://www.fuligin.com/forums
View 5 Replies
View Related
Jun 28, 2010
I am trying to parse XML with a simple sax parser. Interestingly i am able to see desired output in the emulator. but when i run the program on a device program shows no output. I tried many different way for example putting the XML file in a raw folder but every time no out put on device. Tried this on two different handset and everywhere get the same error.
View 2 Replies
View Related
Aug 31, 2010
A customer just notified me that she's experiencing the infamous "app not responding / wait, force close" message during a specific operation. By just waiting enough, the app resumes ok. Now, that specific operation is indeed long and in fact it has been programmed in a background thread, with a progress dialog signaling the wait. I can't reproduce the problem on my development phone - I suppose because it's perhaps faster than the phone of the user. But I can't reproduce the problem either with the emulator, which I suppose is slow enough. Generally speaking, I think I could be able to solve this specific problem with the customer giving me the proper feedback. It's the general issue that hassles me. This part of the application is very good covered by tests at different levels, including automated black-box tests with Robotium that drive the UI as the user would do, and even in "stress mode" (repeating the test multiple times). So I supposed to be very safe in that area and I'm disappointed to discover that it was a false sense of safety. What am I possibly missing? Also, is it possible / does make sense to "slow down" a phone during tests? I was thinking of a service running in background just consuming some CPU cycles to make the phone less responsive. Fabrizio Giudici - Java Architect, Project Manager Tidalwave s.a.s. - "We make Java work. Everywhere." a.net/blog/fabriziogiudici - www.tidalwave.it/people Fabrizio.Giud...@tidalwave.it -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
View 3 Replies
View Related
Aug 23, 2010
I'm trying to get my head around how the vram is used in opengl, specifically when and how to clean it up. The Story So Far. I have a GLSurfaceView into which I set a Renderer implementation (called OpenGLRenderThread). This view is created (manually, by calling "new") in the main Activity of the app. When the onSurfaceCreated method of the OpenGLRenderThread is called, I load a bunch of textures in a fairly standard way: the app runs fine, however when I try to clean up these textures at the end of the "level" (the app is a game. I do the following: On the emulator it works fine, but on the device (HTC Desire, 2.1) I get a GL Error 5572216 I have no idea what this error code is as I can't seem to find any reference to it. I understand that the VRAM references are bound to the thread that created them. Hence they can only be destroyed by the same thread. In my case, this thread is the OpenGLRenderThread (Renderer) during the onSurfaceCreated call.Unfortunately the Renderer interface does not expose an "onSurfaceLost" method, so I created my own. When the Level is complete, my main activity queues a request on the OpenGLRenderThread using the following call to the GLSurfaceView: According to javadoc for queueEvent: "Queue a runnable to be run on the GL rendering thread" Ok fine, so this should mean that the OpenGLRenderThread is performing the call to onSurfaceLost. This method is the one that then calls glDeleteTextures, and produces the error. what am I doing wrong here? I am not destroying the OpenGLRenderThread or the GLSurfaceView at any point (other than game exit) so I'm worried that if I don't explicitly delete the textures my vram will eventually fill up, or worse get into a corrupt state. The only other thing that may be relevant is the use of a ViewFlipper. Because I want to load each level asynchronously I am using a ViewFlipper in the main activity to flip to a loading screen while all the level resources are rebuilt. Hence when the call to glDeleteTextures is made, the GLSurfaceView is not actually visible not sure if this is meaningful or not.
View 4 Replies
View Related
Jan 17, 2009
When I using default pre-built android-toolchain to build android on linux, the following errors occur: hucheng@hucheng-bj:~/temp$ uname -a Linux 2.6.18.5-gg42workstation-mixed64-32 #1 SMP Tue Nov 25 21:45:59 PST 2008 x86_64 GNU/Linux Have you met it before? Institute of High Performance Computing, Department of Computer Science and Technology,
View 2 Replies
View Related
Jan 17, 2010
I was trying to make a call today, but every time I pressed contacts a TouchWiz style error message would pop-up and say "Initializing, try again later." The wording may not be exact, but that's pretty close. Then it would dump me back to the home screen. I ended up rebooting and now it works fine. But when things that should be a basic function of the phone don't work, I get kind of ticked off.
View 11 Replies
View Related
Jun 13, 2010
Having a few problems ringing people on my phone. I get a voice saying "the number you have called has not been recognised". I looked at the number and it start 447xxxxxxxxxx I went to edit the number in phonebook and it's fine cos it starts off as 07xxxxxxxxx, i have to edit the number each time i wanna ring these person now unless they're in my previous call list! They are linked to their facebook profile but they don't store their number of facebook so why is it being converted to 447xxxxxxxxxx if it has the + before the 44 i think it would be an issue! I've never had this issue before either
View 2 Replies
View Related
Oct 1, 2010
i seem to have a classic task, yet i can't find any examples on how to do it.i want to download something. well i call a web service and get a response but its pretty much the same.in order to do this i have an activity that starts a service that spawns a thread that does the job.now i would like to use the data i got in the activity that started the service.(i assume that starting another activity to handle the job of displaying the result would be simple)my problem is how does the service notify an activity (the one that started it or another one) of something.
View 1 Replies
View Related
Oct 6, 2010
if the service dies, and i know it can during request processing, it's an issue for me, first i've seen it, the process wont die until the net request returns (then the thread dies gracefully), unless kill -9 is used on the process... then i'm not sure what android does with the connections. I'm not sure what's the approach i should take here.(it will be true though even if this was a local thread and not a service)if i want the service to listen on a callback and call it once the network processing is done, i'm in a problem, no instances can be passed on using Intents.
So i need some other solutions, all the ones i though of sounds bad to me: A. use IBinder to get instance of the network service class then i can call one of it's methods and pass on an instance, this will work since they all run in the same process, BUT requires me to use Async way to get a Network instance which is not so suitable for me. B. Use static member in the Service i can access, then what to i need the service for ?. use intent to send parameters only to the service, the service will compose a Request out of it and put it in the queue, then once done will send a response using intent which will encapsulate the response (which might be long!) and will also contain the name of the calling class as a string so all the Receivers will know if it's for them or not - BIG overhead of encapsulating data in Intent and search in all the receivers for the right one to get the response.I don't want to use the service as a local running simple thread since i'm afraid if i'll run it in the root activity i will have to use static container so it will be visible in each activity and if the root will be destroyed for some reason it will take all the service with it, even if i start new task and the process is still alive.Anyone got some nice ideas on how to approach this thing ?
View 1 Replies
View Related
Jun 9, 2010
My web service is returning quite a bit of data, so i'm storing it in an arraylist and returning that to my application. I don't know whether or not this is the preferred method or not. When the arraylist is returned and displayed in my application, it also displays the arraylists "anyType" section. I'm new to this whole process so i'm sure i'm missing something somewhere or going about this incorrectly. Can anyone point me in the right direction please?
View 2 Replies
View Related
Apr 27, 2009
How to test my IBinder object that Service return on onBind ?
View 1 Replies
View Related
Aug 30, 2010
On Sat, Aug 28, 2010 at 3:53 AM, Ravi Grandhi <grk.r...@gmail.com> wrote: > How to pass a String from an activity to a service?
View 2 Replies
View Related
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
Sep 13, 2010
I have a Service defined in the manifest with an intent filter that refuses to match when specified as a String resource but works when the literal action is entered in the manifest. Is there any reason I should not be able to use a String resource with an action in an intent filter?
View 3 Replies
View Related
Mar 4, 2013
I am trying to select the 3G 850 band on my Galaxy Grand (I-9082L), and when I select the appropriate band via service mode, i get this:
MODEM RETURN ERROR
I am troubleshooting my phone, for I flashed a I-9082 firmware and lost the 3G, I cant find a I-9082L firmware so,If you can point me to a 9082L firmware or compatible modem.
View 1 Replies
View Related
Jan 27, 2009
I'm just about to start externalizing all my String-resources to a new project and then bring them back by including the exported jar-file of this 'i18n'-project. Doing so i18n for different languages becomes easier (I could simply export just a handful of languages to the jar). can successfully change the java-references to the outsourced foo.bar.i18n.R.java BUT, all references of the xml-layouts fail Sample: ############ android:label="@string/app_name"> ############ where: "@string/app_name" is now unknown =/ I'm asking myself whether this is possible and how to resolve my issue / properly reference the externalized string-resources.
View 6 Replies
View Related
May 17, 2010
I have a simple test code for testing SimpleDateFormat. This code works well on Eclipse and Android 1.5 emulator, but it failed at Android 2.0 emulator. Does anyone know why? Thanks.
public class TemplateActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);..........................
View 3 Replies
View Related
Aug 8, 2010
I am going through the android hello world tutorial, and have been stuck when trying to create an XML UI. For some reason, even on a new program, in which I have made no changes to the default build, it gives the error java.lang.NullPointerException after every character I type. I can't figure out why it is doing this, as I am just trying to edit the text between the Text I want to set it to say something other than what is set by default. However, even with a fresh build, no changes, and I just try to change the text within the xml tags, it still gives the error. What do I need to do to allow it to let me type? I am using the eclips IDE and the android sdk. I was able to do the first part of the tutorial that doesn't involve XML.
View 4 Replies
View Related
Apr 26, 2010
I'm trying to use ksoap to call a simple webservice. I followed this video to try to get started. When I call "getResponse()" on the envelope I just get the string "Error". There's no exceptions thrown or any other detail. I've successfully connected to a simple webservice I just setup on my local machine. Could this potentially be related to being behind a proxy server here at work? My code is below:
CODE:........................
View 2 Replies
View Related
Feb 15, 2010
Usually, I putExtra inside an Intent to transfer stuff between Activities. But it seems like I can't do this with a Service? Bundle extras = getIntent().getExtras(); That doesn't work for a android Service. How do I send a string from an Activity to a Service then?
View 1 Replies
View Related
Aug 12, 2010
I have an app that uses a TabHost. Several of the Tabs share a common HUD. I am using a service to periodically update those values by calling an AIDL function when ready.
However, since several of the Tabs are using the same HUD I would like to abstract that part out.
I thought about having the HUD.xml use a String resource as it's value and then the abstracted class can update the String resource. However, apparently Android can not update String resources programatically.
The only alternative solution I see would be using SharedPreference.
I have concerns accessing a Database everytime the value is refreshed.
View 1 Replies
View Related
Aug 21, 2010
I tried to connect android market but i only got "a server error has occoured. retry, or cancel and return to the previous screen."
View 2 Replies
View Related
Jul 20, 2010
Wonder why do I get this error?
String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager)getSystemService(srvcName); String deviceId = telephonyManager.getDeviceId();
View 2 Replies
View Related
Aug 28, 2010
I use this code for connection to my service, but when I put this line. this.bindService(service, conn, flags);
I receive error message: syntax error on token "}", { expected after this token ... (1)
Here is all code in my class:
CODE:................
View 2 Replies
View Related
Jun 29, 2010
I have the localized strings file that is used in the Iphone app that I work on to port to Android. Are there any tools that go through the file taken from the xcode project and build the xml needed to use the strings in android? This tool should be easy to build but I appreciate any pointers to already working tools.
View 4 Replies
View Related