If the appId is set on an instance of QML PushClient, and U1 account has not yet been configured, it should be possible for the app to re-set the appId after it takes focus again - after the user has configured Ubuntu One account.
For instance, currently Telegram (if still unregistered during this session*) sets the appId to a random hardcoded string, and then re-sets it with a proper app name just to force through the "same value" check in PushClient, which in turn requests a token for that PushClient instance, at which point we can register for push with Telegram.
* it is suggested to register for push ~daily, we register on app start
If the appId is set on an instance of QML PushClient, and U1 account has not yet been configured, it should be possible for the app to re-set the appId after it takes focus again - after the user has configured Ubuntu One account.
For instance, currently Telegram (if still unregistered during this session*) sets the appId to a random hardcoded string, and then re-sets it with a proper app name just to force through the "same value" check in PushClient, which in turn requests a token for that PushClient instance, at which point we can register for push with Telegram.
* it is suggested to register for push ~daily, we register on app start