I can\'t fetch last known location. I have enabled Geocoding API and Google Places API for Android in google console. I added api key to ma
import com.google.auth.oauth2.{GoogleCredentials, ServiceAccountCredentials}
import com.google.cloud.bigquery._
class XYZRawDataIngestion {
def run(): Unit = {
var credentials: GoogleCredentials = null
val client_id: String = "10754111315596"
val client_email: String = "csp-302@xyz.com"
val private_key = "-----BEGIN PRIVATE KEY-----\nMII9xE9wTn68bxG8W60yU4O+JdullsTX\naOCrYTyVsTK+U78ElELXSqKn+Mqqka/IAS9ETCutLXhMNbTHbDUoN6POzU1c7GGz\nxSAmSXzVz6ejoJ9zoZXCB+cEI/CCne+GoGzg+CUCgYEAuGFxjuFNEAJbOamo6zWu\n/MobrYwqg4W4akwe4bgFE9lbpb3qs5pKhxGz0Utn3fNyhsTwQvgJ5oCBVIRxZwzv\nM8+4aHXGMJLNMf6EpUeoOCWOcp+6kLFNZZF9erUU1d3m+ID4Df4AUijIIG6lUQa1\nLP4eCwDeNpJGFcTQuz18u+U=\n-----END PRIVATE KEY-----\n"
val private_key_id: String = "79072ec47cc5a70bb4f2da1ccd4a"
val project_id = "xyz-mgmt"
val token_uri = new URI("https://oauth2.googleapis.com/token")
credentials = ServiceAccountCredentials.fromPkcs8(client_id, client_email, private_key, private_key_id,
null, null, token_uri)
val bigquery: BigQuery = BigQueryOptions.newBuilder.setCredentials(credentials).setProjectId(project_id).build().getService()
}
}