Calling Nest REST API on from android app without using Firebase SDK

336 Views Asked by At

Including Firebase.jar file in my android app project will cause reaching 64k dex limit. So, I'd like to use REST API instead of Firebase API.

After I got access token, I try to use either HttpPut or HttpsURLConnection to change thermostat mode. By using HttpsURLConnection, I got http response code 307 to ask me to redirect to firebase-apiserverN url. Then, I use the new URL and do a HttpsURLConnection PUT, I got http response code 400.

Is there any Nest API sample code for android without Firebase? Thanks.

0

There are 0 best solutions below