local web content and XmlHttpRequest

by Miguel Paraz » Mon, 13 Jul 2009 19:55:17 GMT


Sponsored Links
 Hi,
I want to load local HTML content which makes HTTP calls using
XmlHttpRequest.

I created a content:// URL which refers to the SD card, using the code
here:
 http://lucabelluccini.blogspot.com/2008/09/android-developers-google-group-focus.html 

However, when I call the JavaScript function that makes the
XmlHttpRequest call, the callback function is never called. I guess
this is the same-origin policy in effect?

However, when I use file:///android_asset for the local content, the
call succeeds. This isn't very useful for me, because the html needs
to be preloaded.

I want the web content to be dynamic because I'm building a widget-
type solution.

Is there a solution? Thanks.


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Problem with Multi select list

Hi All,
I have the problem while displaying the Multi select list view. I am
able to display the list view with check boxes. But it is not aligned
properly. It is coming along with the text itself (followed by the
text).

I am using two lines of code for displaying this multi select list as
follows,

multiListView.setAdapter(new ArrayAdapter<String>(activityinstance,
android.R.layout.simple_list_item_multiple_choice, <my array>));
multiListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

While checking and un checking  the items (check box) are dancing
(moving left and right).
Can any one suggest me to solve this issue.

Thanks in advance,
Muthu Kumar K.
--~--~---------~--~----~------------~-------~--~----~

2. BitmapFactory.decodeFile

I try to load image from:
res/drawable/icon.png
Bitmap bitmap = BitmapFactory.decodeFile("res/drawable/icon.png");
result: bitmap is null
why?

--~--~---------~--~----~------------~-------~--~----~

3. Way Too Buggy

4. help with onClickListener

5. LWiMax device drivers

6. both questions about view

7. Media controller