Share and rate us functions on android

Yes but UE4 API does not support that out of the box, you need to code it in java layer then hook it up to C++. Good example is Android MessageBox implmentation in UE4

Java layer:

https://github.com/EpicGames/UnrealEngine/blob/f509bb2d6c62806882d9a10476f3654cf1ee0634/Engine/Build/Android/Java/src/com/epicgames/ue4/MessageBox01.java

C++ side:

https://github.com/EpicGames/UnrealEngine/blob/f509bb2d6c62806882d9a10476f3654cf1ee0634/Engine/Source/Runtime/Core/Private/Android/AndroidJavaMessageBox.cpp
https://github.com/EpicGames/UnrealEngine/blob/f509bb2d6c62806882d9a10476f3654cf1ee0634/Engine/Source/Runtime/Core/Public/Android/AndroidJavaMessageBox.h

now to add extra code to java layer you need ■■■ it inside Build\Android\ directory of your project, there hsould be already stuff there

There also one impotent things oyu need to do, in Engine directory Engine\Build\Android\Java theres proguard-project.txt and you need to add -keep to your class on Java side, if you don’t do that Android won’t allow to access those Java function in C++ and you will get crash

If you not aware on how Android works at all, first things first you need to learn about Android intent system, which is a core function to call any actions in Android system, the program selection window is part of it as Android ask you which program to use to execute the action when it has multiple options.

here simple example of text shere intent on java with code that force open of option menu:

	Intent sendIntent = new Intent(); //create intent
	sendIntent.setAction(Intent.ACTION_SEND); //Set intent type
	sendIntent.putExtra(Intent.EXTRA_TEXT, "Put text to shere"); //Set text that gonna be shered
	sendIntent.setType("text/plain"); // We sending test so we setting MIME to text

	Intent chooserIntent = Intent.createChooser(sendIntent, "Title of selection window goes here"); //creating selection window

	chooserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //Setting shere profam as new task

	GameActivity.Get().getApplicationContext().startActivity(chooserIntent); //lauching selection activity

Remeber to add import com.epicgames.ue4.*; to java file you making

Remeber also to isolate android C++ function call with #if PLATFORM_ANDROID … #end if or else you won’t be able to make PC build of your core (which is needed for editor)