Panagiotis Triantafyllou

fixs

......@@ -19,10 +19,10 @@
android:fullBackupContent="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:installLocation="internalOnly"
android:label="@string/app_name"
android:largeHeap="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme">
<activity
......@@ -38,12 +38,10 @@
</activity>
<activity
android:name="warp.ly.android_sdk.activities.MainActivity"
android:name="ly.warp.sdk.activities.BaseFragmentActivity"
android:exported="false"
android:label="@string/title_activity_main"
android:screenOrientation="portrait" />
</application>
<!-- For Huawei Push, only if we targetSdkVersion 30, comment if we are in Google build -->
......
package warp.ly.android_sdk.activities;
import android.os.Bundle;
import android.view.MenuItem;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.navigation.NavigationBarView;
import ly.warp.sdk.fragments.HomeFragment;
import ly.warp.sdk.fragments.LoyaltyFragment;
import warp.ly.android_sdk.R;
public class MainActivity extends BaseActivity implements NavigationBarView.OnItemSelectedListener {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
private BottomNavigationView mBottomNavigationView;
Fragment mFragmentToSet = null;
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mBottomNavigationView = findViewById(R.id.bt_tabs);
initViews();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_loyalty:
mFragmentToSet = LoyaltyFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.replace(R.id.fl_fragment, mFragmentToSet)
.addToBackStack(null)
.commit();
return true;
case R.id.menu_home:
mFragmentToSet = HomeFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.replace(R.id.fl_fragment, mFragmentToSet)
.addToBackStack(null)
.commit();
return true;
}
return false;
}
// ===========================================================
// Methods
// ===========================================================
private void initViews() {
mBottomNavigationView.setOnItemSelectedListener(this);
mFragmentToSet = HomeFragment.newInstance();
getSupportFragmentManager().beginTransaction().add(R.id.fl_fragment, mFragmentToSet).commit();
mBottomNavigationView.setSelectedItemId(R.id.menu_home);
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
......@@ -9,6 +9,7 @@ import java.util.Timer;
import java.util.TimerTask;
import ly.warp.sdk.Warply;
import ly.warp.sdk.activities.BaseFragmentActivity;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver;
import ly.warp.sdk.io.callbacks.WarplyReadyCallback;
......@@ -76,7 +77,7 @@ public class SplashActivity extends BaseActivity {
runOnUiThread(new Runnable() {
public void run() {
if (!isFinishing()) {
startActivity(new Intent(SplashActivity.this, MainActivity.class));
startActivity(new Intent(SplashActivity.this, BaseFragmentActivity.class));
finish();
}
}
......
package ly.warp.sdk.fragments;
package ly.warp.sdk.activities;
import android.os.Bundle;
import android.view.MenuItem;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.navigation.NavigationBarView;
import java.util.HashMap;
import ly.warp.sdk.R;
import ly.warp.sdk.Warply;
import ly.warp.sdk.fragments.HomeFragment;
import ly.warp.sdk.fragments.LoyaltyFragment;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
......@@ -16,15 +25,35 @@ import ly.warp.sdk.io.request.WarplyConsumerRequest;
import ly.warp.sdk.io.request.WarplyInboxRequest;
import ly.warp.sdk.io.request.WarplyUserCouponsRequest;
import ly.warp.sdk.utils.managers.WarplyManager;
import ly.warp.sdk.utils.managers.WarplySessionManager;
public class BaseFragmentActivity extends FragmentActivity implements NavigationBarView.OnItemSelectedListener {
// ===========================================================
// Constants
// ===========================================================
public class BaseFragment extends Fragment {
// ===========================================================
// Fields
// ===========================================================
private BottomNavigationView mBottomNavigationView;
private Fragment mFragmentToSet = null;
private static Consumer mConsumer;
private static HashMap mUniqueCampaignList = new HashMap<String, CampaignList>();
private static CouponList mCouponList;
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WarplySessionManager.onCreateActivity(this);
setContentView(R.layout.activity_base_fragment);
mBottomNavigationView = findViewById(R.id.bt_tabs);
new Thread(() -> {
if (!Thread.currentThread().isInterrupted()) {
......@@ -43,14 +72,52 @@ public class BaseFragment extends Fragment {
WarplyManager.getUserCoupons(new WarplyUserCouponsRequest(), mUserCouponsReceiver);
}
}).start();
initViews();
}
@Override
protected void onStart() {
super.onStart();
WarplySessionManager.onStartActivity(this);
}
@Override
protected void onStop() {
super.onStop();
WarplySessionManager.onStopActivity(this);
}
@Override
protected void onResume() {
super.onResume();
}
@Override
public void onDestroyView() {
super.onDestroyView();
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
int itemId = item.getItemId();
if (itemId == R.id.menu_loyalty) {
mFragmentToSet = LoyaltyFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.replace(R.id.fl_fragment, mFragmentToSet)
.addToBackStack(null)
.commit();
return true;
} else if (itemId == R.id.menu_home) {
mFragmentToSet = HomeFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.replace(R.id.fl_fragment, mFragmentToSet)
.addToBackStack(null)
.commit();
return true;
}
return false;
}
// ===========================================================
// Methods
// ===========================================================
public static Consumer getConsumer() {
return mConsumer;
}
......@@ -63,6 +130,17 @@ public class BaseFragment extends Fragment {
return mCouponList;
}
private void initViews() {
mBottomNavigationView.setOnItemSelectedListener(this);
mFragmentToSet = HomeFragment.newInstance();
getSupportFragmentManager().beginTransaction().add(R.id.fl_fragment, mFragmentToSet).commit();
mBottomNavigationView.setSelectedItemId(R.id.menu_home);
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
private final CallbackReceiver<Consumer> mConsumerReceiver = new CallbackReceiver<Consumer>() {
@Override
public void onSuccess(Consumer result) {
......@@ -115,4 +193,4 @@ public class BaseFragment extends Fragment {
}
};
}
\ No newline at end of file
}
......
......@@ -16,7 +16,6 @@ import android.widget.TextView;
import ly.warp.sdk.R;
import ly.warp.sdk.db.WarplyDBHelper;
import ly.warp.sdk.fragments.BaseFragment;
import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.WarplyProperty;
......@@ -96,22 +95,22 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene
mTvLuckyDraw.setText(builder, TextView.BufferType.SPANNABLE);
mClLuckyDraw.setOnClickListener(view -> {
if (BaseFragment.getUniqueCampaignList() != null && !BaseFragment.getUniqueCampaignList().isEmpty()) {
if (BaseFragment.getUniqueCampaignList().containsKey("lucky_draw") && BaseFragment.getUniqueCampaignList().get("lucky_draw").size() > 0) {
String tempUrl = BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
if (BaseFragmentActivity.getUniqueCampaignList() != null && !BaseFragmentActivity.getUniqueCampaignList().isEmpty()) {
if (BaseFragmentActivity.getUniqueCampaignList().containsKey("lucky_draw") && BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").size() > 0) {
String tempUrl = BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
tempUrl = tempUrl
+ "?web_id=" + WarpUtils.getWebId(this)
+ "&app_uuid=" + WarplyProperty.getAppUuid(this)
+ "&api_key=" + WarpUtils.getApiKey(this)
+ "&session_uuid=" + BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&session_uuid=" + BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&access_token=" + WarplyDBHelper.getInstance(this).getAuthValue("access_token")
+ "&refresh_token=" + WarplyDBHelper.getInstance(this).getAuthValue("refresh_token")
+ "&client_id=" + WarplyDBHelper.getInstance(this).getClientValue("client_id")
+ "&client_secret=" + WarplyDBHelper.getInstance(this).getClientValue("client_secret");
if (BaseFragment.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragment.getConsumer().getUuid());
if (BaseFragmentActivity.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragmentActivity.getConsumer().getUuid());
else
tempUrl = tempUrl + "&auth_token=";
......
......@@ -16,7 +16,6 @@ import androidx.recyclerview.widget.RecyclerView;
import java.io.Serializable;
import ly.warp.sdk.R;
import ly.warp.sdk.fragments.BaseFragment;
import ly.warp.sdk.views.adapters.HomeCouponAdapter;
......@@ -90,15 +89,15 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
// ===========================================================
private void initViews() {
if (BaseFragment.getConsumer() != null)
if (BaseFragmentActivity.getConsumer() != null)
mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
BaseFragment.getConsumer().getFirstName(), BaseFragment.getConsumer().getLastName()));
BaseFragmentActivity.getConsumer().getFirstName(), BaseFragmentActivity.getConsumer().getLastName()));
mIvBack.setOnClickListener(this);
mTvAnalysisButton.setOnClickListener(this);
mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
mAdapterCoupons = new HomeCouponAdapter(this, BaseFragment.getCouponList());
mAdapterCoupons = new HomeCouponAdapter(this, BaseFragmentActivity.getCouponList());
mRecyclerCoupons.setAdapter(mAdapterCoupons);
mAdapterCoupons.getPositionClicks()
.doOnNext(coupon -> {
......@@ -111,7 +110,7 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
.subscribe();
mRecyclerBurntCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
mAdapterBurntCoupons = new HomeCouponAdapter(this, BaseFragment.getCouponList(), true);
mAdapterBurntCoupons = new HomeCouponAdapter(this, BaseFragmentActivity.getCouponList(), true);
mRecyclerBurntCoupons.setAdapter(mAdapterBurntCoupons);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
......
......@@ -20,6 +20,7 @@ import org.json.JSONException;
import java.io.Serializable;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.BaseFragmentActivity;
import ly.warp.sdk.activities.BillPaymentActivity;
import ly.warp.sdk.activities.CouponInfoActivity;
import ly.warp.sdk.activities.WarpViewActivity;
......@@ -31,7 +32,7 @@ import ly.warp.sdk.utils.WarplyProperty;
import ly.warp.sdk.views.adapters.HomeCampaignAdapter;
import ly.warp.sdk.views.adapters.HomeCouponAdapter;
public class HomeFragment extends BaseFragment implements View.OnClickListener {
public class HomeFragment extends Fragment implements View.OnClickListener {
private RelativeLayout mOptionOne, mOptionTwo, mOptionThree;
private RecyclerView mRecyclerCampaigns, mRecyclerCoupons;
......@@ -41,10 +42,7 @@ public class HomeFragment extends BaseFragment implements View.OnClickListener {
private TextView mTvUsername;
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState
) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_home, container, false);
}
......@@ -73,30 +71,30 @@ public class HomeFragment extends BaseFragment implements View.OnClickListener {
mLlBillPayment.setOnClickListener(this);
mTvUsername = view.findViewById(R.id.welcome_user_txt);
if (BaseFragment.getConsumer() != null)
if (BaseFragmentActivity.getConsumer() != null)
mTvUsername.setText(String.format(getResources().getString(R.string.welcome_user),
BaseFragment.getConsumer().getFirstName() + " " + BaseFragment.getConsumer().getLastName()));
BaseFragmentActivity.getConsumer().getFirstName() + " " + BaseFragmentActivity.getConsumer().getLastName()));
mRecyclerCampaigns = view.findViewById(R.id.rv_home_campaigns);
mRecyclerCampaigns.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
mAdapterCampaigns = new HomeCampaignAdapter(getContext(), BaseFragment.getUniqueCampaignList().get("homescreen"));
mAdapterCampaigns = new HomeCampaignAdapter(getContext(), BaseFragmentActivity.getUniqueCampaignList().get("homescreen"));
mRecyclerCampaigns.setAdapter(mAdapterCampaigns);
mAdapterCampaigns.getPositionClicks()
.doOnNext(campaign -> {
String tempUrl = BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
String tempUrl = BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
tempUrl = tempUrl
+ "?web_id=" + WarpUtils.getWebId(getContext())
+ "&app_uuid=" + WarplyProperty.getAppUuid(getContext())
+ "&api_key=" + WarpUtils.getApiKey(getContext())
+ "&session_uuid=" + BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&session_uuid=" + BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&access_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("access_token")
+ "&refresh_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("refresh_token")
+ "&client_id=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_id")
+ "&client_secret=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_secret");
if (BaseFragment.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragment.getConsumer().getUuid());
if (BaseFragmentActivity.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragmentActivity.getConsumer().getUuid());
else
tempUrl = tempUrl + "&auth_token=";
......@@ -108,7 +106,7 @@ public class HomeFragment extends BaseFragment implements View.OnClickListener {
mRecyclerCoupons = view.findViewById(R.id.rv_home_coupons);
mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
mAdapterCoupons = new HomeCouponAdapter(getContext(), BaseFragment.getCouponList());
mAdapterCoupons = new HomeCouponAdapter(getContext(), BaseFragmentActivity.getCouponList());
mRecyclerCoupons.setAdapter(mAdapterCoupons);
mAdapterCoupons.getPositionClicks()
.doOnNext(coupon -> {
......
......@@ -15,6 +15,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.BaseFragmentActivity;
import ly.warp.sdk.activities.LoyaltyActivity;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.db.WarplyDBHelper;
......@@ -22,7 +23,7 @@ import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.WarplyProperty;
import ly.warp.sdk.views.adapters.ProfileCampaignAdapter;
public class LoyaltyFragment extends BaseFragment implements View.OnClickListener {
public class LoyaltyFragment extends Fragment implements View.OnClickListener {
// ===========================================================
// Constants
......@@ -55,9 +56,9 @@ public class LoyaltyFragment extends BaseFragment implements View.OnClickListene
mClRewardsWallet.setOnClickListener(this);
mTvUsername = view.findViewById(R.id.tv_name);
if (BaseFragment.getConsumer() != null)
if (BaseFragmentActivity.getConsumer() != null)
mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_name),
BaseFragment.getConsumer().getFirstName() + " " + BaseFragment.getConsumer().getLastName()));
BaseFragmentActivity.getConsumer().getFirstName() + " " + BaseFragmentActivity.getConsumer().getLastName()));
mLlMoreDeals = view.findViewById(R.id.ll_more);
mLlMoreDeals.setOnClickListener(this);
......@@ -68,24 +69,24 @@ public class LoyaltyFragment extends BaseFragment implements View.OnClickListene
mRecyclerDeals = view.findViewById(R.id.rv_deals);
mRecyclerDeals.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
mAdapterDeals = new ProfileCampaignAdapter(getContext(), BaseFragment.getUniqueCampaignList().get("deals"));
mAdapterDeals = new ProfileCampaignAdapter(getContext(), BaseFragmentActivity.getUniqueCampaignList().get("deals"));
mRecyclerDeals.setAdapter(mAdapterDeals);
mAdapterDeals.getPositionClicks()
.doOnNext(deal -> {
String tempUrl = BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
String tempUrl = BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
tempUrl = tempUrl
+ "?web_id=" + WarpUtils.getWebId(getContext())
+ "&app_uuid=" + WarplyProperty.getAppUuid(getContext())
+ "&api_key=" + WarpUtils.getApiKey(getContext())
+ "&session_uuid=" + BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&session_uuid=" + BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&access_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("access_token")
+ "&refresh_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("refresh_token")
+ "&client_id=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_id")
+ "&client_secret=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_secret");
if (BaseFragment.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragment.getConsumer().getUuid());
if (BaseFragmentActivity.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragmentActivity.getConsumer().getUuid());
else
tempUrl = tempUrl + "&auth_token=";
......@@ -97,24 +98,24 @@ public class LoyaltyFragment extends BaseFragment implements View.OnClickListene
mRecyclerGifts = view.findViewById(R.id.rv_gifts);
mRecyclerGifts.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
mAdapterGifts = new ProfileCampaignAdapter(getContext(), BaseFragment.getUniqueCampaignList().get("gifts"));
mAdapterGifts = new ProfileCampaignAdapter(getContext(), BaseFragmentActivity.getUniqueCampaignList().get("gifts"));
mRecyclerGifts.setAdapter(mAdapterGifts);
mAdapterGifts.getPositionClicks()
.doOnNext(gift -> {
String tempUrl = BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
String tempUrl = BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
tempUrl = tempUrl
+ "?web_id=" + WarpUtils.getWebId(getContext())
+ "&app_uuid=" + WarplyProperty.getAppUuid(getContext())
+ "&api_key=" + WarpUtils.getApiKey(getContext())
+ "&session_uuid=" + BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&session_uuid=" + BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&access_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("access_token")
+ "&refresh_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("refresh_token")
+ "&client_id=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_id")
+ "&client_secret=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_secret");
if (BaseFragment.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragment.getConsumer().getUuid());
if (BaseFragmentActivity.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragmentActivity.getConsumer().getUuid());
else
tempUrl = tempUrl + "&auth_token=";
......@@ -126,24 +127,24 @@ public class LoyaltyFragment extends BaseFragment implements View.OnClickListene
mRecyclerMore = view.findViewById(R.id.rv_more);
mRecyclerMore.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
mAdapterMore = new ProfileCampaignAdapter(getContext(), BaseFragment.getUniqueCampaignList().get("more"));
mAdapterMore = new ProfileCampaignAdapter(getContext(), BaseFragmentActivity.getUniqueCampaignList().get("more"));
mRecyclerMore.setAdapter(mAdapterMore);
mAdapterMore.getPositionClicks()
.doOnNext(more -> {
String tempUrl = BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
String tempUrl = BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getIndexUrl();
tempUrl = tempUrl
+ "?web_id=" + WarpUtils.getWebId(getContext())
+ "&app_uuid=" + WarplyProperty.getAppUuid(getContext())
+ "&api_key=" + WarpUtils.getApiKey(getContext())
+ "&session_uuid=" + BaseFragment.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&session_uuid=" + BaseFragmentActivity.getUniqueCampaignList().get("lucky_draw").get(0).getSessionUUID()
+ "&access_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("access_token")
+ "&refresh_token=" + WarplyDBHelper.getInstance(getContext()).getAuthValue("refresh_token")
+ "&client_id=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_id")
+ "&client_secret=" + WarplyDBHelper.getInstance(getContext()).getClientValue("client_secret");
if (BaseFragment.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragment.getConsumer().getUuid());
if (BaseFragmentActivity.getConsumer() != null)
tempUrl = tempUrl + "&auth_token=" + (BaseFragmentActivity.getConsumer().getUuid());
else
tempUrl = tempUrl + "&auth_token=";
......