This file contains hidden or 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
| 'use strict'; | |
| var p = console.log; | |
| import obj from './test_module'; | |
| (function() { | |
| p('obj', obj); | |
| try { | |
| p('circleArea', obj.circleArea(5)); |
This file contains hidden or 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
| class MyAlertDialog: DialogFragment(){ | |
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | |
| return AlertDialog.Builder(activity) | |
| .setMessage("Hello") | |
| .setPositiveButton("OK") { _,_ -> dismiss() } | |
| .create() | |
| } | |
| } |
This file contains hidden or 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
| class MainActivity : AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| } | |
| override fun onResume() { | |
| super.onResume() | |
| Handler().postDelayed({ |
This file contains hidden or 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
| class MainActivity : AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| } | |
| override fun onResume() { | |
| super.onResume() | |
| Repro.track("main_open") // send tracking |
This file contains hidden or 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
| class DeepLinkTargetTWOActivity : AppCompatActivity() { | |
| companion object { | |
| const val EXTRA_TEXT = "text" | |
| } | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_deeplink_two) | |
| findViewById<TextView>(R.id.tv_to_replace).text = intent.getStringExtra(EXTRA_TEXT) ?: "text not passed" | |
| } |
This file contains hidden or 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
| class DeepLinkTargetONEActivity : AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_deeplink_one) | |
| } | |
| } |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.example.koheiando.reprosample"> | |
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | |
| <uses-permission android:name="android.permission.INTERNET"/> | |
| <application | |
| android:name=".ReproApplication" | |
| android:allowBackup="true" | |
| android:icon="@mipmap/ic_launcher" |
This file contains hidden or 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
| class TestRequest : HttpRequest() { | |
| companion object { | |
| private const val HEADER_AUTHORIZATION_KEY = "Authorization" | |
| private const val QUERY_KEY = "q" | |
| } | |
| override val method: Int = Request.Method.GET | |
| override val url: String = "https://www.testrequestforfun.com" | |
| override val queryParams: Map<String, String> = mapOf(QUERY_KEY to "paramTest") |
This file contains hidden or 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
| suspend fun request(method: Int, url: String, headers: Map<String, String>, jsonRequest: JSONObject?): JSONObject { | |
| return suspendCancellableCoroutine { continuation -> | |
| val success = Response.Listener<JSONObject> { response -> continuation.resume(response) } | |
| val error = Response.ErrorListener { error -> continuation.resumeWithException(error) } | |
| val request = object : JsonObjectRequest(method, url, jsonRequest, success, error) { | |
| override fun getHeaders(): Map<String, String> = headers | |
| override fun parseNetworkError(volleyError: VolleyError): VolleyError { | |
| return volleyError.networkResponse?.let { |
This file contains hidden or 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
| fun request(method: Int, url: String, headers: Map<String, String>, jsonRequest: JSONObject?, | |
| successListener: (json: JSONObject) -> Unit, errorListener: (error: Exception) -> Unit) { | |
| val request = object : JsonObjectRequest(method, url, jsonRequest, | |
| Response.Listener<JSONObject> { json -> successListener(json) }, | |
| Response.ErrorListener { e -> errorListener(e) }) { | |
| override fun getHeaders(): Map<String, String> = headers | |
| override fun parseNetworkError(volleyError: VolleyError): VolleyError { | |
| return volleyError.networkResponse?.let { | |
| Log.e("VolleyRequest", volleyError.networkResponse.headers.toString()) |