public class

HelperActivity

extends AppCompatActivity
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ androidx.core.app.ComponentActivity
             ↳ androidx.activity.ComponentActivity
               ↳ androidx.fragment.app.FragmentActivity
                 ↳ androidx.appcompat.app.AppCompatActivity
                   ↳ com.urbanairship.util.HelperActivity

This class is deprecated.
Will be removed in SDK 17. Use your own activity to request results.

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)
void onDestroy()
void onNewIntent(Intent intent)
[Expand]
Inherited Methods
From class androidx.appcompat.app.AppCompatActivity
From class androidx.fragment.app.FragmentActivity
From class androidx.activity.ComponentActivity
From class androidx.core.app.ComponentActivity
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
From interface androidx.activity.OnBackPressedDispatcherOwner
From interface androidx.activity.contextaware.ContextAware
From interface androidx.activity.result.ActivityResultCaller
From interface androidx.activity.result.ActivityResultRegistryOwner
From interface androidx.appcompat.app.ActionBarDrawerToggle.DelegateProvider
From interface androidx.appcompat.app.AppCompatCallback
From interface androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback
From interface androidx.core.app.ActivityCompat.RequestPermissionsRequestCodeValidator
From interface androidx.core.app.TaskStackBuilder.SupportParentable
From interface androidx.core.view.KeyEventDispatcher.Component
From interface androidx.lifecycle.HasDefaultViewModelProviderFactory
From interface androidx.lifecycle.LifecycleOwner
From interface androidx.lifecycle.ViewModelStoreOwner
From interface androidx.savedstate.SavedStateRegistryOwner

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)

protected void onDestroy ()

protected void onNewIntent (Intent intent)