The answer varies by client platform:
- Android: The SDK persists device tokens in both your app's
SharedPreferences(which are cleared when your app is uninstalled) and in the device's
/sdcard/Android/data/me.pushy.sdkfolder in the external storage (which is persisted between app reinstalls) depending on whether your app has been granted the
- iOS: The SDK persists device tokens in both your app's
UserDefaults(which are cleared when your app is uninstalled) and in the iOS
Keychain(which is persisted between app reinstalls).
- Web Push: The SDK persists device tokens in the
HTML5 Local Storage(which can be cleared by the user manually).
- Electron: The SDK persists device tokens on local disk, in a directory which varies by platform:
~/.configon Linux, and
~/Library/Application Supporton macOS.
The next time your app is reinstalled on the same device, or if the same device visits your website, our SDK will attempt to determine its previous device token, instead of generating a new one and charging you twice for the same device.