Android :: How To Resolve Deserializing Into Object?
Aug 8, 2010
I have an application that queries a server (not under my control). The server returns a serialized object. I have the model for the class - however the problem is that the class is in "default package"... something not recognizable by Android ClassLoader. How can I resolve this issue?
View 1 Replies
Apr 21, 2009
I've got a strange problem here doing object de/serialization. In Java (JDK 1.6) I serialize some objects. In Android (SDK 1.1) I deserialize them. This work quite nice in general. In order to work with a server object (that uses Castor un/ marshalling) I do it like I always do. Same routines. Well, this time the file is only 172kb (my routines works pretty well with 2,4mb files) but the interlacing is quite deep. So it all starts with a class containing 2 ArrayLists. I tried de/serializing just ArrayList<String> and this works very well. But the XML file (which is unmarshalled with Castor and serialized in JDK) has 7000 lines. So I get this StackOverflowError....................
View 3 Replies
View Related
Jul 6, 2010
I'm trying to deserialize json data to an ArrayList of Restaurant object as follows (inpsired by what I found in https://sites.google.com/site/gson/gson-user-guide#TOC-Collections-Examples):
CODE:...............
But this gives the error shown at the end of the post.
It seems that there is some null pointer in listType... Here's a watch of listType:
CODE:...............
What's wrong with my code? How can I do that?
CODE:....................
View 2 Replies
View Related
Jun 24, 2010
I'm building simple app, simply to learn the android ropes, that will display a list of the most recent photos uploaded to flickr. The app is constructed but it's crapping out when it tries to deserialize the json that I get back from flickr. Here is my error:
CODE:....................
From, the error I'm assuming it has something GSON doesn't like about the json that is being returned but I don't know enough about how java converts objects and other types of variables during the whole operation.
I'm not sure if you will need this but here is some of the code from the project:
CODE:..........
Here is FlickrPhotos:
CODE:........
Here is FlickrPhoto:
CODE:...................
View 1 Replies
View Related
Sep 9, 2009
I want to do some automated testcase with Instrumentation . Suggest that my AUT has 2 Activity. After clicking the button in ther first Activity, the second one will be shown with new content base on what we enter in the first Activity.) Instrumentation provides us the function called startActivitySync() and return the Activity object for processing. My question is how we can get the pointer of the second Activity after the it is shown by clicking the button on the first activity.?
View 2 Replies
View Related
Jun 8, 2009
I would like to convert a Picture object to Bitmap object in memory, without writing data to disk.
View 2 Replies
View Related
Sep 21, 2009
I have an Activity that running on system. I can get the Intent that is used to start the activity. But i don't know how to get the Activity object from the Intent object or something else. Can anyone tell me how to do this??? Note that, I don't use Instrumentation object.
View 11 Replies
View Related
Sep 24, 2010
What is "deserializing Json" means, I had seen this term on the Web. I don't know the meaning od this particular term So, it would be great if anybody can explain me about What it means actually?
View 1 Replies
View Related
Feb 18, 2009
I am trying to get a FileInputStream object on an image that the user selects from the picture gallery.
This is the android URI returned by android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI content://media/external/images/media/3
When I try to construct a java URI object from this object, I get an IllegalArgumentException with the exception description Expected file scheme in URI: content://media/external/images/media/3 whereas the android URI shows the scheme as content
Never found a solution for the original question. But if you want the byte stream of an image in the pictures gallery, this piece of code will do that.
CODE:...................
View 4 Replies
View Related
Jul 15, 2010
I am trying to build inflate a context menu within the sample Grid View provided on the Android dev site. Eclipse tells me that the referenced items cannot be resolved, if someone could help find where I coded s.th. wrong, that would be great because I am stuck at the moment. Thanks. I posted my entire code below. I get the error message at: if (item.get Item Id() R.id.menu_face book) and the other R.id.
View 2 Replies
View Related
Jul 8, 2010
I am trying to add my motorola milestone device into PC and debug in the device. When i put the usb cable, the device opens in data storage mode and opens the folder. But when i do a "adb devices" i dont see any device. i did the usb_driver fresh installation guide, but it returned "windows could not find a better driver than currently installed" I havd pointed to sdpath/usb_driver what's wrong and how to resolve this?
View 2 Replies
View Related
Sep 27, 2010
I am working on a program that will connect to a time server (time- a.nist.gov), retrieve the timestamp, and place it in a text field.
However, when I create the socket, I get an UnknownHost Exception for time-a.nist.gov
1. put the <uses-permission android:name="android.permission.INTERNET" /> tag right before the </ manifest> tag. I did this, and the change is still there.
2. use the static InetAddress.getByName() function to convert to an IP address (this still throws the same exception)
When I pass the IP address (129.6.15.28) to the socket constructor, the program works fine. It only breaks when I use the actual domain name.
I have written this program in Java and it works perfectly fine.
View 2 Replies
View Related
May 12, 2010
I will try to keep it simple:
In my main activity I make a handler:
CODE:.......
CODE:......
But if I call the handleMessage method from a callback function in a other Class, definitely from a other thread, I still get the exception message: CalledFromWrongThreadException (Only the original thread that created a view hierarchy can touch its views) :
CODE:...................
View 2 Replies
View Related
Jun 22, 2010
I have android sdk 2.1 and it cannot resolve android.media.MediaFile package. Why is it so? How can I solve this problem? To which version does android.media.MediaFile belong? Has it been deprecated?
View 1 Replies
View Related
Sep 1, 2010
I have an application which has 11 different activities. One of these activities is an extension of MapActivity (it is a map for data visualization). To get to this activity the user must first travel through the launch activity, then 3 other activities.
The code to launch the MapActivity is:
CODE:..............
When this is executed I get the following output from the Log:
CODE:.......
I do have the target set to Google APIs, this is an app meant for Android 1.5, and specifies the minsdk to be level 3 in the manifest file. uses-library for maps is also in manifest file.
CODE:..........
I have been at this for almost 2 days now with no results. It seems that there are a lot of people having issues launching a MapActivity from other activities but there are no solutions anywhere.
View 2 Replies
View Related
Oct 3, 2010
I am totally new to Android, and I am following this tutorial. My problem is that the Android Emulator does not show the Hello World text, it just displays "ANDROID" on the center of the screen and no buttons works. Is this a know problem, how do I get it fixed?
View 1 Replies
View Related
Jun 22, 2010
Assuming I have a contact saved in my addressbook, called "TomTasche" with the mail-address "stackoverflow@gmail.com". How can I retrieve the contact's name, if I only know the mail-address?
I already asked a similar questions about retrieving contact's nickname here, but if I change that code to query the mail, like that:
CODE:...........
It forces close and logcat tells me that there's a syntax error near @gmail.
CODE:..................
Interesting is that it seems to query fine. Logcat prints out the contact's name:
CODE:.............
How am I able to retrieve the name?
Syntax Error is caused by missing quotes, but cursor returns null anyway.
View 2 Replies
View Related
Sep 2, 2010
When I run this code from Java project it works fine.
CODE:.................
When i try the same code from emulator (already tried few versions) I'm getting UnknownHostException. Internet works fine on emulator and I'm able to connect to IP address like "93.86.230.251" but never to hostname "something.org".
View 1 Replies
View Related
Feb 15, 2010
In my application I write the code for fetching latitude and longitude of current location. But it is frequently changing while my device is not moving.
View 1 Replies
View Related
Nov 4, 2010
I'm using "AppBrain App Market". I have installed a bunch of apps, but some get stuck and just stay in "Downloading" state. They just never finish downloading. I see the progress bar "barbershop pole" style but there is no sign of progress. Some are new installations, some are updates.
This is despite the fact that some apps HAVE successfully downloaded and installed. What could the problem be? How do I resolve this?
Cancelling the download and restarting the download resolved the problem once. (Downloads / click on neverending download item, Cancel Download)
But if the button series is (Downloads / click on neverending download item, *Installing*). Then the Installing button is greyed out then I'm stuck.
This thread did not provide any solutions: Market Apps Finish Downloading but Won't Install
View 6 Replies
View Related
Feb 18, 2009
I update my SDK from 1.0 to 1.1r1 running on Windows XP environment. I develop applications using Eclipse Ganymede.
Since this update my build process crashes on aapt calling.
I tried to reinstall ADT plugin but this doesn't change anything.
Do you have an idea to resolve this issue?
View 2 Replies
View Related
Sep 24, 2010
I'm trying to put a spinner in a sub-tab in my android app. Touching the spinner causes a crash.
Searching seems to suggest that for some reason it is not possible to use spinners in sub-tabs, but this seems silly to me. I've also tried using activity groups as an alternative to sub-tabs, but I get the same crash.
Has anyone resolved this?
View 1 Replies
View Related
Oct 11, 2010
I am having a problem in running Android unit test. I got this error when I tried to run a simple test.
Here's the log:
CODE:.........................
This error occurs for Android less than 2.2. It works fine for Android 2.2 emulator. Yet Android 2.2 emulator has a bug of sending a key twice even though we only press it one. Application to be tested runs on Android 2.2 platform.
View 1 Replies
View Related
Apr 26, 2010
I'm trying to use google maps on my android app but when i extend MapActivity instead of Activity in my activity file, there is an error that MapActivity cannot be resolved to a type...? I have <uses-permission android:name="android.permission.INTERNET"/> as a child of manifest and <uses-library android:name="com.google.android.maps" /> as a child of application too.....
Moreover, when i try to import com.google,android.maps.MapActivity, it says com.google cannot be resolved....
View 2 Replies
View Related
Jun 16, 2010
I'm trying to make a bundle for Felix on Android which may take photos regularly.
All the code compiles well and it can be resolved by Felix, but when I try to start it, I get an exception (java.lang.VerifyError) and this trace in logcat :
CODE:...................
The CameraHandler class opens a Camera object, and implements PictureCallback and AutoFocusCallback.
The .jar file has been 'dexed', via a simple 'dx --dex --output=classes.dex ... && aapt add ... classes.dex'.
I don't know why this error raise, so if someone has a solution...
View 1 Replies
View Related
Oct 31, 2010
I'm trying to send geo fixes to the Android Emulator in Eclipse. It has been working on some occasions but now it never works. I've tried targeting different platforms, setting the time zone in the correct emulator, changing the locale to English (US), wiping the user data in the emulator, used both telnet geo fix command and the DDMS...
View 1 Replies
View Related
Aug 31, 2010
The code in the main class works perfekt but i need a other thread but there the code won't work code...
The method create(Context, int) in the type MediaPlayer is not applicable for the arguments (Alarm, int)
and
The method getSystemService(String) is undefined for the type Alarm
View 1 Replies
View Related
Nov 9, 2010
How to run android application on netbeans 6.5?
If i running the application means i got following error,
W/ResourceType( 1968): Bad string block: string #14 extends to 1847, past end at 60
How to resolve this issue?
View 1 Replies
View Related
Apr 16, 2010
I have a problem interacting with a Web View. I'm showing an html login form within a web view and I can't type inside of any of the input fields of the forms. I do can interact with the links, select boxes, buttons, etc.
Here is an example of my code. Basically I'm retrieving the web view from the xml and setting it a WebViewClient and a WebChromeClient. code...
View 1 Replies
View Related
Nov 24, 2010
I have developed an application for 1.5 and above which uses expandable list ,but when i test it on 2.1 QVGA emulator expandable list dosent look proper .
Also i have tried running sample Expandablelist1 ,but it also has same issue.
so can anyone tell me is this issue with emulator only?
if yes how to resolve it?
View 1 Replies
View Related