fixed app store link retrieval
This commit is contained in:
parent
951f017e7c
commit
9ae3bd167a
@ -173,7 +173,7 @@ public class MobileApplicationController extends BaseController {
|
|||||||
MobileAppSettings mobileAppSettings = mobileAppSettingsService.getMobileAppSettings(TenantId.SYS_TENANT_ID);
|
MobileAppSettings mobileAppSettings = mobileAppSettingsService.getMobileAppSettings(TenantId.SYS_TENANT_ID);
|
||||||
boolean useDefaultApp = mobileAppSettings.isUseDefaultApp();
|
boolean useDefaultApp = mobileAppSettings.isUseDefaultApp();
|
||||||
String googlePlayLink = useDefaultApp ? mobileAppSettings.getDefaultGooglePlayLink() : mobileAppSettings.getAndroidConfig().getStoreLink();
|
String googlePlayLink = useDefaultApp ? mobileAppSettings.getDefaultGooglePlayLink() : mobileAppSettings.getAndroidConfig().getStoreLink();
|
||||||
String appStoreLink = useDefaultApp ? mobileAppSettings.getDefaultGooglePlayLink() : mobileAppSettings.getIosConfig().getStoreLink();
|
String appStoreLink = useDefaultApp ? mobileAppSettings.getDefaultAppStoreLink() : mobileAppSettings.getIosConfig().getStoreLink();
|
||||||
if (userAgent.contains("Android")) {
|
if (userAgent.contains("Android")) {
|
||||||
return ResponseEntity.status(HttpStatus.FOUND)
|
return ResponseEntity.status(HttpStatus.FOUND)
|
||||||
.header("Location", googlePlayLink)
|
.header("Location", googlePlayLink)
|
||||||
|
|||||||
@ -1797,9 +1797,9 @@ management:
|
|||||||
|
|
||||||
# Mobile application settings for Thingsboard mobile application
|
# Mobile application settings for Thingsboard mobile application
|
||||||
mobileApp:
|
mobileApp:
|
||||||
# Host for default Thingsboard mobile application for common edition
|
# Server domain name for Thingsboard Live mobile application
|
||||||
domain: "${TB_MOBILE_APP_DOMAIN:demo.thingsboard.io}"
|
domain: "${TB_MOBILE_APP_DOMAIN:demo.thingsboard.io}"
|
||||||
# Link to Google Play store for default Thingsboard mobile application
|
# Link to Google Play store for Thingsboard Live mobile application
|
||||||
googlePlayLink: "${TB_MOBILE_APP_GOOGLE_PLAY_LINK:https://play.google.com/store/apps/details?id=org.thingsboard.demo.app}"
|
googlePlayLink: "${TB_MOBILE_APP_GOOGLE_PLAY_LINK:https://play.google.com/store/apps/details?id=org.thingsboard.demo.app}"
|
||||||
# Link to App Store for default Thingsboard mobile application
|
# Link to App Store for Thingsboard Live mobile application
|
||||||
appStoreLink: "${TB_MOBILE_APP_APP_STORE_LINK:https://apps.apple.com/us/app/thingsboard-live/id1594355695}"
|
appStoreLink: "${TB_MOBILE_APP_APP_STORE_LINK:https://apps.apple.com/us/app/thingsboard-live/id1594355695}"
|
||||||
|
|||||||
@ -43,7 +43,7 @@ public class BaseMobileAppSettingsService extends AbstractCachedEntityService<Te
|
|||||||
|
|
||||||
@Value("${mobileApp.googlePlayLink:https://play.google.com/store/apps/details?id=org.thingsboard.demo.app}")
|
@Value("${mobileApp.googlePlayLink:https://play.google.com/store/apps/details?id=org.thingsboard.demo.app}")
|
||||||
private String googlePlayLink;
|
private String googlePlayLink;
|
||||||
@Value("${mobileApp.appStoreLink:https://play.google.com/store/apps/details?id=org.thingsboard.demo.app}")
|
@Value("${mobileApp.appStoreLink:https://apps.apple.com/us/app/thingsboard-live/id1594355695}")
|
||||||
private String appStoreLink;
|
private String appStoreLink;
|
||||||
|
|
||||||
private final MobileAppSettingsDao mobileAppSettingsDao;
|
private final MobileAppSettingsDao mobileAppSettingsDao;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user