This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val WIDEVINE_UUID = UUID(-0x121074568629b532L, -0x5c37d8232ae2de13L) | |
val wvDrm = try { | |
MediaDrm(WIDEVINE_UUID) | |
} catch (e: UnsupportedSchemeException) { | |
//WIDEVINE is not available | |
null | |
} | |
wvDrm!!.apply { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CODELAB: 아래 코드를 추가하세요 | |
// '오늘 행사' action intent has been matched | |
'input.todayevent': () => { | |
// Firestore 접근을 위해 Firestore 클라이언트를 가져옵니다. | |
var db = admin.firestore(); | |
var eventName; | |
// events 컬렉션에 접근해 DOCUMENT_ID의 문서 참조를 가져옵니다. | |
var docRef = db.collection('events').doc(DOCUMENT_ID) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in SplashActivity.java | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
FirebaseRemoteConfig.getInstance().fetch(60) | |
.addOnSuccessListener(new OnSuccessListener<Void>() { | |
@Override | |
public void onSuccess(Void aVoid) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gdgkr.firebaseworkshop; | |
import android.content.Context; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in MainActivity.java | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
if (FirebaseAuth.getInstance().getCurrentUser() != null) { | |
showMessageListFragment(); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class CourseListRequestTask extends AsyncTask<Void, Void, String> { | |
private static final String TAG = "CourseListRequestTask"; | |
@Override | |
protected String doInBackground(Void... params) { | |
try { | |
URL url = new URL("https://www.udacity.com/public-api/v0/courses"); | |
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.gdg_opensource_codelab_sample_1; | |
import android.os.AsyncTask; | |
import com.google.api.client.extensions.android.http.AndroidHttp; | |
import com.google.api.client.http.HttpRequest; | |
import com.google.api.client.http.HttpRequestInitializer; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.json.JsonFactory; | |
import com.google.api.client.json.gson.GsonFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { | |
@Override | |
public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { | |
PlaylistItem item = (PlaylistItem) mListView.getItemAtPosition(position); | |
String videoId = item.getSnippet().getResourceId().getVideoId(); | |
Intent intent = new Intent(MainActivity.this, YouTubePlayerActivity.class); | |
intent.putExtra(YouTubePlayerActivity.EXTRA_VIDEO_ID, videoId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.ImageView; | |
import android.widget.TextView; | |
import com.google.api.services.youtube.model.PlaylistItem; | |
import com.google.api.services.youtube.model.PlaylistItemSnippet; |