Tour Preview

Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

FelgoAndroidActivity

FelgoAndroidActivity integrates Felgo in a native Android application. More...

Import Statement: import Felgo 3.0
Since: Felgo 3.7.0

Methods

Detailed Description

This item is available in native Android code.

Integrating QML content in your Android application requires a custom Activity base class. Extend any Activity where you would like to show QML content from FelgoAndroidActivity:

 public class MyQmlActivity extends FelgoAndroidActivity {

   @Override
   public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.activity_main);
     // more Activity setup
   }
 }

Any other Activities that do not show QML content do not require a special base class. Inside this Activity, you can show QML content anywhere using FelgoAndroidFragment.

For more information, see Integrate Felgo with Existing Applications.

Method Documentation

void onQmlInitialized()

FelgoAndroidFragment calls this method when the QML scene has been loaded.

You can override it to perform any additional initialization logic.