DefaultNotificationText_Cancel

DefaultNotificationText_Cancel

#Overview

name: DefaultNotificationText_Cancel

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_Cancel is to provide the default text for the cancel button or option in notifications related to background HTTP downloads on Android devices.

This setting variable is primarily used by the Android Fetch Background Download plugin, which is part of the Online subsystem for Unreal Engine. Specifically, it’s utilized within the AndroidPlatformBackgroundHttpManager class.

The value of this variable is set through the InitFromIniSettings function, which reads the configuration from an INI file. The exact location in the INI file is under the section specified by TextConfigSection, with the key “DefaultNotificationText_Cancel”.

This variable interacts with other similar notification text variables, such as DefaultNotificationText_Content, DefaultNotificationText_Complete, DefaultNotificationText_NoInternet, DefaultNotificationText_WaitingForCellular, and DefaultNotificationText_Approve. Together, these variables form a set of localized text options for various states and actions related to background downloads.

Developers should be aware that this variable is part of a localization system, stored as FPolyglotTextData. This allows for multiple language support. When using this variable, ensure that appropriate translations are provided for all supported languages in your project.

Best practices when using this variable include:

  1. Providing clear and concise text for the cancel action.
  2. Ensuring the text is properly localized for all target languages.
  3. Keeping the text consistent with the overall UI/UX design of the application.
  4. Regularly reviewing and updating the text to ensure it remains relevant and user-friendly.
  5. Testing the cancel functionality thoroughly to ensure it works as expected across different Android devices and OS versions.

#Setting Variables

#References In INI files

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:71, 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:356

Scope (from outer to inner):

file
function     void FAndroidPlatformBackgroundHttpManager::ActivatePendingRequests

Source code excerpt:

				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());

				//Expect our ContentText to have a {DownloadPercent} argument in it by default, so this will replace that with the Java string format argument so Java can insert the appropriate value
				FFormatNamedArguments Arguments;

#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1038

Scope (from outer to inner):

file
function     FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText

Source code excerpt:

	, DefaultNotificationText_Content()
	, DefaultNotificationText_Complete()
	, DefaultNotificationText_Cancel()
	, DefaultNotificationText_NoInternet()
	, DefaultNotificationText_WaitingForCellular()
	, DefaultNotificationText_Approve()
{
}

#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1075

Scope (from outer to inner):

file
function     void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings

Source code excerpt:

			}

			//DefaultNotificationText_Cancel
			{
				TArray<FString> CancelTextStrings;
				Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_Cancel"), CancelTextStrings);
				ParsePolyglotTextItem(DefaultNotificationText_Cancel, TEXT("Notification.CancelText"), CancelTextStrings);
			}

			//DefaultNotificationText_NoInternet
			{
				TArray<FString> NoInternetTextStrings;
				Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_NoInternet"), NoInternetTextStrings);

#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1110

Scope (from outer to inner):

file
function     void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings

Source code excerpt:

	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"));
}

void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::ForceValidPolyglotText(FPolyglotTextData& TextDataOut, const FString& DebugPolyglotTextName)

#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Public/AndroidPlatformBackgroundHttpManager.h:155

Scope (from outer to inner):

file
class        class FAndroidPlatformBackgroundHttpManager : public FBackgroundHttpManagerImpl

Source code excerpt:

		FPolyglotTextData DefaultNotificationText_Content;
		FPolyglotTextData DefaultNotificationText_Complete;
		FPolyglotTextData DefaultNotificationText_Cancel;
		FPolyglotTextData DefaultNotificationText_NoInternet;
		FPolyglotTextData DefaultNotificationText_WaitingForCellular;
		FPolyglotTextData DefaultNotificationText_Approve;


		void InitFromIniSettings(const FString& ConfigFileName);