Background
I'm using the Clean architecture in my android app. My domain and data layer are heavily RxJava-based (RxAndroid).I'm also using Parse(BaaS).
Question
I know that the Android Parse SDK is doing a lot of work under the hood like caching and encrypting data. Is it really stable to use its synchronous calls with RxJava's Schedulers?
I know that Retrofit works well with RxJava. Should I drop the Parse SDK and use their REST API instead ?
Help me, I'll give you a cookie !
I know that the Android Parse SDK is doing a lot of work under the
hood like caching and encrypting data. Is it really stable to use its
synchronous calls with RxJava's Schedulers?
Parse has plenty of android SDK samples on git etc. If your Rx is friendly with Curl maybe you could also look at REST api from parse.
Otherwise, in the 'Rx' request/response circuit you should try to expose the http traffic ( headers that contain parseAppId, and parseUserToken )
The token mention in the exception
scroll down till 'handling invalid session token'.....
Related
I never had this tough reading content from online with other language, I am developing an android app, It's need to read some JSON data from online. But I googled it and gave it a try on my own, but nothing is working as I expected
I want to read that JSON from the web, is there any good way to do that?
Please do a search on volley or ok http for android on google. (Though ok http is obsolete but volley is surely a good alternative)
Use Retrofit + GSON libraries. They can satisfy wide range of expectations and have perfect samples.
I want to write a client application for a site (e.g. to read smth from site, add some comments, likes etc). I haven't got access to site sources and there isn't any API for work with it. So at my Android application I decided to parse this site (it has static pages) using : JSOUP Library
And using this library I'm going to write unofficial, but API for my purposes to work with this site, and then use it in my Android application.
Can somebody tell me, is this good practice or there are better ways to do? Is this good idea at all to parse site in Android device.
As I wrote in comment - in general building your own application on top of the third party www service is not a good idea. If you want to do it anyway you have 2 options:
Use jSoup (or any other html parser if exists) and parse third party content on the device
Set up some middleware server to parse content and serve it in some more convenient way.
The second option has a little advantages - you can fix application without forcing users to update it and probably you'll save a bit of device's bandwidth. Of course disadvantage is that you have to pay for server.
General problem with applications like that is that every single change with layout, skin, server configuration can cause your application to stop working, as well as parsing html needs much more work that just connect to existing API.
More over - publishing your application can cause some legal issues (copyright) and is against Google Play's policy:
Do not post an app where the primary functionality is to: Drive
affiliate traffic to a website or Provide a webview of a website not
owned or administered by you (unless you have permission from the
website owner/administrator to do so)
I,ve created a pictures gallery with ios 4.3 and i want download, decode and save my pictures before start my app.
I want use SOAP with Java Server because i think that is more simple but i,ve had some problems with Core Services library, i need this library to communicate both sides.
It´s impossible add this framework.
I need solve this problems or other solutions.
I´ve seen ASIHTTPRequest but it´s so difficult understand from zero.
SOAP is seldom the simple answer.
ASIHTTPRequest is nice for network access, but not a silver bullet for SOAP. It is just as easy/hard to do with the built in classes from Foundation framework.
First of you need to manually build your SOAP request bodies. Typing up template a XML file with placeholders that can be easily replaced is the simplest way to do it.
Then take the constructed XML as the HTML body of a NSMutableURLRequest and send it using NSURLConnection.
The response will be more XML wrapped in a NSData instance. Use NSXMLParser to decode it.
But given that you want to write the server in Java and an easy solution; I would use Hessian over here http://hessian.caucho.com/ to implement the server.
On the iOS side use HessianKit over here https://sourceforge.net/projects/hessiankit/ and do simple RPC calls.
Disclaimer; I am the author of HessianKit.
Does google provide a Java server side api **(NOT java script).**I dont want the ajax api which works at clint side.
What i want is that the result returned for a keyword should return me search result in some specific data structure.Like List or set data structure.Then i want to manipulate the result according to my need in java code.
I had used such a java server site api for youtube.
They used to but is discontinued. Most likely because you can remove their ads ;-)
From Google's terms of service
You may not send automated queries of any sort to Google's system
without express permission in advance from Google.
So, no - use their AJAX API. The SAOP API is discoutinued, but I think you should be able to use it, unless it requires a key, in which case you are tied to the AJAX API
Technically, the statement quoted above doesn't mean you can't use some sort of server-side API - there are examples of that if you google around. It means you shouldn't do it, because sooner or later you will be blacklisted (banned), as violating the terms.
What you would be looking for now is the CustomSearch API:
They used to have a different API developers could use but it has been depreciated (Nov. 2009 I think) so this is a for cost service now. I am not aware how long it might have been a free service. The new API allows 100 free searches a day, but you have to be signed up for billing else anything above 100 searches will fail, here are the details:
http://code.google.com/apis/customsearch/v1/overview.html
And sorry yes, this would still be using Java Script but you could use this:
http://www.json.org/java/
There is at least a SOAP API that I'm aware of: Google SOAP Search API
I don't think Google wants 3rd parties to use their search engine for their own services/applications. You would get "we think you are a robot" error page as a result if Google thinks you are not a real person.
You can however try Google Custom Search
I'm trying to write a simple Java desktop app to query Google and get the results. I've read so many articles in the past few days. I know that I have to do it through the GWT (Google Web Toolkit), the API that Google offers to programmatically query its search engine. My problem is that the GWT seems to be useful only to construct AJAX applications. I just want to write a simple desktop app. I am not interested in Javascript, XML or any server side application. Isn't there a way to do it?
Sure, take a look at this approach.
The general idea is that you make an HTTP fetch (using vanilla java.net.HttpUrlConnection or Apache HTTP Client). The magic is in the forming of the URL with the search term, and in the processing of what you get back from Google.
For the exact details on how to do this, see Google's REST search API documentation, including this section.
You can always get a license for the webservice and get the results returned through SOAP, however you did say that you were uninterested in XML. Shame, thats the quickest way. There is always doing a direct request to google through the query URL, since it uses HTTP get.