I'm working on a simple multimedia messaging app for Android, and I was trying to use Google AppEngine's BlobStore as my cloud storage for the various image, video, and audio files that will be transferred. However, all of the examples and such that I've seen for uploading to blobstore assume that I'm doing it via an HTTP form, and so I'm kind of at a loss as to what to do.
I've seen several people asking the same question, but none of them seem to ever get a satisfactory answer. Can I or should I use AppEngine's blobstore in this way, and if so how do I go about doing it?
Thanks, SO.
You could go with something like this:
1. On Google App Engine, create a Web Handler that calling blobstore.create_upload_url() returns an action_POST_URL
2. On Android, post the image to the action_POST_URL using HttpClient and MultipartEntity.
for Java
BlobstoreService blobstoreService =
BlobstoreServiceFactory.getBlobstoreService();
String action_POST_URL= blobstoreService.createUploadUrl(redirect_URL);
Related
I am creating an Android app which will allow users to upload video files to dropbox. I want the app to display a pop up message when the upload has completed which shows the user the URL to re-download their file. I'm using the Dropbox API V2 but I can't find anything relating to this. Looking online I can find mentions of using "share" but they seem to be related to an earlier version of the SDK.
Thanks in advance for any help
The standard way of getting a file's data from the Dropbox API is by directly downloading the data from a file download endpoint, and not by returning a URL the user can access. In the Dropbox API v2 Java SDK, you can use the downloadBuilder method to get a DownloadBuilder you can use to download the content.
If you do want to get a link, you can use createSharedLinkBuilder, but that's only really intended for sharing.
Maybe before get an answer for this question, you need to clarify what kind of solution you are seeking for.
There are three kinds of potential solutions for this task.
(1) Using the Acitivties or Dialog provided by Dropbox SDK, you use Intent to interact with them and get response in onActivityResult() call.
(2) Using the libraries provided by Dropbox SDK and construct UI using you own code, in this case you use the object models (like Entry, Session and WebOAuth2Session, etc) and Helper classes to access the data.
(3) Construct the object models and network access helpers on HTTP/JSON according the Dropbox API to achieve a full control on cloud document access. the download URL you are looking for must be in the JSON response text.
Hope it can help you to get an answer quickly.
Can someone please clarify this for me. I am reading the developer page about the blobstore at https://developers.google.com/appengine/docs/java/blobstore/overview. I can't seem to wrap my head around the process of saving and retrieving blobs? It sounds like
android app would directly send an image to the blobstore
after saving the image, the blobstore would then return a blobkey to my backend for me to put in the datastore
Is that the process? Maybe it's because I have had a long day, but I just can't see it. If someone has an example they don't mind sharing, please post it. I just need to save images from android in the blobstore and then be able to retrieve them with blobkey or otherwise.
I have already look at
Upload to Appengine Blobstore in Android
Using Google BlobStore with an Android application
Android Interaction with Google App Engine Blobstore Service
What is the syntax to get a Blobstore upload url from Android?
For the life of me, I don't know why they are not doing it for me.
I suppose some questions are:
How does android know where to send the blob to? I mean, does Google distinguish between my instances of the blobstore versus other people's instances, similar to how it distinguishes my instances of the datastore? In other words could I go to app engine Applications Overview and see all the blobs that belong to my app the way I could in the datastore? I suppose a complete, working piece of code could help me see these answers.
Part of my problem could be that I have never used servlet. I am presently using Google Cloud Endpoint for my api.
Actually there are two ways to upload to blobstore:
Using direct upload handler:
Server gets a unique one-time secret upload url via createUploadUrl(..) and sends this url to client.
Client uses multipart/form-data POST to upload data to this url.
The upside is that you can upload large files (>32mb).
Using blobstore FileService API which is deprecated and should not be used any more:
You create you own POST upload handler where client uploads data.
You use FileService API so save data to blobstore.
The downside is that you can upload max 32mb of data (generic GAE request limit).
The upside is that you have access to data so you can edit contents if needed.
Your description of the process is correct. The only step you miss is the first: the server side calls blobstoreService.createUploadUrl(redirecturl) to generate the URL to upload to. Then the handler at redirecturl will save the blob key to the datastore.
I'm creating an app that connects online to a server to collect information. To save money from renting server space from a big corp, I was wondering if any of these free services (Dropbox, Google Drive, Microsoft Skydrive, Amazon Cloud, etc.) could be potentially used as server space?
I pretty much want a "space" or "cloud" where people can connect to to collect data. Example: I have a weather app, and there is files on my server and I update the files according to the weather. I would like them to be able to open the app and connect to my server to gather the weather data saved on my server. It really won't be much digital space, so I didn't want to pay bookoo bucks when I could potentially use a free service like Dropbox.
You can't execute remote code on any of those services (that I'm aware of), but you could certainly save files to them. For example, you could write out text files (CSV? XML? JSON?) to those locations.
Take a look at the Dropbox SDK for details on how to integrate it to your iOS or Android project. It's pretty simple.
Here's a basic code sample for uploading a file:
NSString *localPath = [[NSBundle mainBundle] pathForResource:#"Info" ofType:#"plist"];
NSString *filename = #"Info.plist";
NSString *destDir = #"/";
[[self restClient] uploadFile:filename toPath:destDir withParentRev:nil fromPath:localPath];
I heard several times that it's working, but hadn't made my own experience yet.
Check out this post http://lifehacker.com/5528104/use-dropbox-to-share-and-host-your-web-site
As Axeva said you can't run your own scripts or sql. You have to write your own workaround.
I'm sure you can use Dropbox. But only if you want to download or upload some files. And I'm not sure if it's ideal. But there are other alternatives you may want to look at. Like you can use GoogleAppEngine if you want some processing to be done on server. Maybe Parse.com is another choice but not sure if it fits your needs.
Check out site44. It allows you to connect with dropbox and use a friendly URL (own domain or otherwise) for accessing the files.
I would recommend using something like Parse.com as your backend. Their free tier lets you store 1GB. Maybe not as much as Dropbox, but the API for Parse is great and made for storing/retrieving from mobile apps. You'll be up and running really fast. I haven't looked at Dropbox SDK though.
Dropbox works fine if all you want to do is using it as an FTP to put some JSON or XML files on.
Just be sure to put it in your dropbox's 'public' folder and requesting the public link.
I am just beginning to look at using json and a rest client setup to connect with a rest server. Is there a server that can be accessed just so I can try my code and see what is returned.
Blizzard just opened up their API for JSON using HTTP. So it's probably really close to what you're looking for, and it's got potentially LOT of interesting data to play with, even if you don't play the game.
http://blizzard.github.com/api-wow-docs/
Note, you may be limited how much you can use it. But for a simple app and testing, this should not be a problem.
i'd like to aks, if someone were to create a web site, let's say for example: a site for storing information on an online database, what would be the recommended web service (SOAP or REST) and format to use (XML or JSON) if there will be server - client transactions/interactions and a client application will also be used in an android platform?
also, i'm curious. does anyone know if google uses REST web service and JSON format for the GMAIL in android?
thanks
ads
I'm not sure about what they use in the GMAIL application.
But I'd prefer REST and JSON because of two simple reasons
REST is easier to access, since forming the request is not gonna take much time.
JSON lib is bundled with android and is smaller in size when compared with its XML counterpart.