diff --git a/src/main/java/eu/siacs/conversations/services/AbstractQuickConversationsService.java b/src/main/java/eu/siacs/conversations/services/AbstractQuickConversationsService.java index 5d6f8eee5..ea883683a 100644 --- a/src/main/java/eu/siacs/conversations/services/AbstractQuickConversationsService.java +++ b/src/main/java/eu/siacs/conversations/services/AbstractQuickConversationsService.java @@ -30,6 +30,10 @@ public abstract class AbstractQuickConversationsService { return "playstore".equals(BuildConfig.FLAVOR_distribution); } + public static boolean isQuicksyPlayStore() { + return isQuicksy() && isPlayStoreFlavor(); + } + public abstract void signalAccountStateChange(); public abstract boolean isSynchronizing(); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 51e4c3c66..687b0d7c1 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -519,7 +519,7 @@ Grant %1$s access to the camera Synchronize with contacts %1$s wants permission to access your address book to match it with your XMPP contact list.\nThis will display your contacts’ full names and avatars.\n\n%1$s will only read your address book and match it locally without uploading anything to your server. -
By continuing you agree to our Privacy Policy and our Terms & Conditions.

You will now be asked to grant permission to access your contacts.]]>
+
By continuing you agree to our Privacy Policy and our Terms & Conditions.

You will now be asked to grant permission to access your contacts.]]>
Notify on all messages Notify only when mentioned Notifications disabled @@ -545,7 +545,7 @@ Share URI with… Join the Conversation Have some Quick Conversations -
You sign up with your phone number and Quicksy will automatically—based on the phone numbers in your address book—suggest possible contacts to you.
Quicksy stores your contacts’ phone numbers to make suggestions about possible contacts who are already on Quicksy.
By signing up you agree to our Privacy Policy and our Terms & Conditions.]]>
+
You sign up with your phone number and Quicksy will automatically—based on the phone numbers in your address book—suggest possible contacts to you.
Quicksy uploads and processes your contact list to make suggestions about possible contacts who are already on Quicksy.
By signing up you agree to our Privacy Policy and our Terms & Conditions.]]>
Agree and continue A guide is set up for account creation on conversations.im.\nWhen picking conversations.im as a provider you will be able to communicate with users of other providers by giving them your full XMPP address. Your full XMPP address will be: %s diff --git a/src/quicksy/java/eu/siacs/conversations/ui/EnterNameActivity.java b/src/quicksy/java/eu/siacs/conversations/ui/EnterNameActivity.java index 30acdd2ed..d574f9010 100644 --- a/src/quicksy/java/eu/siacs/conversations/ui/EnterNameActivity.java +++ b/src/quicksy/java/eu/siacs/conversations/ui/EnterNameActivity.java @@ -1,20 +1,23 @@ package eu.siacs.conversations.ui; import android.content.Intent; -import androidx.databinding.DataBindingUtil; import android.os.Bundle; -import androidx.appcompat.widget.Toolbar; import android.view.View; -import java.util.concurrent.atomic.AtomicBoolean; +import androidx.appcompat.widget.Toolbar; +import androidx.databinding.DataBindingUtil; import eu.siacs.conversations.R; import eu.siacs.conversations.databinding.ActivityEnterNameBinding; import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.services.AbstractQuickConversationsService; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.utils.AccountUtils; -public class EnterNameActivity extends XmppActivity implements XmppConnectionService.OnAccountUpdate { +import java.util.concurrent.atomic.AtomicBoolean; + +public class EnterNameActivity extends XmppActivity + implements XmppConnectionService.OnAccountUpdate { private ActivityEnterNameBinding binding; @@ -28,23 +31,28 @@ public class EnterNameActivity extends XmppActivity implements XmppConnectionSer this.binding = DataBindingUtil.setContentView(this, R.layout.activity_enter_name); setSupportActionBar((Toolbar) this.binding.toolbar); this.binding.next.setOnClickListener(this::next); - this.setNick.set(savedInstanceState != null && savedInstanceState.getBoolean("set_nick",false)); + this.setNick.set( + savedInstanceState != null && savedInstanceState.getBoolean("set_nick", false)); } - private void next(View view) { - if (account != null) { - - String name = this.binding.name.getText().toString().trim(); - - account.setDisplayName(name); - - xmppConnectionService.publishDisplayName(account); - - Intent intent = new Intent(this, PublishProfilePictureActivity.class); - intent.putExtra(PublishProfilePictureActivity.EXTRA_ACCOUNT, account.getJid().asBareJid().toEscapedString()); - intent.putExtra("setup", true); - startActivity(intent); + private void next(final View view) { + if (account == null) { + return; } + final String name = this.binding.name.getText().toString().trim(); + account.setDisplayName(name); + xmppConnectionService.publishDisplayName(account); + final Intent intent; + if (AbstractQuickConversationsService.isQuicksyPlayStore()) { + intent = new Intent(getApplicationContext(), StartConversationActivity.class); + intent.putExtra("init", true); + intent.putExtra(EXTRA_ACCOUNT, account.getJid().asBareJid().toEscapedString()); + } else { + intent = new Intent(this, PublishProfilePictureActivity.class); + intent.putExtra("setup", true); + } + intent.putExtra(EXTRA_ACCOUNT, account.getJid().asBareJid().toEscapedString()); + startActivity(intent); finish(); } @@ -66,7 +74,7 @@ public class EnterNameActivity extends XmppActivity implements XmppConnectionSer } private void checkSuggestPreviousNick() { - String displayName = this.account == null ? null : this.account.getDisplayName(); + final String displayName = this.account == null ? null : this.account.getDisplayName(); if (displayName != null) { if (setNick.compareAndSet(false, true) && this.binding.name.getText().length() == 0) { this.binding.name.getText().append(displayName);