DefaultNotificationText_Content
DefaultNotificationText_Content
#Overview
name: DefaultNotificationText_Content
The value of this variable can be defined or overridden in .ini config files. 15
.ini config files referencing this setting variable.
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of DefaultNotificationText_Content is to provide the default content text for notifications related to background HTTP downloads on Android devices. This setting variable is part of the notification system used in Unreal Engine’s Android background download functionality.
This setting variable is primarily used by the AndroidFetchBackgroundDownload plugin, which is part of Unreal Engine’s online subsystem for Android platforms. Specifically, it’s utilized within the FAndroidPlatformBackgroundHttpManager class, which manages background HTTP requests on Android devices.
The value of this variable is set through the InitFromIniSettings function, which reads the configuration from an INI file. The setting is stored in the “DefaultNotificationText_Content” key within a specific text configuration section.
DefaultNotificationText_Content interacts with other similar variables such as DefaultNotificationText_Title, DefaultNotificationText_Complete, and others, which together form a set of localized text options for various states of background downloads.
Developers should be aware that this variable is used to create user-facing notifications. Therefore, it’s crucial to provide appropriate and localized content that clearly communicates the status of background downloads to the end-user.
Best practices when using this variable include:
- Ensuring that the text is properly localized for all target languages.
- Keeping the content concise and informative, as it will be displayed in a notification.
- Using placeholders (like {DownloadPercent}) to provide dynamic information in the notification.
- Regularly reviewing and updating the content to ensure it remains relevant and user-friendly.
- Testing the notifications on various Android devices to ensure proper display and functionality.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:23, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("native","Download in Progress {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:24, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ar","التنزيل قيد التقدم {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:25, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("de","Download läuft {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:26, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("es","Descarga en curso {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:27, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("es-419","Descarga en curso {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:28, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("fr","Téléchargé à {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:29, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("it","Download in corso {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:30, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ja","ダウンロード進行中 {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:31, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ko","다운로드 진행 중 {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:32, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("pl","Pobieranie w toku ({DownloadPercent})")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:33, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("pt-BR","Download em Andamento {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:34, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ru","Выполняется загрузка: {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:35, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("tr","İndirme devam ediyor: {DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:36, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("zh-CN","正在下载{DownloadPercent}")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:37, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("zh-Hant","下載進度{DownloadPercent}")
- Is Array:
True
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:364
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::ActivatePendingRequests
Source code excerpt:
FFormatNamedArguments Arguments;
Arguments.Emplace(TEXT("DownloadPercent"), FText::FromString(TEXT("%02d%%")));
FText UpdatedContentText = FText::Format(AndroidBackgroundHTTPManagerDefaultLocalizedText.DefaultNotificationText_Content.GetText(), Arguments);
WorkParams.AddDataToWorkerParameters(FAndroidNativeDownloadWorkerParameterKeys::NOTIFICATION_CONTENT_TEXT_KEY, UpdatedContentText);
UE_LOG(LogBackgroundHttpManager, Display, TEXT("Attempting to schedule UEDownloadableWorker for background work. DownloadDescriptionList FileName:%s"), *FileNameForDownloadDescList);
bDidSuccessfullyScheduleWork = FUEWorkManagerNativeWrapper::ScheduleBackgroundWork(BackgroundHTTPWorkID, WorkParams);
}
else
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1036
Scope (from outer to inner):
file
function FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText
Source code excerpt:
FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText()
: DefaultNotificationText_Title()
, DefaultNotificationText_Content()
, DefaultNotificationText_Complete()
, DefaultNotificationText_Cancel()
, DefaultNotificationText_NoInternet()
, DefaultNotificationText_WaitingForCellular()
, DefaultNotificationText_Approve()
{
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1061
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings
Source code excerpt:
}
//DefaultNotificationText_Content
{
TArray<FString> ContentTextStrings;
Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_Content"), ContentTextStrings);
ParsePolyglotTextItem(DefaultNotificationText_Content, TEXT("Notification.ContentText"), ContentTextStrings);
}
//DefaultNotificationText_Complete
{
TArray<FString> CompleteTextStrings;
Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_Complete"), CompleteTextStrings);
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1108
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings
Source code excerpt:
//Even if the above ends up in parse errors we want to ensure here, but also generate a valid Polyglot text so we can bubble up the error into the notification without crashing
ForceValidPolyglotText(DefaultNotificationText_Title, TEXT("DefaultNotificationText_Title"));
ForceValidPolyglotText(DefaultNotificationText_Content, TEXT("DefaultNotificationText_Content"));
ForceValidPolyglotText(DefaultNotificationText_Complete, TEXT("DefaultNotificationText_Complete"));
ForceValidPolyglotText(DefaultNotificationText_Cancel, TEXT("DefaultNotificationText_Cancel"));
ForceValidPolyglotText(DefaultNotificationText_NoInternet, TEXT("DefaultNotificationText_NoInternet"));
ForceValidPolyglotText(DefaultNotificationText_WaitingForCellular, TEXT("DefaultNotificationText_WaitingForCellular"));
ForceValidPolyglotText(DefaultNotificationText_Approve, TEXT("DefaultNotificationText_Approve"));
}
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Public/AndroidPlatformBackgroundHttpManager.h:153
Scope (from outer to inner):
file
class class FAndroidPlatformBackgroundHttpManager : public FBackgroundHttpManagerImpl
Source code excerpt:
FPolyglotTextData DefaultNotificationText_Title;
FPolyglotTextData DefaultNotificationText_Content;
FPolyglotTextData DefaultNotificationText_Complete;
FPolyglotTextData DefaultNotificationText_Cancel;
FPolyglotTextData DefaultNotificationText_NoInternet;
FPolyglotTextData DefaultNotificationText_WaitingForCellular;
FPolyglotTextData DefaultNotificationText_Approve;