Firebase In-App Messaging は実装不要。

言い換えると、「コードの記述」が不要。

できることは、Firebase 管理画面からアプリ上にプッシュしてダイアログを出せるというもの。

アプリのリソースでの作業は、 build.gradle の以下の記述追加のみ。


dependencies {
  // ...
  implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.0'
  implementation 'com.google.firebase:firebase-core:16.0.1'
}

Firebase アプリ内メッセージングを使ってみる  |  Firebase

あとは、Firebase のコンソールで設定する。

表示させた各ダイアログ(ボタン)をタップしたときのアクションはURLでセットしておく。

あとは表示させるタイミングを設定画面からアレコレやってみるといい。

なんせ、2行の追加だけだもの。

これで撒いといてもいいんじゃね?

ベータだけど。


NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion とかでた。

[Developer Preview Android P] NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion; inside of com.google.android.gms [79478779] - Visible to Public - Issue Tracker

If your app is targeting API level 28 (Android 9.0) or above, you must include the following declaration within the element of AndroidManifest.xml.

対策は以下。AndroidManifest.xml。


<application ...
  ....
  <uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />

Project Configuration  |  Maps SDK for Android  |  Google Developers

今回は、GoogleMap SDK vs API-28(9.0/Pie) だったけど、他でも出そうで、使えそう。


Nullable(?) な Type で カラーリングが効かない Kotlin on GitHub

これ、

文法的なカラーリングが効かなくなる。

TestSyntaxColors.kt

この記述以降が壊れる。


AttributeSet?

TestSyntaxColors_OK.kt

これって、以前からじゃなく、最近の話だよね?

 

追記:2018-11-24

直ってる。

TestSyntaxColors.kt


java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android'

なんなんすかね。

どっちかといえば、環境依存のバグではまる時間が増えてますよね。


-keepnames class kotlinx.** { *; }

IllegalStateException: Module with the Main dispatcher is missing · Issue #799 · Kotlin/kotlinx.coroutines


# ServiceLoader support
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}

# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
    volatile <fields>;
}

Android app with coroutines 0.30.1-eap13 crashes in runtime · Issue #657 · Kotlin/kotlinx.coroutines

あちこち依存周りで統率取れてない感ありません?

Jetifier forces Dagger 2.16 even when 2.17 is declared as a dependency [115738511] - Visible to Public - Issue Tracker


Android Studio に入れておくとよい ライブラリバージョン検索 プラグイン「OK, Gradle!」

ライブラリの最新版を探すのに役に立ちそうな。

OK, Gradle! - Plugins | JetBrains

scana/ok-gradle: IntelliJ/Android Studio plugin for searching artifacts ids of popular Java libraries.

使ってみたけど、役に立つと思う。



動画のように、いろいろあるけど、

いちいち参照先探すのも面倒だから。