growthbeat/growthbeat-android

GrowthPush.registerClient causes NullPointerException.

Closed this issue · 1 comments

GrowthPush.requestRegistrationId(String,Environment)を呼ぶ前に、GrowthPush.registerClient(String)を呼ぶとClientクラスの69行目でNullPointerExceptionが発生します。

GrowtPushのenvironmentフィールドがrequestRegsitrationId内で初期化されているため起きると思われます。

また、requestRegistrationIdは内部で使っているGoogleCloudMessaging.register(String)Deprecatedになっているため使わないようにしています。

GCMの最新の仕様は以下にあります。
https://developers.google.com/cloud-messaging/android/client

ご報告ありがとございます。
v1.2.6にてGrowthPush.registerClient()でenvironmentを指定できるようにしました。