diff --git a/briar-android/res/drawable/bluetooth.png b/briar-android/res/drawable/bluetooth.png
new file mode 100644
index 000000000..b5e6ef06f
Binary files /dev/null and b/briar-android/res/drawable/bluetooth.png differ
diff --git a/briar-android/res/layout/invitation_bluetooth_start.xml b/briar-android/res/layout/invitation_bluetooth_start.xml
new file mode 100644
index 000000000..855e9d079
--- /dev/null
+++ b/briar-android/res/layout/invitation_bluetooth_start.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/briar-android/res/values/strings.xml b/briar-android/res/values/strings.xml
index 6532d77d8..0076ca171 100644
--- a/briar-android/res/values/strings.xml
+++ b/briar-android/res/values/strings.xml
@@ -36,8 +36,9 @@
Contacts
No contacts
Add a Contact
- Your nickname:
+ Please select the identity you want to use:
For security reasons you must be face-to-face with the person you want to add as a contact.\n\nThis will prevent anyone from impersonating you or reading your messages in future.
+ Contacts need to add each other at the same time. Please continue together and allow Bluetooth to be enabled for the process to work.
Continue
Your invitation code is
Please enter your contact\'s invitation code:
diff --git a/briar-android/src/org/briarproject/android/invitation/ChooseIdentityView.java b/briar-android/src/org/briarproject/android/invitation/ChooseIdentityView.java
index 5ecd1898f..fc2e4524a 100644
--- a/briar-android/src/org/briarproject/android/invitation/ChooseIdentityView.java
+++ b/briar-android/src/org/briarproject/android/invitation/ChooseIdentityView.java
@@ -21,6 +21,7 @@ import org.briarproject.api.LocalAuthor;
import android.content.Context;
import android.content.Intent;
+import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
@@ -35,7 +36,6 @@ implements OnItemSelectedListener, OnClickListener {
private LocalAuthorSpinnerAdapter adapter = null;
private Spinner spinner = null;
- private Button continueButton = null;
ChooseIdentityView(Context ctx) {
super(ctx);
@@ -45,34 +45,17 @@ implements OnItemSelectedListener, OnClickListener {
removeAllViews();
Context ctx = getContext();
- LinearLayout innerLayout = new LinearLayout(ctx);
- innerLayout.setLayoutParams(MATCH_WRAP);
- innerLayout.setOrientation(HORIZONTAL);
- innerLayout.setGravity(CENTER);
-
- TextView yourNickname = new TextView(ctx);
- yourNickname.setTextSize(18);
- yourNickname.setPadding(pad, pad, pad, pad);
- yourNickname.setText(R.string.your_nickname);
- innerLayout.addView(yourNickname);
+ LayoutInflater inflater = (LayoutInflater) ctx.getSystemService
+ (Context.LAYOUT_INFLATER_SERVICE);
+ View view = inflater.inflate(R.layout.invitation_bluetooth_start, this);
adapter = new LocalAuthorSpinnerAdapter(ctx, false);
- spinner = new Spinner(ctx);
+ spinner = (Spinner) view.findViewById(R.id.spinner);
spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(this);
- innerLayout.addView(spinner);
- addView(innerLayout);
- TextView faceToFace = new TextView(ctx);
- faceToFace.setPadding(pad, pad, pad, pad);
- faceToFace.setText(R.string.face_to_face);
- addView(faceToFace);
-
- continueButton = new Button(ctx);
- continueButton.setLayoutParams(WRAP_WRAP);
- continueButton.setText(R.string.continue_button);
+ Button continueButton = (Button) view.findViewById(R.id.continueButton);
continueButton.setOnClickListener(this);
- addView(continueButton);
container.loadLocalAuthors();
}