I am able to parse html content using HTMLCleaner & able to populate in list view. But extracting image I ma facing problem. while I am able to get images from any web server, i am not able to get same from my local Apache http server.
I want to know the reason & possible solution.
Thanks in advance.
It seems like the phone (emulator?) doesn't have access to your local server.
Use the browser in the phone/emulator and try to access your server just to make sure if it's this problem.
If you have access, print the url and make sure everything is alright.
Related
I have implemented jsoup in android. Jsoup.connect() fetches the html content of a site "http://karnatakatourism.org/" correctly but it doesn't fetch anything for the url "http://karnatakatourism.org/Bidar/en/". I want to fetch the data from the links which are present in html page of www.karnatakatourism.org. Can anyone help me??
It seems that most of the content is loaded by some AJAX magic. You can try to analyze the network traffic to get to the URLs that you are really interested. These might be "getable" via JSoup.connect() then.
Another approach could be the use of other tools like selenium, but I don't know how far you can get with this on the android platform. Probably selendroid could provide your answer.
This is my first post here and I've got a big problem concerning the access of local file addresses on tablets.
I'd like to load image files in a game by using AJAX to get a JSON file containing URLs of images. My problem is that I dont know if it is possible to get local file addresses directly from the tablet folders using JSON.
Seems like I should use an URL that looks like this "storage/sdcard0/myImage.png." but I'm not sure that it's actually calling the file. Is it ?
I'm using Construct 2 because I'm not a coder, so I'm quite limited as for raw JavaScript programming. Please try not to flood me with code :D
I believe you can, URI can be used for urls and local filepaths:
URI | Android Developer
In my project call to the webservice generates URL of images which is different each time and it is timed which wont work like any other URL. When i click on that URL images gets downloaded in my drives. But i want to save it in my db.
I Have seen this Link and tried with it. But for my auto generated URL type that code wont work. Anyone has idea about how to get to know how to save the webservice auto generated URL in my sqlite?
As i analyzed the problem what i think is you will have two ways doing it
1) Storing the downloaded image inside sqlite and displaying it.
https://stackoverflow.com/questions/11304703/download-an-image-and-store-in-sqlite-in-android-local-db/11305051#11305051
2)or else just do how they have done in this blog
http://www.getablogger.blogspot.in/2008/01/android-download-image-from-server-and.html
may be you might get better way.
ALL THE BEST
I'm looking for a complete example for uploading an image + some text fields from Android to a WCF service. I've been searching for days without finding any useful examples. What I need is the code for both the client and server.
I've been able to make it work with JSON and Base64 encoding the image as a string, but this is way too slow with images around 500KB. What I'm looking for has to be efficient. Probably using a stream.
Can anyone please give me a complete sample code? I've seen a lot of snippets on each side, but not a complete sample. From getting the image from a path on the phone to posting it to the server and consuming it on the server in C#? How to get the image as a bytearray on the server and the text into string variables?
Thanks for listening.
For setting up WCF streaming on the server side see : http://msdn.microsoft.com/en-us/library/ms789010.aspx
You could also try just using basic http binding and MTOM.
For the android part you will need to get help from someone else, sorry.
I am looking into developing an App that will convert a website into more readable data for an android app. I am at university and have an online notice board which can be viewed on the web but if possible I would like to transfer this into an app on android to make it more easy to read on mobile devices.
What I thinking is that the app would go to the website where the notice board is held and read in the html code to display each notice in a list adapter view. Each notice is within its own div so I assume I could use that to split each notice up into its own button on the list adapter view. Is this possible and if so how I can go about doing this. I have tried google for an answer but I have not yet found a solution to this problem.
Thanks for your help
It seems overly complicated to me. I wouldn't handle all that using Android. I'd crawl the data on a machine (server) and then I'd convert all needed data to JSON and have the Android (client) fetch the data using a simple JSON parser.
In my opinion that would be the easiest solution if you don't have access to the server the website is hosted on to get it generate a JSON feed for you directly.
EDIT: In answer to your comment Boardy.
Here is the official website of the JSON project in order to get an understanding of what it is. Then if you have access to the webserver providing that page (I assume it is a PHP based site) and want to modify or add the functionality of providing a JSON feed then you should also take a look at the PHP JSON documentation.
To parse JSON on Android check out this SO question and also don't forget to take a look at the official Android documentation on their JSON implementation.