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

  • SEARCH
  • Home
  • 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 7795185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:59:52+00:00 2026-06-01T22:59:52+00:00

I want to get xml in a service and return that xml-string via AIDL.

  • 0

I want to get xml in a service and return that xml-string via AIDL. Today, I realized that the calling app receives only a null-value when this string is very long. I tested a bit and found, that the limit for the string-length seems to be about 520000 characters, which is near 512*1024=524288. Java stores strings internally as UTF-16 and I think, but I’m not sure, that each character is internally (at least) two bytes big, so this limit would be at 1MB.

Now, I want to know if this limit is documented anywhere or if anyone had problems with it before. Does anyone know how I can easily return such big strings?

  • 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-06-01T22:59:55+00:00Added an answer on June 1, 2026 at 10:59 pm

    Now, I want to know if this limit is documented anywhere or if anyone had problems with it before.

    AFAIK, it is not formally documented, but there is a ~1MB limit on the contents of an IPC call, no matter how that is accomplished (AIDL, broadcast Intent, etc.) or what the data is (string, bitmap, other form of byte array, etc.).

    Does anyone know how I can easily return such big strings?

    Use a file. If you wish, serve the file via a ContentProvider and openFile(), supplying the Uri to the content in the AIDL response.

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

Sidebar

Related Questions

I have a web service that returns an xml string as results. The return
XML: <A><B></B></A> or <A></A> I want to get all A nodes that do not
My XML is: <CurrentWeather> <Location>Berlin</Location> </CurrentWeather> I want the string Berlin, how do get
I am receiving an XML via an HttpPost to my service, and I want
I've got a simple .NET web service that is supposed to return a string
I have a REST service that gets a GET request, and I want it
I want to get the CreateDate value from xml file the xml file is
I want to get the contents of a sql table using xml: projectID -
I want to get the Category based total of the following <?xml version=1.0 encoding=utf-8
I have one problem , I want to get some data from XML file

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.