Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3996618
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:18:04+00:00 2026-05-20T07:18:04+00:00

I have created an application suite of three programs. The first program is a

  • 0

I have created an application suite of three programs.
The first program is a Java application that takes an image file and resizes it and creates an object with additional Strings for use in the Android client.

The second program is a Java servlet (RESTful services atm) that accepts uploads from the first program and stores the object into a database and then servers those objects to other Java applications and to Android handsets.

The third program is an Android application that needs to download the objects from the server, save them to the SD card and then access them for use.

I wanted to just use RMI to pass the objects around the network but Android doesn’t support RMI, so I started looking at XML-RPC and eventually decided to try RESTful services to act as the web controller for uploading and downloading. What I am having a problem with is figuring out how to encode my data.

One class has an ArrayList of objects that contain Strings.

One class has an image and a few Strings.

More classes will come with varying amounts of Strings and Images.

At the moment I am trying to use Gson to encode the objects into JSON but that doesn’t seem to be working when I view the file, it can’t handle the ArrayList. I am thinking about converting the images to Base64 strings to make the storage easier.

How should I be handling my data and what server could I be using? Ideally i would just like to get the data on the initial Java app and then just pass the objects around to the server and the other clients.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:18:04+00:00Added an answer on May 20, 2026 at 7:18 am

    If you are doing XML RPC then you would have to encode image data to base64. You could also try using JSON RPC (as it would be a lot easier). That way ArrayList<String> would become a JSONArray [“string1″,”string2”,..] and you can also throw image data into the mix using a structure like

    {
      "strings": ["string1","string2",...],
      "imageData": "base64 encoded image data"
    }
    

    For more information on JSON you could take a look at the org.json package bundled with the Android SDK.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.