Commit 6dd6fd17 by Kunj Gupta

Added App info detail in debug and staging build type.

parent cfe3cf4f
...@@ -11,6 +11,8 @@ import android.view.View; ...@@ -11,6 +11,8 @@ import android.view.View;
import android.widget.GridView; import android.widget.GridView;
import com.google.android.gms.analytics.Tracker; import com.google.android.gms.analytics.Tracker;
import com.vsoft.servicenow.AppConfig;
import com.vsoft.servicenow.BuildConfig;
import com.vsoft.servicenow.CatalogueApplication; import com.vsoft.servicenow.CatalogueApplication;
import com.vsoft.servicenow.MenuProvider; import com.vsoft.servicenow.MenuProvider;
import com.vsoft.servicenow.R; import com.vsoft.servicenow.R;
...@@ -24,6 +26,8 @@ import com.vsoft.servicenow.db.managers.CatalogueManager; ...@@ -24,6 +26,8 @@ import com.vsoft.servicenow.db.managers.CatalogueManager;
import com.vsoft.servicenow.db.models.Catalogue; import com.vsoft.servicenow.db.models.Catalogue;
import com.vsoft.servicenow.enums.SyncStatus; import com.vsoft.servicenow.enums.SyncStatus;
import com.vsoft.servicenow.menu.HomeScreenMenuItemData; import com.vsoft.servicenow.menu.HomeScreenMenuItemData;
import com.vsoft.servicenow.utils.CatalogueLog;
import com.vsoft.servicenow.utils.Constants;
import com.vsoft.servicenow.utils.PrefManager; import com.vsoft.servicenow.utils.PrefManager;
import com.vsoft.servicenow.utils.Util; import com.vsoft.servicenow.utils.Util;
...@@ -68,6 +72,38 @@ public class HomeScreen extends HandleNotificationActivity { ...@@ -68,6 +72,38 @@ public class HomeScreen extends HandleNotificationActivity {
startActivity(intent); startActivity(intent);
} }
@OnClick(R.id.nav_back)
void homeIconClicked() {
if(BuildConfig.BUILD_TYPE_INT != 2) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("ServiceNow Instance: ");
stringBuilder.append(Constants.DOMAIN);
stringBuilder.append("\n");
stringBuilder.append("Socket URL: ");
stringBuilder.append(Constants.CHAT_SERVER_URL);
stringBuilder.append("\n");
stringBuilder.append("Build Version: ");
stringBuilder.append(BuildConfig.VERSION_NAME);
stringBuilder.append("\n");
stringBuilder.append("Flavor: ");
stringBuilder.append(BuildConfig.FLAVOR);
stringBuilder.append("\n");
stringBuilder.append("Build Type: ");
stringBuilder.append(BuildConfig.BUILD_TYPE);
builder.setMessage(stringBuilder.toString())
.setTitle("App Info")
.setCancelable(false)
.setPositiveButton(R.string.ok_string, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
AlertDialog alert = builder.create();
alert.show();
}
}
@OnClick(R.id.home_screen_logout_image_view) @OnClick(R.id.home_screen_logout_image_view)
void logoutOnClicked() { void logoutOnClicked() {
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment