public class

HelperActivity

extends Activity
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ com.urbanairship.util.HelperActivity

Class Overview

An activity that is used by the Action framework to enable starting other activities for results. Ordinarily this class should not be instantiated directly. Instead, see startActivityForResult(android.content.Context, android.content.Intent).

Summary

Nested Classes
class HelperActivity.ActivityResult Wraps the result code and data from starting an activity for a result. 
Constants
String PERMISSIONS_EXTRA Intent extra holding the permissions.
String RESULT_INTENT_EXTRA Intent extra holding activity result intent.
String RESULT_RECEIVER_EXTRA Intent extra holding an activity result receiver.
String START_ACTIVITY_INTENT_EXTRA Intent extra holding the intent for an activity to be started.
[Expand]
Inherited Constants
From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2
[Expand]
Inherited Fields
From class android.app.Activity
Public Constructors
HelperActivity()
Public Methods
final void onCreate(Bundle savedInstanceState)
void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
static int[] requestPermissions(Context context, String... permissions)
Requests permissions.
static HelperActivity.ActivityResult startActivityForResult(Context context, Intent intent)
Starts an activity for a result.
Protected Methods
void onActivityResult(int requestCode, int resultCode, Intent data)
[Expand]
Inherited Methods
From class android.app.Activity
From class android.view.ContextThemeWrapper
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface android.view.KeyEvent.Callback
From interface android.view.LayoutInflater.Factory
From interface android.view.LayoutInflater.Factory2
From interface android.view.View.OnCreateContextMenuListener
From interface android.view.Window.Callback

Constants

public static final String PERMISSIONS_EXTRA

Intent extra holding the permissions.

Constant Value: "com.urbanairship.util.helperactivity.PERMISSIONS_EXTRA"

public static final String RESULT_INTENT_EXTRA

Intent extra holding activity result intent.

Constant Value: "com.urbanairship.util.helperactivity.RESULT_INTENT_EXTRA"

public static final String RESULT_RECEIVER_EXTRA

Intent extra holding an activity result receiver.

Constant Value: "com.urbanairship.util.helperactivity.RESULT_RECEIVER_EXTRA"

public static final String START_ACTIVITY_INTENT_EXTRA

Intent extra holding the intent for an activity to be started.

Constant Value: "com.urbanairship.util.START_ACTIVITY_INTENT_EXTRA"

Public Constructors

public HelperActivity ()

Public Methods

public final void onCreate (Bundle savedInstanceState)

public void onRequestPermissionsResult (int requestCode, String[] permissions, int[] grantResults)

public static int[] requestPermissions (Context context, String... permissions)

Requests permissions.

Parameters
context The application context.
permissions The permissions to request.
Returns
  • The result from requesting permissions.

public static HelperActivity.ActivityResult startActivityForResult (Context context, Intent intent)

Starts an activity for a result.

Parameters
context The application context.
intent The activity to start.
Returns
  • The result of the activity in a ActivityResult object.

Protected Methods

protected void onActivityResult (int requestCode, int resultCode, Intent data)