Put xml file "api_keys.xml" in the directory "res/value/".
api_keys.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="THE_MOVIE_DB_API_TOKEN">XXXXX</string>
</resources>
package com.example.android.justjava; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.CheckBox; | |
import android.widget.EditText; | |
import android.widget.TextView; |
public class Activity extends AppCompatActivity{ | |
... | |
private NetworkConnectionMonitor connectionMonitor; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity); | |
... | |
connectionMonitor = new NetworkConnectionMonitor(getApplicationContext()); |
### Keybase proof | |
I hereby claim: | |
* I am tarek-bohdima on github. | |
* I am tariqywsf (https://keybase.io/tariqywsf) on keybase. | |
* I have a public key ASAMDFlgT_Th26ES3USYfMIFN6-fiiI5Gkx0Fqv6qldLIAo | |
To claim this, I am signing this object: |
/* Copyright 2019 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
public class LiveDataTestUtil { | |
public static <T> T getOrAwaitValue(final LiveData<T> liveData) throws InterruptedException { | |
final Object[] data = new Object[1]; | |
final CountDownLatch latch = new CountDownLatch(1); | |
Observer<T> observer = new Observer<T>() { | |
@Override | |
public void onChanged(@Nullable T o) { | |
data[0] = o; |
https://help.github.com/en/articles/managing-commit-signature-verification
Check for existing GPG keys
gpg --list-secret-keys --keyid-format LONG
/* Copyright 2019 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |