PreviewActivity

  • PreviewActivity is used to preview an app with a non-published container version.

  • To enable the preview function, add a specific snippet to your AndroidManifest.xml, replacing <package_name> with your app's package name.

  • PreviewActivity prepares the preview environment and then launches the main activity of your application.

  • It inherits constants from android.app.Activity, android.content.Context, and android.content.ComponentCallbacks2.

public class PreviewActivity

An Activity to preview the app with previewed container version.

To use the preview function, the app should add the following snippet into its AndroidManifest.xml: (where <package_name> needs to be replaced by your package name)

<activity android:name="com.google.tagmanager.PreviewActivity"
          android:label="@string/app_name" >
    <intent-filter>
        <data android:scheme="tagmanager.c.<package_name>" />
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE"/>
    </intent-filter>
</activity>
 

Inherited Constant Summary

Public Constructor Summary

Public Method Summary

void
onCreate(Bundle savedInstanceState)

Public Constructors

public PreviewActivity ()

Public Methods

public void onCreate (Bundle savedInstanceState)

Prepares for previewing a non-published container and then launches the launch activity for this package.