DefaultNotificationText_NoInternet
DefaultNotificationText_NoInternet
#Overview
name: DefaultNotificationText_NoInternet
The value of this variable can be defined or overridden in .ini config files. 13
.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_NoInternet is to provide a localized text message for notifications when there is no internet connection available during background downloads on Android devices.
This setting variable is primarily used by the Android-specific background download system in Unreal Engine 5. It is part of the AndroidFetchBackgroundDownload plugin, which is responsible for managing background HTTP requests on Android platforms.
The value of this variable is set through the InitFromIniSettings function of the FAndroidBackgroundHTTPManagerDefaultLocalizedText struct. It reads the value from a configuration file (INI file) specified by the ConfigFileName parameter.
DefaultNotificationText_NoInternet interacts with other similar variables such as DefaultNotificationText_Complete, DefaultNotificationText_Cancel, DefaultNotificationText_WaitingForCellular, and DefaultNotificationText_Approve. These variables collectively provide localized text for various states of background downloads.
Developers must be aware that this variable is used to display user-facing messages, so it’s crucial to provide appropriate and clear text for different languages supported by the application. The text should effectively communicate to the user that there is no internet connection available for the background download.
Best practices when using this variable include:
- Ensuring that the text is properly localized for all supported languages.
- Keeping the message concise and clear to fit within notification constraints.
- Regularly reviewing and updating the text to maintain consistency with the app’s overall messaging style.
- Testing the notification under various network conditions to ensure it appears correctly.
- Considering accessibility guidelines when crafting the message text.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:74, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("native","No Internet available")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:75, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ar","الإنترنت غير متوفر")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:76, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("de","Keine Internetverbindung verfügbar")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:77, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("es","No hay conexión a internet")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:78, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("es-419","No hay conexión a internet")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:79, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("fr","Internet indisponible")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:80, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("it","Internet non disponibile")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:81, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ja","インターネットが利用できません")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:82, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ko","인터넷이 없습니다")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:83, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("pl","Brak internetu")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:84, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("pt-BR","Internet indisponível")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:85, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("ru","Нет доступа в интернет")
- Is Array:
True
Location: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Config/BaseAndroidFetchBackgroundDownload.ini:86, section: [AndroidBackgroundHTTP.DefaultTextLoc]
- INI Section:
AndroidBackgroundHTTP.DefaultTextLoc
- Raw value:
("tr","İnternet bağlantısı yok")
- 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:357
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::ActivatePendingRequests
Source code excerpt:
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;
Arguments.Emplace(TEXT("DownloadPercent"), FText::FromString(TEXT("%02d%%")));
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1039
Scope (from outer to inner):
file
function FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText::FAndroidBackgroundHTTPManagerDefaultLocalizedText
Source code excerpt:
, DefaultNotificationText_Complete()
, DefaultNotificationText_Cancel()
, DefaultNotificationText_NoInternet()
, DefaultNotificationText_WaitingForCellular()
, DefaultNotificationText_Approve()
{
}
void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings(const FString& ConfigFileName)
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1082
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings
Source code excerpt:
}
//DefaultNotificationText_NoInternet
{
TArray<FString> NoInternetTextStrings;
Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_NoInternet"), NoInternetTextStrings);
ParsePolyglotTextItem(DefaultNotificationText_NoInternet, TEXT("Notification.NoInternetText"), NoInternetTextStrings);
}
//DefaultNotificationText_WaitingForCellular
{
TArray<FString> WaitingForCellularTextStrings;
Config->GetArray(*TextConfigSection, TEXT("DefaultNotificationText_WaitingForCellular"), WaitingForCellularTextStrings);
#Loc: <Workspace>/Engine/Plugins/Online/Android/AndroidFetchBackgroundDownload/Source/AndroidFetchBackgroundDownload/Private/AndroidPlatformBackgroundHttpManager.cpp:1111
Scope (from outer to inner):
file
function void FAndroidPlatformBackgroundHttpManager::FAndroidBackgroundHTTPManagerDefaultLocalizedText::InitFromIniSettings
Source code excerpt:
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:156
Scope (from outer to inner):
file
class class FAndroidPlatformBackgroundHttpManager : public FBackgroundHttpManagerImpl
Source code excerpt:
FPolyglotTextData DefaultNotificationText_Complete;
FPolyglotTextData DefaultNotificationText_Cancel;
FPolyglotTextData DefaultNotificationText_NoInternet;
FPolyglotTextData DefaultNotificationText_WaitingForCellular;
FPolyglotTextData DefaultNotificationText_Approve;
void InitFromIniSettings(const FString& ConfigFileName);