Skip to content

Commit

Permalink
Merged the Deep Linking Validator and the Integration Validator.
Browse files Browse the repository at this point in the history
Merged the Deep Linking Validator and the Integration Validator.
  • Loading branch information
rob-gioia-branch committed Nov 15, 2024
1 parent e7902da commit b96c9f3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
import io.branch.referral.util.LinkProperties;
import io.branch.referral.util.ProductCategory;
import io.branch.referral.util.ShareSheetStyle;
import io.branch.referral.validators.LinkingValidator;
import io.branch.referral.validators.IntegrationValidator;

public class MainActivity extends Activity {
private EditText txtShortUrl;
Expand Down Expand Up @@ -439,7 +439,7 @@ public void onClick(View view) {
.setContentIntent(pendingIntent)
.setAutoCancel(true);
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(MainActivity.this);
notificationManager.notify(1, builder.build());
//notificationManager.notify(1, builder.build());
Log.d("BranchSDK_Tester", "Sent notification");
}
});
Expand Down Expand Up @@ -661,8 +661,7 @@ protected void onStart() {
// Please look for "BranchSDK_Doctor" in the logcat to see the results.
// IMP : Do not make this call in your production app

//IntegrationValidator.validate(MainActivity.this);
LinkingValidator.validate(MainActivity.this);
IntegrationValidator.validate(MainActivity.this);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class IntegrationValidatorDialog extends Dialog {
IntegrationValidatorDialogRowItem test8RowItem;

Button exportLogsButton;
Button testDeepLinkingButton;

public IntegrationValidatorDialog(final Context context) {
super(context);
Expand All @@ -40,10 +41,15 @@ public IntegrationValidatorDialog(final Context context) {
test8RowItem = findViewById(R.id.test_8_alternate_domain_intent_filters);

exportLogsButton = findViewById(R.id.export_logs_button);
testDeepLinkingButton = findViewById(R.id.test_deep_linking_button);

exportLogsButton.setOnClickListener(view -> {
shareLogsAsText(context);
});

testDeepLinkingButton.setOnClickListener(view -> {
LinkingValidator.validate(context);
});
}

public void setTestResult(int testNumber, String name, boolean didTestPass, String detailsMessage, String moreInfoLink) {
Expand Down
29 changes: 26 additions & 3 deletions Branch-SDK/src/main/res/layout/dialog_integration_validator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,39 @@

</io.branch.referral.validators.IntegrationValidatorDialogRowItem>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="0.1">

<Button
android:id="@+id/export_logs_button"
android:layout_width="150dp"
android:layout_height="0dp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:backgroundTint="#2A97FF"
android:text="Export Logs"
android:textColor="#FFFFFF"
android:layout_weight="0.1"/>
android:layout_weight="0.5"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp" />

<Button
android:id="@+id/test_deep_linking_button"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:backgroundTint="#2A97FF"
android:text="Test Deep Linking"
android:textColor="#FFFFFF"
android:layout_weight="0.5"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp" />

</LinearLayout>

</LinearLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_gravity="end"
android:layout_weight="0.4"/>
android:layout_weight="0.4"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp" />
</LinearLayout>

0 comments on commit b96c9f3

Please sign in to comment.