I'm new in Android Developer, I have a project to create a library for Android, inside the library, I must send a post request to web service.
My questions are:
is that possible to create a request for web service without using the third party?
if that's possible how it has done? Please give me an example
I know there is a good and simple way if I using the third party such like a retrofit, but I don't want using the third party because I want to make my code secure and I want to learn
How do I archive this?
Sorry for my bad English, I hope you all can help me.
If you mean using android framework or java built-in ways, maybe HttpURLConnection
this is an example and an useful ref
Related
let me ask my question with an example:
Assume that I have some PHP files for my android app that I put it on 000webhost[dot]com; so, my question is how can I use parse (parseplatform[dot]org) in this situation?
I'm new in backend, so I'm sorry if this question is stupid!
For some reason I can't use back4app, aws, etc.
Don't worry about php language, if it's necessary I can write it in another language. (my backend logic is not complex)
If you need a simple web-site with simple backend logic, I'd do that using Express.js. Since Parse Server is essentially an Express.js middleware, you can use the same process to serve both Parse Server and the web-site.
If you prefer to use a different technology, Parse Platform provides many different sdks (https://parseplatform.org/#sdks) that you can use for many different backend technologies (including PHP), or you can connect directly to the REST (https://docs.parseplatform.org/rest/guide/) or GraphQL (https://docs.parseplatform.org/graphql/guide/) apis using any client.
When I asked this question, I didn’t know what exactly should I search until I found this amazing article. This article opened my mind, the most helpful thing that I found there, was this:
Parse is more flexible. Given the freedom to host Parse on the
server of your choice.
You can choose the self-hosting option and deploy your Parse project
on your selected server, such as Digital Ocean.
And then I found this awesome video on youtube.
Now I can run parse on my own server (vps or cloud).
I know the title of this question may not be clear, but I don’t want to change it, because someone like me doesn’t know the right keyword for research.
Hope this help someone else too.
Ok so, I know the question is pretty much google-able and I did google it and found out a few answers ,so I am not asking this question knowing completly nothing.
So, I have an application (Cannot specify much about what it does or is or so...) and I need to get some data from a database.
As far as I know, the Volley is the best way to go ,but I am still looking for more details.
Could anyone tell me which is the best way to go?
NOTE: I am NOT looking for code,I am looking for methods.A name would sufice ,as I can do the digging myself.Eventually links to documentations would be awesome, but again, I can find documentations.I just need to know which is the fastest way and the most optimized.
Based on your comment, it looks like there are two different aspects to your application:
Sending out the HTTP requests from your client- i.e. your android app
Processing and sending the response to these requests on the server side, by setting up a web service
Looks like you have part 1 figured out. Note that, volley is a library, similar to android HTTP library, but optimized for faster networking.
For part 2, unless you're planning to use embedded database like sqlite, you'd need to learn about writing web services to provide database access.
Spring Data JPA is one of the many ways to do it.
I hear Parse is great too, but not free.
First of all, i'm not that experienced a developer with android.
I recently started an project and for said project I need my app to interact with a website. Specifically I need my app to go to the page "http://tref.cals.nl/roosters/infoweb/index.php" and there auto-fill in the two text-boxes (html forms input type text to be exact) and log in.
After that it should 'click' a link to download a file and use that file later in the app.
I've looked for all kinds of solutions, but can't really find anything that I think could help. I hope on receiving solutions, or something to look for.
If there is something else you need to know to answer my question feel free to ask.
EDIT:Thanks for the answer, but sadly i must inform you that i don't own the site in question. Also I can not arrange anything with the owner. That is why I thought of my way to do it. Anyway thanks for answering and I'm sorry I that I wasn't specific enough.
The way you described might not be the most ideal way to achieve that you want.
I would recommend using some sort of api interface. Since you have a website, i assume you have a hosting service; you would need to create some sort of API request with username and password; which in turn responds with the url of a file. You could use androids asynchronous http request to do this
I would imagine it to flow something like this
Make a request to a url, which will reside on your website. You can post username and password to this url. Ex: http://yoururl.com/api/validateuser.php
Your API URL will return a download link or whatever you seem fit - using JSON or XML, or if it is just a URL, plain text should do too.
Use android's HTTP library or you can even use aquery to download this file to your local disk.
Reference:
AQuery
https://code.google.com/p/android-query/
Async HTTP
http://loopj.com/android-async-http/
Writing an API Tutorial
http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-12-2/
Situation:
Let's say i have 2 emulators and I want to send a text from one emulator to another. What is the way to solve this? Can i using .Net web service?
Anythings that can forward your messages from Android client.
So if you don't want to make it to complex, consider to use some kind of RESTful WS for example.
Good luck
For .NET platform, maybe you want to make a quick look on this link link to some blogs
hi im quite new to android development and am coming from the world of GWT and Remote procedure calls to communicate with a server.
Now i am looking for a way to realize calls on a server over the internet via my android app.
is there a pretty way to realize this?
thanks in advance
Edit: Okay maybe I put my question wrong. I am just looking for a way to send a class object from my server via an appropriate protocol over the internet, so i can use it in my app
can someone please help me?
You can try to use http-dispatch. It is the adapted gwt-dispatch framework which can be used on Android platform. Http-dispatch uses default binary serialization so it works from the box for many types of objects. Currently it is in alpha but you can try http://code.google.com/p/http-dispatch/