Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は Android 用のアプリを開発しています。デバイスに保存されている GCM RegID を取得し (登録は既に完了しています)、SQL サーバーに送信する必要があります。Reg ID を保存するにはどうすればよいですか?
Tks
GCMRegistrar.getRegistrationId(this);あなたActivityまたは他のから呼び出しますContext。空の文字列が返された場合は、登録 ID がありません。空でない文字列が返された場合、それが登録 ID です。
GCMRegistrar.getRegistrationId(this);
Activity
Context
これはGCMIntentService、onRegistered()コールバック メソッドでも配信されることに注意してください。
GCMIntentService
onRegistered()