Launches an intent, including any special intent handling.
341559
private void launchIntent(Intent intent) {
        if (intent == null) {
            return;
        }
        try {
            // If the intent was created from a suggestion, it will always have an explicit
            // component here.
            getContext().startActivity(intent);
        } catch (RuntimeException ex) {
            Log.e(LOG_TAG, "Failed launch activity: " + intent, ex);
        }
    }
698626
public void run() {
    		if (this.isActive)  {
    			try {
    				perform();                
                
    				//notify listener                
    				if (this.listener != null) {
    					this.listener.onTerminate();
    				}
    				
    			} catch (Exception e) {
    			    logger.error("Could not execute task " + this.taskId + ": "+ e.getMessage(), e);
    				if (this.listener != null) {
    					listener.handlerError(e);
    				} 
    			}
    		}      		    		    	
    }
738545
public static void startActivity(@NonNull Context context, @Nullable JSONArray jsonArray) {
        Intent intent = new Intent(context, JSONViewerActivity.class);
        Bundle bundle = new Bundle();
        if (jsonArray != null) {
            bundle.putString(JSON_ARRAY_STATE, jsonArray.toString());
        }
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
1147527
def onReceive(context, reload_intent)
      Log.d "Got reload intent: #{reload_intent.inspect}"
      file_string = reload_intent.get_string_extra('reload')
      if file_string
        scripts_dir = @activity.getExternalFilesDir(nil).absolute_path + '/scripts'
        files = file_string.split(/(?<!&);/).map { |f| f.gsub(/&(.)/) { |m| m[1] } }
        with_large_stack(size: 256) do
          files.each do |file|
            Log.d "load file: #{scripts_dir}/#{file}"
            load "#{scripts_dir}/#{file}"
          end
        end
        Log.d 'restart activity'
        if @activity.intent.action == android.content.Intent::ACTION_MAIN ||
            @activity.intent.action == android.hardware.usb.UsbManager::ACTION_USB_DEVICE_ATTACHED
          restart_intent = android.content.Intent.new(@activity.intent).
              setAction(android.content.Intent::ACTION_VIEW)
        else
          restart_intent = @activity.intent
        end
        @activity.finish
        @activity.startActivity(restart_intent)
        Log.d 'activity restarted'
      end
      Log.d 'reload complete.'
      true
    rescue Exception => e
      Log.e "Exception handling reload broadcast: #{e.message}"
      Log.e e.backtrace.join("\n")
    end
1048952
public void start() {
    input.messageHandler(new Handler<Object>() {
      @Override
      public void handle(Object message) {
        output.send(message);
        pumped++;
      }
    });
  }
1121893
def register(self, intent):
        """"""
        response = self.api.post_intent(intent.serialize)
        print(response)
        print()
        if response['status']['code'] == 200:
            intent.id = response['id']
        elif response['status']['code'] == 409: # intent already exists
            intent.id = next(i.id for i in self.api.agent_intents if i.name == intent.name)
            self.update(intent)
        return intent
634305
public void execute()
    {
        Runnable task = new Runnable()
        {
            public void run()
            {
                final V result = performTask();
                SwingUtilities.invokeLater(new Runnable()
                {
                    public void run()
                    {
                        postProcessing(result);
                        latch.countDown();
                    }
                });
            }
        };
        new Thread(task, "SwingBackgroundTask-" + id).start();
    }
1033154
static void runIntentInService(Context context, Intent intent,
            String className) {
        synchronized (LOCK) {
            if (sWakeLock == null) {
                // This is called from BroadcastReceiver, there is no init.
                PowerManager pm = (PowerManager)
                        context.getSystemService(Context.POWER_SERVICE);
                sWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
                        WAKELOCK_KEY);
            }
        }
        Log.v(TAG, "Acquiring wakelock");
        sWakeLock.acquire();
        intent.setClassName(context, className);
        context.startService(intent);
    }
184262
public function execute()
    {
        if (method_exists($this, 'setUp')) {
            call_user_func_array([$this, 'setUp'], [$this->request]);
        }
        call_user_func_array([$this, $this->action], [$this->request]);
    }
181827
public void launch() throws Exception {
    final Injector injector = Tang.Factory.getTang().newInjector(readConfigurationFromDisk(this.configurationFilePath));
    final EvaluatorShim evaluatorShim = injector.getInstance(EvaluatorShim.class);
    evaluatorShim.run();
  }
1220091
@Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        super.onStartCommand(intent, flags, startId);
        Message msg = mServiceHandler.obtainMessage();
        msg.arg1 = startId;
        msg.obj = intent;
        mServiceHandler.sendMessage(msg);
        return mRedelivery ? START_REDELIVER_INTENT : START_NOT_STICKY;
    }
663708
public static void navigateToActivity(Context A, Class<?> B, Bundle extras) {
        Intent myIntent = new Intent(A, B);
        myIntent.putExtras(extras);
        A.startActivity(myIntent);
    }
375383
def post_intent(self, intent_json):
        """"""
        endpoint = self._intent_uri()
        return self._post(endpoint, data=intent_json)
394194
public void start(IntentFactoryStrategy parameters) {
        Intent intent = buildIntent(parameters);

        parameters.start(context, intent);

    }
1321136
private void fired(Direction initial)
    {
        for (final LauncherListener listener : listenersLauncher)
        {
            listener.notifyFired();
        }
        for (final LaunchableConfig launchableConfig : launchables)
        {
            final Media media = Medias.create(launchableConfig.getMedia());
            final Featurable featurable = factory.create(media);
            try
            {
                final Launchable launchable = featurable.getFeature(Launchable.class);
                if (launchableConfig.getDelay() > 0)
                {
                    delayed.add(new DelayedLaunch(launchableConfig, initial, featurable, launchable));
                }
                else
                {
                    launch(launchableConfig, initial, featurable, launchable);
                }
            }
            catch (final LionEngineException exception)
            {
                featurable.getFeature(Identifiable.class).destroy();
                throw exception;
            }
        }
    }
382216
public static void launchPermissionSettings(Activity activity) {
        Intent intent = new Intent();
        intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
        intent.setData(Uri.fromParts("package", activity.getPackageName(), null));
        activity.startActivity(intent);
    }
83829
public static void navigateToActivity(Context A, Class<?> B) {
        Intent myIntent = new Intent(A, B);
        A.startActivity(myIntent);
    }