How can we capture photo and upload on server in phonegap application - android

How can we capture photo and upload on server in phonegap application.
Server side code is mvc4 C# action.
We have to send two more values (name and ID) on server with image.

I can't speak to the android or phonegap piece, but for your MVC action, please look into HttpPostedFileBase - Haacked.com has a great article on it: http://haacked.com/archive/2010/07/16/uploading-files-with-aspnetmvc.aspx

I tried to ask a similar question but no response. Not sure if it can be done. There are a lot of PHP examples though.
Working example of AJAX file upload to WCF service

Related

Send and retrieve data from android app to vb.net web server using web service

I'm a newbie in android and .NET.
In my final year project I'm developing an android app for storing pictures in cloud. I have a similar type of website created in vb.net.
I have to use the .NET server for storing images. I also have to use the same database as of my website. After a little bit of research I find that a web service is required for this purpose, but I do not know anything about web service.
I have found that volly can be used for sending JSON data to web service. But do not know how to implement this.
If any one can tell me how to create a web service in vb.net to receive JSON formatted POST data and send back a response to the android app.
Sorry for my terrific English.
Thanks in advance.

Connect Android app to Play framework application

I'm developing my first android application, I'm trying to send video files I've recorded and saved in the applications External Cache Directory as well as other data like usernames, etc. I have a play application running on my server and have a mySQL DB running on my server.
I have experience with JDBC and oracle, but am unsure of how I should make the connection between the android app and the play app, I'm thinking I don't want the android app talking to the mySQL DB ever! that I'll send a JSON object from my android application to my play application, the play application will then take the JSON object parse it and update the DB with the user details and a pointer to the video file and also add the video file to the designated folder.
I'm unsure how to implement the connection on the the android app, do I create a new activity or maybe a fragment for the connection to the play app? a link to a simple tutorial taking a video file and sending it as a JSON object to a play application would really get me going.
I realize that might be a bit much to ask.
I was reading this post MultiPartEntity and thought it might be along the lines of how I would make the connection from the android app to the play app, but was unsure if it was using JSON(the comments suggest it does, but I can't see any JSON object creation)
is MultiPartEntity a good solution for my connection needs?
How do I deal with the JSON object when I receive it on the server end?
I'm thinking I'll have a route set up to deal with, but again a link to a similar example would be great.
Any help pointing me in the right direction is appreciated.
Your Play! application must have an endpoint to send data with post method (RestFul Web Service), Play! is Restful, just handle the uploaded file in your Action. In your Android Application, you can send data with Volley Library follow this link to do that How to multipart data using Android Volley
or your follow this tutorial with php web service but with what you want http://www.androidhive.info/2014/12/android-uploading-camera-image-video-to-server-with-progress-bar/

How can I create News Android application without having my own server?

I have tried to create a news app that display news from some website.
Some friends helped me to write some php so that I can call the php using http request and get the JSON from the response.
Then, I can parse the JSON and display the news correctly.
However, the server is not mine.
Actually, I don't want to have server communication using php.
I want to do it just on client side.
1) I know how to parse the html and get the result using python in local machine, is there any way to implement my python code in Android, and after running the python code, it will connect to the news website and display it correctly.
2) If not, what can I do because I do not want to host a server.
This is a fairly vague question however I will answer the one specific part:
is there any way to implement my python code in Android, and after running the python code
Yes, its called Scripting Layer 4 Android which supports many languages. Specifically I found python-for-android which allows you to run python on Android devices, which you could use for your application to pull and parse html from a news website.

Set up a server and get feed from it in android

This may not be the type of question I am supposed to ask here but I don't have anywhere else to go. I want to make an android application which gets feed from a web-server and displays in the application. It will be kind of a newspaper app. I have done my share of work: I know android application developemnt: have made some apps. Also, I have an idea of UI: a listview with the feeds and then on selecting an element I will open another activity with the complete feed. What I wanted to know is:
How to set-up a server for this?
How to request?
Can I set-up a free server?
I dont want to use GCM as I don't think it allows sending pictures. Plus it allows small data to be sent. Also, I have no knowledge about the 3rd party server I may need to create for this.
I would want to post both text and photos (combined makes a post, total of around 10 posts) from the server. Please dont close as not a question. Any link, tutorial will be highly appreciated. For server side coding, I know php, .net. I have never coded in java for a server, but I can learn it.
Please follow following steps to get your project done.
Set up any php or Java or .Net Server (If you are aware of any of these web technologies)
After you set up server you need to make web service which will work as mediator to transfer data between your server and mobile.
Webservice response will be either in JSON or XML
Generate response according to your need and parse them on android side.
Display in listview :) :)
You can use JBOSS for your server, and do a Java Server with Webservices.
In your webservices you'll have a service that get all the feeds, and maybe another that request the complete feed...
Your "language" between the Android app and the Server, you can use XML with SOAP (ksoap2 for Android), or you can try JSON (I never used, but I will 'cause we goona need use in my service).
You can try find another free server side, but I think the SOAP is important in most of the servers to "talk" with your app.
I hope helped you.
[]s
Bertan

How to upload a 3gp file on SDcard to a server?

After countless headaches and time wasted I managed to get the AudioRecorder working for Android and have a file stored on my SDcard. What I want to do now is send this file to a server within the application. So when the user hits submit...it sends the .3gp file. Is this possible? Thanks
I'd recommend that you just use HTTP and POST it to your server.
Here's a good little code snippet that shows how to do an HTTP post from java.
http://rapidandroid.org/wiki/HttpUpload
Then you'll have to receive the file on your server. You could just use a simple php script for that unless you have some other server side technology.
Here's some documentation for doing this using php:
http://www.tizag.com/phpT/fileupload.php
yes you should use FTP because it will be faster...
I had done bit R&D on it and found few link but most of them were not working.
here is the link that is working for FTP upload..
http://www.jibble.org/simpleftp/

Categories

Resources