DefaultNotificationText_Title
DefaultNotificationText_Title
#Overview
name: DefaultNotificationText_Title
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_Title is to provide a localized title text for notifications in the Android background download system of Unreal Engine 5. This variable is specifically used for setting the title of notifications related to background HTTP downloads on Android devices.
This setting variable is primarily used in the AndroidFetchBackgroundDownload plugin, which is part of the Online subsystem for Android in Unreal Engine 5. It’s specifically utilized within the FAndroidPlatformBackgroundHttpManager class, which manages background HTTP requests on Android platforms.
The value of this variable is set through the InitFromIniSettings function, which reads the configuration from an INI file. The specific section it looks for is “AndroidBackgroundHTTP.DefaultTextLoc” and the key is “DefaultNotificationText_Title”.
This variable interacts with other similar variables like DefaultNotificationText_Content, DefaultNotificationText_Complete, DefaultNotificationText_Cancel, etc., which collectively provide localized text for various aspects of the background download notification system.
Developers must be aware that this variable needs to be properly configured in the INI file to ensure correct localization of notification titles. If not set correctly, the system will fall back to a default value to prevent crashes, but this may result in non-localized or incorrect text being displayed to users.
Best practices when using this variable include:
- Ensuring that the INI file is properly configured with appropriate localized strings for all supported languages.
- Testing the notification system thoroughly with different language settings to verify correct localization.
- Considering the length limitations of notification titles on Android devices and adjusting the text accordingly.
- Regularly reviewing and updating the localized text to maintain accuracy and relevance.
- Using clear and concise language that effectively communicates the purpose of the notification to the user.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:6, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("native","Downloading")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:7, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ar","جارٍ التنزيل")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:8, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("de","Lädt herunter")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:9, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("es","Descargando")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:10, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("es-419","Descargando")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:11, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("fr","Téléchargement")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:12, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("it","Download in corso")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:13, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ja","ダウンロード中")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:14, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ko","다운로드 중")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:15, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("pl","Pobieranie")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:16, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("pt-BR","Baixando")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:17, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ru","Загрузка")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:18, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("tr","İndiriliyor")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:19, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("zh-CN","下载中")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:20, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("zh-Hant","下載中")
- 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:354
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::ActivatePendingRequests
Source code excerpt:
//Make sure we pass in localized notification text bits for the important worker keys
WorkParams.AddDataToWorkerParameters(FAndroidNativeDownloadWorkerParameterKeys::NOTIFICATION_CONTENT_TITLE_KEY, AndroidBackgroundHTTPManagerDefaultLocalizedText.DefaultNotificationText_Title.GetText());
WorkParams.AddDataToWorkerParameters(FAndroidNativeDownloadWorkerParameterKeys::NOTIFICATION_CONTENT_COMPLETE_TEXT_KEY, AndroidBackgroundHTTPManagerDefaultLocalizedText.DefaultNotificationText_Complete.GetText());
WorkParams.AddDataToWorkerParameters(FAndroidNativeDownloadWorkerParameterKeys::NOTIFICATION_CONTENT_CANCEL_DOWNLOAD_TEXT_KEY, AndroidBackgroundHTTPManagerDefaultLocalizedText.DefaultNotificationText_Cancel.GetText());
WorkParams.AddDataToWorkerParameters(FAndroidNativeDownloadWorkerParameterKeys::NOTIFICATION_CONTENT_NO_INTERNET_TEXT_KEY, AndroidBackgroundHTTPManagerDefaultLocalizedText.DefaultNotificationText_NoInternet.GetText());
WorkParams.AddDataToWorkerParameters(FAndroidNativeDownloadWorkerParameterKeys::NOTIFICATION_CONTENT_WAITING_FOR_CELLULAR_TEXT_KEY, AndroidBackgroundHTTPManagerDefaultLocalizedText.DefaultNotificationText_WaitingForCellular.GetText());
WorkParams.AddDataToWorkerParameters(FAndroidNativeDownloadWorkerParameterKeys::NOTIFICATION_CONTENT_APPROVE_TEXT_KEY, AndroidBackgroundHTTPManagerDefaultLocalizedText.DefaultNotificationText_Approve.GetText());
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1035
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:1054
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings
Source code excerpt:
const FString TextConfigSection = TEXT("AndroidBackgroundHTTP.DefaultTextLoc");
//DefaultNotificationText_Title
{
TArray<FString> TitleTextStrings;
Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_Title"), TitleTextStrings);
ParsePolyglotTextItem(DefaultNotificationText_Title, TEXT("Notification.Title"),TitleTextStrings);
}
//DefaultNotificationText_Content
{
TArray<FString> ContentTextStrings;
Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_Content"), ContentTextStrings);
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1107
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:152
Scope (from outer to inner):
file
class class FAndroidPlatformBackgroundHttpManager : public FBackgroundHttpManagerImpl
Source code excerpt:
FAndroidBackgroundHTTPManagerDefaultLocalizedText();
FPolyglotTextData DefaultNotificationText_Title;
FPolyglotTextData DefaultNotificationText_Content;
FPolyglotTextData DefaultNotificationText_Complete;
FPolyglotTextData DefaultNotificationText_Cancel;
FPolyglotTextData DefaultNotificationText_NoInternet;
FPolyglotTextData DefaultNotificationText_WaitingForCellular;
FPolyglotTextData DefaultNotificationText_Approve;