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:

  1. Ensuring that the text is properly localized for all target languages.
  2. Keeping the content concise and informative, as it will be displayed in a notification.
  3. Using placeholders (like {DownloadPercent}) to provide dynamic information in the notification.
  4. Regularly reviewing and updating the content to ensure it remains relevant and user-friendly.
  5. 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]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:24, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:25, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:26, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:27, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:28, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:29, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:30, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:31, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:32, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:33, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:34, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:35, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:36, section: [AndroidBackgroundHTTP.DefaultTextLoc]

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:37, section: [AndroidBackgroundHTTP.DefaultTextLoc]

#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;