Skip to content

Commit

Permalink
Removed Appium testbed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch committed Nov 7, 2024
1 parent df32586 commit a832b48
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 52 deletions.
1 change: 0 additions & 1 deletion .github/workflows/appium-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
with:
path: qa
repository: BranchMetrics/qentelli-saas-sdk-testing-automation
ref: SDK-2465
token: ${{ secrets.BRANCHLET_ACCESS_TOKEN_PUBLIC }}
# repo's gradle is configured to run on java 17
- name: Setup java for gradle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
package io.branch.branchandroiddemo;

import static android.content.Intent.getIntent;
import static androidx.core.content.ContextCompat.startActivity;

import static java.security.AccessController.getContext;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;

import org.json.JSONObject;

import java.io.IOException;
import java.util.Objects;

import io.branch.branchandroiddemo.activities.LogDataActivity;
import io.branch.branchandroiddemo.activities.ShowQRCodeActivity;
import io.branch.indexing.BranchUniversalObject;
import io.branch.referral.Branch;
import io.branch.referral.BranchError;
import io.branch.referral.Defines;
import io.branch.referral.QRCode.BranchQRCode;
import io.branch.referral.util.BranchEvent;
import io.branch.referral.util.LinkProperties;
Expand Down Expand Up @@ -252,26 +244,4 @@ public void onFailure(Exception e) {
showLogWindow("Test Data : Null", true, ctx, Constants.CREATE_QR_CODE);
}
}

public void setAttributionLevel(Intent intent){
Common.getInstance().clearLog();
String testDataStr = intent.getStringExtra("testData");
Log.d("Branch SDK", "Intent extra 'testData:'\n" + testDataStr);
if (testDataStr != null) {

TestData testDataObj = new TestData();
String level = testDataObj.getParamValue(testDataStr,"cpp_level");

//Set the level based on the level value
try {
Defines.BranchAttributionLevel attributionLevel = Defines.BranchAttributionLevel.valueOf(level.toUpperCase());
Branch.getInstance().setConsumerProtectionAttributionLevel(attributionLevel);
} catch (IllegalArgumentException e) {
showLogWindow("Invalid cpp_level", true, ctx, Constants.SET_ATTRIBUTION_LEVEL);
}

} else {
showLogWindow( "Test Data: Null" , true, ctx,Constants.SET_ATTRIBUTION_LEVEL);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@ public interface Constants {
String CREATE_QR_CODE = "CreateQRCode";
String SET_DMA_Params = "SetDMAParams";
String INIT_SESSION = "InitSession";

String SET_ATTRIBUTION_LEVEL = "SetAttributionLevel";
String UNKNOWN = "Unknown";
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private Button btCreateDeepLink, btNativeShare, btTrackUser,
btCreateQrCode, btSetDMAParams, btLogEvent, btReadLogs, btInitSession, btSetAttributionLevel;
btCreateQrCode, btSetDMAParams, btLogEvent, btReadLogs, btInitSession;
private TextView tvMessage, tvUrl;
ToggleButton trackingCntrlBtn;

Expand All @@ -43,7 +43,6 @@ protected void initialize(){
btTrackUser = findViewById(R.id.bt_track_user);
btInitSession = findViewById(R.id.bt_init_session);
trackingCntrlBtn = findViewById(R.id.tracking_cntrl_btn);
btSetAttributionLevel = findViewById(R.id.bt_set_attribution_level);

btCreateDeepLink.setOnClickListener(this);
btNativeShare.setOnClickListener(this);
Expand All @@ -53,7 +52,6 @@ protected void initialize(){
btReadLogs.setOnClickListener(this);
btTrackUser.setOnClickListener(this);
btInitSession.setOnClickListener(this);
btSetAttributionLevel.setOnClickListener(this);
}

@Override
Expand Down Expand Up @@ -91,9 +89,7 @@ public void onClick(View view) {
branchWrapper.showLogWindow("",false, this, Constants.LOG_DATA);
} else if (view == btCreateQrCode) {
branchWrapper.getQRCode(this, getIntent(), MainActivity.this);
} else if (view == btSetAttributionLevel) {
branchWrapper.setAttributionLevel(getIntent());
}else {
} else {
branchWrapper.showLogWindow("",false, this, Constants.UNKNOWN);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,6 @@
android:text="Send Standard Event"
android:textAllCaps="false" />

<Button
android:id="@+id/bt_set_attribution_level"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_15sdp"
android:layout_marginTop="@dimen/_2sdp"
android:layout_marginEnd="@dimen/_15sdp"
android:layout_marginBottom="@dimen/_2sdp"
android:text="Set Attribution Level"
android:textAllCaps="false" />

<Button
android:id="@+id/bt_Read_Logs"
android:layout_width="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions Branch-SDK/src/main/java/io/branch/referral/Branch.java
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ public static void setCDNBaseUrl(String url) {
* the change in tracking state. This parameter can be {@code null} if no callback actions are needed.
* @deprecated Use {@link #setConsumerProtectionAttributionLevel(Defines.BranchAttributionLevel)} instead.
*/
public void disableTracking(boolean disableTracking, @Nullable TrackingStateCallback callback) {
@Deprecated public void disableTracking(boolean disableTracking, @Nullable TrackingStateCallback callback) {
trackingController.disableTracking(context_, disableTracking, callback);
}

Expand All @@ -553,7 +553,7 @@ public void disableTracking(boolean disableTracking, @Nullable TrackingStateCall
* ({@code false}).
* @deprecated Use {@link #setConsumerProtectionAttributionLevel(Defines.BranchAttributionLevel)} instead.
*/
public void disableTracking(boolean disableTracking) {
@Deprecated public void disableTracking(boolean disableTracking) {
disableTracking(disableTracking, null);
}

Expand Down

0 comments on commit a832b48

Please sign in to comment.