Skip to content
Advertisement

Tag: retrofit

MVVM – where should I call for user location?

currently, I’m building an app which will show for the user recent forecast. For make an api call, I have to provide longitude and latitude as parameter. For now, I have written some code about getting langitude, and longitude, but I don’t receive proper data. As I written those methods in MainActivity, at first, the longitude, and latitude is equal

Spotify PKCE. Error invalid client secret

I need to complete Authorization Code Flow with Proof Key for Code Exchange. In step 4, I get an error 400 – bad request {“error”:”invalid_request”,”error_description”:”Invalid client secret”}. Why need to client secret if it is PKCE. What do I wrong? Do you have any idea? Body request like code=abc&grant_type=authorization_code&redirect_uri=spotify-sdk%3A%2F%2Fauth&client_id=abc&code_verifier=abc Example code verifier: xeJ7Sx1lyUr0A_DAomzewuGn8vNS2cd3ZF2odDlqHEqeYKpxjnYYhpHxOohoo7lf22VNImGiOy_PE07owmDn2VmTWvdKKQ Example code challenge: N_yPRc_VC8JQJz5dYOuvvM-9cJLdAtEjJ9-lh8Xk_qI And the same

Retrofit2, Android, @Get Parsing for the Array of Array

I am parsing the title correctly and displaying it in a listview. I cant seem to access the seen below. Here are the two objects, sample response and my call. response pojo: first object second object response: I am getting the title just by passing ‘result’ into the adapter and using result[i].getTitle(); I tried using result[i].Details[0].findMe; but my error response

why use Retrofit when we have OkHttp

with OkHttp we can make HTTP request then get response from server then with Gson lib convert response to object we need. this is from Square/OkHttp doc: Its request/response API is designed with fluent builders and immutability. It supports both synchronous blocking calls and async calls with callbacks I read from stackOverFlow Retrofit uses OkHTTP automatically if available . So

Advertisement