Android :: Sending / Receiving Java Objects To Server
Sep 23, 2009
I have a Tomcat Server in front of a Servlet that gets/stores information in a MySQL Database. My Android application needs to get/ put information on to this server. I control both ends of the communication, so I've basically been exploring the "best" way to send information back and forth. So far, I've tried Jackson for JSON and the native Java Serialization packages. My object is relatively complex and completely serializable.I have no desire to write a "custom" guy at all, as I doubt I'd actually be able to improve on most of the packages.So with that being said, are there any other strategies/packages I should try to get information to/from my server?
View 9 Replies
Aug 27, 2010
I had write one application in that I am reading a image and sending it to the server, I am using Base64OutputStream class. I had tried it in core java and image is encoded successfully, But when I am using same logic in android then I am getting error as java.lang.VerifyError. And Logcat gives following error as............
View 4 Replies
View Related
May 5, 2010
How can I utilize Connection: Keep-Alive option, re-use connection and download multiple objects from the same server? HTTP connection consists of opening a socket, sending request and then readign response. For Keep-Alive option open the socket connection needs to be done only once. However I could not find in Android Java classes how this can be accomplished. URL.openConnection returns new instance of HttpURLConnection implementation for every request so HttpURLConnection cannot be cashed for reusing on multiple requests to the same server, URL object is also new for each request and also cannot be reused.
View 2 Replies
View Related
Aug 29, 2009
I'm making use of an API on the internet that is marshalling objects to XML files. Given that the XSD files are also available I'd like to be able to unmarshall them back in to Java objects once I've downloaded the files.After looking around it looks like JAXB is the default library for doing this in Java, but as I'm developing a mobile app the extra 8.6MB dependency just isn't acceptable. I also found XStream, but it still weighs in at 7.9MB.Poking around the Android SDK it looks like the only real XML parser available is SAX.
View 6 Replies
View Related
Nov 15, 2010
I've been looking the source code available from the Restlet official tutorial.
I am trying to hit the Restlet server using the Android app from he tutorial adn I only get the JSON response, not the Java Object. I tried using all libraries and extensions, nothing works. When I hit the tutorial url though (http://restlet-example-serialization.appspot.com/contacts/123) I get the desired response. Any ideas? BTW, I am just using the server (GAE) in the example, not the GWT frontend.
View 1 Replies
View Related
Jan 1, 2014
I'm a little new too java programming. Im looking for a means to store groups of static data..so I understand these simple string arrays...
[HIGH]
private static String[] names = new String[] {
"aidanmack",
"johnsmith"
[code]....
But can I not combine that into an array of objects? somthing along the lines of what you would do with json? like...
[HIGH]
private static array[] multi = new array(){
{"name":"AIDANMACK","age":"30"},
{"name":"johnsmith","age":"31"}
}
[/HIGH]
View 1 Replies
View Related
Jun 15, 2013
how to send and receive MMS on Android?
View 1 Replies
View Related
Nov 26, 2009
I am just wondering if it is possible to receive SMS in a particular port. I believe by default all SMS messages are delivered to Port 0 and SMS manager gives the notification about this message.Is there any way in which we can send and Receive SMS messages in any particular port apart from the default port.
View 2 Replies
View Related
Oct 10, 2010
Softbank Japan has just released an sms/mms app that allows sending and receiving emoji! I just tested with my wife's iphone, and I could send emoji fine with my HTC Desire (Softbank x06HT), and I could receive it fine! A big selection of emoji too, maybe the complete set that Softbank usually includes on their other phones. It is buggy and a bit clunky, but it's a *lot* better than nothing! Lots of complaining in the comments section, but I don't think it's that bad. Now, the big question: Is it available in other markets? I'm in Japan right now, and I searched for "Softbank" in the market and I found it... It's called "Softbank メール". The link that they sent me in a news SMS is: "http://market.android.com/search?q=jp.softbank.mb.mail". They also say it is Froyo only...
Lastly, for those who have been in Japan a while and have an @softbank.ne.jp or @x.vodafone.ne.jp (like me) can now use those mails on their phones as well, inside the app. I sent myself a message and received it fine, and when I replied it sent from my old vodafone mail address (although I haven't figured out how to choose between SMS and e-mail for sending yet). EDIT: Figured it out, just type in a phone number (or choose from contacts) to send an SMS, type in an e-mail address to send from your @softbank or @vodafone address. Swet. I'll see if I can post the full message, for those who can read Japanese (I can't read very much of it, only hiragana/katakana).
View 1 Replies
View Related
Apr 21, 2009
Ok, I have 2 Activities I want to send data between activity A and B.My problem is that some random code of mine seems to be called between startActivityForResult() and onActivityResult()in Activity A.This doesn't make any sense because there is no code after startActivityForResult() is called.Shouldn't onActivityResult() be the first thing A does after B finishes?
View 2 Replies
View Related
Nov 17, 2010
so I'm a new evo owner, had the phone for about 2 weeks.Love it, it's the best.Onto the problem.When I first got my phone I was sending and recieving pics no problem.A few days later I was not able to send a pic. I thought it might be too big, but knew that the evo should reduce the size and send it.After doing some reading online, I found many people suggested downloading handcent.I did this, but still can't send or receive mms. My phone is not rooted, don't know what that would do anyway.I know there are some hardcore evo users reading these threads and I see many people have had the same problem I have, but I have not found an answer to this yet.It's not a huge deal if I can't see the picture my buddy send me of his ass, but with this phone I should be able to see it if I want to.
View 5 Replies
View Related
Jul 25, 2009
I'm building a service that sends a broadcast intent when some value changes. The service sends the broadcast like this:
Intent broadcastIntent = new Intent(); broadcastIntent.setAction("nl.vu.contextframework.NEWREADING"); broadcastIntent.setData(Uri.parse("context://"+cer.getKey())); broadcastIntent.putExtra("reading",cer); broadcastIntent.addCategory("nl.vu.contextframework.CONTEXT"); sendBroadcast(broadcastIntent);
In some Activity (in a different process), I'm tryint to receive this broadcast as follows:
IntentFilter intentFilter = new IntentFilter();
intentFilter.addDataScheme("context");
intentFilter.addCategory(CATEGORY_CONTEXT);
registerReceiver(new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
Log.d(TAG,"Received intent "+intent); }
}, intentFilter);
View 6 Replies
View Related
Feb 15, 2009
Is there already functionality similar to the push registry or wireless messaging API in J2ME implemented in Android? Or at least plans to do so?I have been looking at this issue for a while, because in a corporate environment it is essential to be able to push information out, or trigger actions via SMS or other connections.I have successfully sent an SMS between emulator instances, and successfully received an SMS by using a BroadcastReceiver on another emulator instance. I have also been able to use SmsManager. sendDataMessage to send a data message to a port on another emulator instance, but in this case the BroadcastReceiver is never triggered. This seems to be the closest the API's get to what I'm looking for.
View 3 Replies
View Related
Jul 9, 2010
I configured my Gmail account successfully in the emulator. My goal is to respond to incoming messages in the mail account from my own application - for example display notification. I am using the standard mail application that comes with the emulator. I tried to receive mails from my account, but it does not work, there are no conversations in the standard mail application. I can't send and reveive messages from inside the emulator. Why?
View 8 Replies
View Related
Jun 14, 2010
How can two EVO�s purchased at the same time have the most random problems?My girlfriend and I bought our EVO�s at the same time/place and both have completely different random problems.
#1) When we first got our phones we tested out a bunch of stuff including texting photos to each other. She got the ones I sent, but I didn�t receive hers. I thought it was something wrong with my phone, but after a bunch of testing, it looks like it�s hers. What makes it annoyingly weird is that I can receive texts with photos from her UNLESS she sends it in this manner: from the photo she chooses share, then the screen comes up to enter who to send it to. If she enters my name by hitting the search magnifying glass in the upper right and then chooses my name, I will not get the text. Every other way she sends it, I will receive the text. Makes zero sense as I can send her a photo text any which way from my phone and she gets it.
#2) My EVO has the 4 navigation buttons dimly lit all the time unless it�s plugged into the charger. Her phone does not. Not a huge deal, but I am concerned it is draining the battery just that much more unnecessarily.
View 1 Replies
View Related
Apr 8, 2010
I have a main class activity that does the task of sending control to other activities on click of a button. I am also starting a thread in the main class. This thread basically sets up a connection with the server and is active throughout the lifetime of the application.I have two functions in the thread class, send and receive data from server.Therefore, when the other activities need to send/receive data from server, they use those particular functions.First of all please let me know if what I am trying to do is fine as per the architecture of the operating system. If its fine, when I try to run the code, the app crashes and i see a NullPointerException and a RuntimeException in the DDMS log.Could some one please help me out in this or suggest a better way to implement the concept.Also, please be assured that, the other functionality of the code works perfectly fine.
View 15 Replies
View Related
Dec 30, 2009
This is the servlet code in java ME.
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
ArrayList<String> listName = new ArrayList<String>();
ArrayList<Integer> listLongitude = new ArrayList<Integer>();
ArrayList<Integer> listLatitude = new ArrayList<Integer>();
String sLongitude = (String) request.getParameter("x");
String sLatitude = (String) request.getParameter("y");
String path, list, scount; Integer numLong = null;
Integer numLati = null; Connection con = null; String slanje = "";
int limitLeft, limitRight, limitUp, limitDown, icount = 0;
if (sLongitude != null && sLatitude != null) {
try { numLong = Integer.valueOf(sLongitude);
numLati = Integer.valueOf(sLatitude); } catch(Exception ex) {}
} try{ Class.forName("org.apache.derby.jdbc.ClientDriver");
con = DriverManager.getConnection("jdbc:derby://localhost:1527/bazaprojekt", "projekt2009", "midlet"); limitLeft = numLong - 8; limitRight = numLong + 8; limitUp = numLati + 8; ...
How do I send x and y to servlet and receive some string in Android?
View 2 Replies
View Related
Nov 20, 2010
I'm using a Desire on T-Mobile UK and it seems a bit of a lottery as to whether I can send or receive MMS messages. Sometimes they are sent and received without a problem when I'm connected via WiFi, but on other occasions I have to switch to a data connection to send or retrieve MMS messages.The message I occasionally encounter is "generic network failure".
View 3 Replies
View Related
Dec 31, 2009
i have a HTC Hero & i was wondering how you send songs or images to other people via Bluetooth?I have looked around the phone and there is no Send via Bluetooth anywhere.It kinda sucks if you cant do it as every phone these days should have the capability of sending & receiving Files.
View 1 Replies
View Related
Sep 10, 2010
I just activated my new fascinate and can not receive or send texts from my GF (who is on att) but I can get texts from my roommates (on verizon). Anyone know what the deal is?
View 1 Replies
View Related
Oct 23, 2009
I am able to sync with my exchange email on the HTC Hero for Sprint, but i am not able to properly send emails. I can send an email and it will appear as it goes through, but the email is never actually sent or does not show up on my sent box (on either the phone or outlook).Any similar issues from others & any suggestions on fixing?
View 6 Replies
View Related
Jun 3, 2010
I've been using Handcent and I have trouble receiving and sending picture messages. When I get a picture is views it as a movie? how can I change it so it is just a picture, as for sending pictures, It's not working at all! Any fixes?
View 1 Replies
View Related
Nov 29, 2010
i recently bought a HTC Desire Z and when i broguht it home, i hooked it up to my wireless n router with MAC filtering and I believe WPA security. it was working fine until around sunday. it said i was connected to my network but i was not recieving or sending any data.
View 3 Replies
View Related
Jul 20, 2012
I developed a game for Android called Jumping Bird, it writes the score obtained by the player in the database on my web server, but it does so synchronized. While it tries to write data in the database on the web, the entire game is stopped , and worse, when the server is slow, the request takes more than 5 or 10 seconds, an ANR(application not respond) error occurs and the OS tries to close the app.
I wonder how I can make that request asynchronous.There is any library that does it?
View 1 Replies
View Related
Jul 13, 2013
I am trying to send pictures to another phone, the MMS seems to be sending from my hpne, (no error messages or anything) but the other phone isnt receiving them. I can receive MMS from the other phone to mine but not vice versa...
View 3 Replies
View Related
Feb 2, 2013
Whenever I receive or send an SMS the CPU usage goes up to 90%-100% for like 5 seconds and then returns to low usage. At first I thought it was a problem with Handcent and after uninstalling and using the stock messaging program it does the same.
Is this normal?
Device: Sony Xperia Mini
Android: 2.3.4
View 7 Replies
View Related
Sep 17, 2013
When I receive a simple text message, I have to make sure I wait a full minute before deleting it because SMS Backup + https:/[url]...has a minimum interval of 1 minute for auto backup. Is there an app that can be set to do automatic backups in intervals of less than 1 minute? Is there a reason why there can be no immediate *auto* SMS+ Backup upon sending/receiving, in other words, is there a reason to wait at least one minute before the incoming/outgoing text message is backed up?
View 1 Replies
View Related
Oct 26, 2010
The FAQ mentions a method of passing objects around activities. (It is not clear to me): "A HashMap of WeakReferences to Objects. You can also use a HashMap of WeakReferences to Objects with Long keys. When an activity wants to pass an object to another activity, it simply puts the object in the map and sends the key (which is a unique Long based on a counter or time stamp) to the recipient activity via intent extras. The recipient activity retrieves the object using this key.".................
View 7 Replies
View Related
Oct 28, 2010
I have been using handcent for almost a month now. Sending or receiving pictures hardly ever works. Does anyone have any advice?
View 1 Replies
View Related
Mar 30, 2010
Does anybody else have a problem with sending and receiving picture messages with the Droid Eris? I can take them and post them to Facebook easily, but I can't e-mail or send a text message with a picture in it. Also, when someone sends me a picture message, it shows an icon to download it, but then it always says it was unsuccessful.
View 2 Replies
View Related