What would be some ways to create an application that goes and fetches images (using URIs, that's the only way I've come across) so that the app's company can change the images without requiring alterations to the android code?
I've looked at URL redirection but it does not seem quite reliable.
(Each time the app starts, it goes and fetches the image for display)
Your app would pull images from
http://company.comm/images/1
http://company.comm/images/2
...
http://company.comm/images/n
and you would have a website/service that would allow to upload and set live images.
Using the Tumblr API achieved what I desired. It allows the fetching of the 6 most recent posts of a particular blog as JSON data. Recursively parsing the JSON received allows the program to dig in and use the URLs for a particular resolution.
Related
We are trying to develop a website for tracking the progress of pipeline and assets. I want to link progress data entered from forms developed in Java to GIS. We will be capturing all the lat and longs of pipeline stretch and lat and log of progress of work.
I need help in developing shapefile dynamically based on the progress and also to view that shape file in my webpage
The javascript API does have functionality for uploading shapefiles form your desktop into the browser, but you will need another tool to create those shapefiles based on the progress.
For uploading the shapefiles, see the example here: https://developers.arcgis.com/javascript/3/jssamples/portal_addshapefile.html
There may be more examples available at https://developers.arcgis.com/javascript/3/.
For creating the shapefiles dynamically, you could use ArcMap or ArcPro if you have those, or one of many python libraries to help write shapefiles. There may even be some Java libraries to help with this as well but I only work on the front end so I cannot help you there.
For something simple in context, the complexity of what kind of workflow to best suite your needs can range depending on these questions (and probably others I'm not thinking of):
Do you absolutely need to create a shapefile for this? Why can't you just push the form to a spatial database (e.g. PostGIS) and then return the XYs of the points or the string of XYs for line features, etc.?
Where is the source of the data & what is the format? Is it a PDF, text on an HTML page, a .csv file downloadable from a page, etc.? You may need to implement scraping (from a site) or download and update, or your data could be live streaming - these are all different workflows and you need to establish these boundaries before setting up your workflow.
If your end game are points, all you need is XYs in a table format to display in GIS software. If they are lines or polygons, it'd be a little different. Again - what output type are they and what are you trying to do with it (e.g. import into QGIS)?
Without these answers, it doesn't make sense for anyone to suggest something to you that could be totally impossible for you to execute. Please answer these and think through your workflow from beginning to end and/or visa versa.
Cheers,
Shawn
I'm developing a download-anything app for Android and it works fine in most cases.
I have come across sites that have URLs with a long hash signature (it seems) at the end of it. But the standard video app for Android, and my web browser is able to play it directly, streaming.
I have no clue as to how to stream this to a file (progressive download?), which should be possible. The URL paramater after '?' is used for something. As Jessica pointed out the URL below is probably used for RTMP streams with rtmp://....
URL example (host domain edited out):
http://blush.im.54ca3830.919727.x.yesitisporn.com/videos/3gp/d/b/f/
filthysite.com_dbf7f0a9c3913d4d0e09a36fe8ab3aba.mp4?e=1348368010&ri=1024&rs=85&h=c81c6707b13714ac65b651ba2939d94a
In the URL above there is a link to an mp4 video file. Trying to download it with this shorter URL does not work: http://blush.im.54ca3830.919727.x.yesitisporn.com/videos/3gp/d/b/f/
filthysite.com_dbf7f0a9c3913d4d0e09a36fe8ab3aba.mp4. Returns an empty document.
Since popular video apps and browsers pick up these types of HTTP links just fine for playback; there should be a standard way of getting the byte stream and write it to file. Thanks for any help!
In response to the question as originallly posed:
It is quite common to add URL parameters, splitting the url from the parameters with a question-mark, and seperating the parameters with ampersands. Take the substring on everything up to the first non-esecaped question-mark in the url, if a question-mark is present, otherwise use the entire string.
Based on new feedback:
Like I said in my comment, and as confirmed by your tests without the parameters, I think you're barking up the wrong tree to try to change the URL. I would suspect the reason you can't save these specific streams is there is something different about the file format or server configuration that is different than the ones that work. In particular, my first thought would be that perhaps those URLs are served by a Streaming Server (Example: Icecast), and not a normal file-based HTTP server. Advanatages of a streaming server include being able to on the fly serve different bandwidth versions of the streams, and instant seeking to any part of the file and so forth, but the downside for people trying to build download anything applications is those servers don't send the data as a single file, they send the data in chunks--trying not to get too crazy technical, basically, a chunk might have the first frame plus a bunch of diffs for what's on the video in the next several frames and the audio, repeat. As it does this it can throttle what quality to send depending on the latency it's seeing or the resolution of your screen, or resize what it sends if you resize the window and so forth. This sort of streaming works particularly well for live events, but it is not without its advantages for recorded events as well--particularly random seeking. To complicate the matter of capturing the data, some streaming servers actually transmit the video data via RTMP, RTSP, or MMS protocols instead of over HTTP. HTTP Pseudo-streaming or straight HTTP downloads is going to be a lot easier to save than streaming via RTMP. Some streaming types you pretty much have to recreate the file from the individual packets or transcode it from what plays on the screen as it plays in real time. So you may need to spend some time learning about different streaming protocols to figure out the best way to save the specific stream you're looking at.
I'm pretty new to Java web application and I just started a sample project in order to get some experience in this area.
Here's the matter on which I am currently working : let's assume that my web application will display a bunch of items with a grid containing a small picture (thumbnail) for each of them. What are the best or common practices to implement such an application, with consideration for performance issues (here, I'm mainly thinking about the payload size every time a user would load the list of items)?
Do we usually create a smaller size copy of the uploaded image files, or do we use some Javascript, CSS transformation, you name it, to reduce the images to display?
FYI, I'm using Spring MVC for my sample project.
Hope my question was clear enough. Thx in advance.
The best way is to create a separate thumbnail file for each picture when uploaded. When your client will display your gallery, he will only get reduced picture, and then save a lot of download and presentation time
This description was very hard to word. Basically I want to know if it is possible to access a website inside Android coding without actually sending the user to that website.
What I want to do is use a free website that generates a random pic after you upload your picture to it. I want the user to be able to upload their selected image to the website, and I guess somehow in code make that website generate an edited image and retrieve it back into the application for further use.
I know this sounds really ridiculous but I just wanted to know if this was at all possible before I try writing the code. Thanks!
The first thing you need to do is do an HTTP post upload of your image, as outlined here:
Upload image
Then you can do your processing on the server side - you didn't specify which platform you are planning to use on the server side, but in PHP you might want to look at this:
HTTP POST file upload
Finally, you'll want to retrieve the resultant image you made available on the server side this way:
Retrieve image from an URL
i am using Google app engine for my development, my project involves around 60 PDfs to be available for users to download.
when i try to upload the project by clicking deploy button in eclipse i get the error app limit exceeded.
i just want to know if i try to use the paid account is there is a different in the application size in paid account or not?
as far as i know its 150 MB for now
You should use Blobstore service to store your PDF files and keep application only for files needed by your application logic and presentation, not data. Here is description of the Blobstore:
The Blobstore API allows your app to serve data objects, called blobs,
that are much larger than the size allowed for objects in the
Datastore service. Blobs are created by uploading a file through an
HTTP request. Typically, your apps will do this by presenting a form
with a file upload field to the user. When the form is submitted, the
Blobstore creates a blob from the file's contents and returns an
opaque reference to the blob, called a blob key, which you can later
use to serve the blob.
All good advice above, try to avoid putting content like that in your code. My app hit this issue and only has about 10MB of code/images/resources. What takes up a lot of space is the GWT compiling of 15 permutations of your app.
One thing that helped me, was changing my GWT javascript generation output style from Details to Obfuscated, resulting in much smaller code. You can also limit the number of permutations being created.
https://developers.google.com/web-toolkit/doc/1.6/FAQ_DebuggingAndCompiling#Can_I_speed_up_the_GWT_compiler?
According to http://code.google.com/intl/de/appengine/docs/quotas.html#Deployments the applications may not exceed 10 MB.
upto 10MB data u can upload to ur app engine
see following link
http://code.google.com/appengine/docs/quotas.html