com.googlecode.android_scripting.facade
Class ActivityResultFacade

java.lang.Object
  extended by com.googlecode.android_scripting.jsonrpc.RpcReceiver
      extended by com.googlecode.android_scripting.facade.ActivityResultFacade

public class ActivityResultFacade
extends RpcReceiver

Allows you to return results to a startActivityForResult call.

Author:
Alexey Reznichenko (alexey.reznichenko@gmail.com)

Constructor Summary
ActivityResultFacade(FacadeManager manager)
           
 
Method Summary
 void setActivity(Activity activity)
           
 void setResultBoolean(java.lang.Integer resultCode, java.lang.Boolean resultValue)
           
 void setResultBooleanArray(java.lang.Integer resultCode, java.lang.Boolean[] resultValue)
           
 void setResultByte(java.lang.Integer resultCode, java.lang.Byte resultValue)
           
 void setResultByteArray(java.lang.Integer resultCode, java.lang.Byte[] resultValue)
           
 void setResultChar(java.lang.Integer resultCode, java.lang.Character resultValue)
           
 void setResultCharArray(java.lang.Integer resultCode, java.lang.Character[] resultValue)
           
 void setResultDouble(java.lang.Integer resultCode, java.lang.Double resultValue)
           
 void setResultDoubleArray(java.lang.Integer resultCode, java.lang.Double[] resultValue)
           
 void setResultFloat(java.lang.Integer resultCode, java.lang.Float resultValue)
           
 void setResultFloatArray(java.lang.Integer resultCode, java.lang.Float[] resultValue)
           
 void setResultInteger(java.lang.Integer resultCode, java.lang.Integer resultValue)
           
 void setResultIntegerArray(java.lang.Integer resultCode, java.lang.Integer[] resultValue)
           
 void setResultLong(java.lang.Integer resultCode, java.lang.Long resultValue)
           
 void setResultLongArray(java.lang.Integer resultCode, java.lang.Long[] resultValue)
           
 void setResultSerializable(java.lang.Integer resultCode, java.io.Serializable resultValue)
           
 void setResultShort(java.lang.Integer resultCode, java.lang.Short resultValue)
           
 void setResultShortArray(java.lang.Integer resultCode, java.lang.Short[] resultValue)
           
 void setResultString(java.lang.Integer resultCode, java.lang.String resultValue)
           
 void setResultStringArray(java.lang.Integer resultCode, java.lang.String[] resultValue)
           
 void shutdown()
          Invoked when the receiver is shut down.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityResultFacade

public ActivityResultFacade(FacadeManager manager)
Method Detail

setResultBoolean

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultBoolean(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                            java.lang.Integer resultCode,
                                            @RpcParameter(name="resultValue")
                                            java.lang.Boolean resultValue)

setResultByte

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultByte(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                         java.lang.Integer resultCode,
                                         @RpcParameter(name="resultValue")
                                         java.lang.Byte resultValue)

setResultShort

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultShort(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                          java.lang.Integer resultCode,
                                          @RpcParameter(name="resultValue")
                                          java.lang.Short resultValue)

setResultChar

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultChar(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                         java.lang.Integer resultCode,
                                         @RpcParameter(name="resultValue")
                                         java.lang.Character resultValue)

setResultInteger

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultInteger(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                            java.lang.Integer resultCode,
                                            @RpcParameter(name="resultValue")
                                            java.lang.Integer resultValue)

setResultLong

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultLong(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                         java.lang.Integer resultCode,
                                         @RpcParameter(name="resultValue")
                                         java.lang.Long resultValue)

setResultFloat

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultFloat(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                          java.lang.Integer resultCode,
                                          @RpcParameter(name="resultValue")
                                          java.lang.Float resultValue)

setResultDouble

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultDouble(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                           java.lang.Integer resultCode,
                                           @RpcParameter(name="resultValue")
                                           java.lang.Double resultValue)

setResultString

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultString(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                           java.lang.Integer resultCode,
                                           @RpcParameter(name="resultValue")
                                           java.lang.String resultValue)

setResultBooleanArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultBooleanArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                                 java.lang.Integer resultCode,
                                                 @RpcParameter(name="resultValue")
                                                 java.lang.Boolean[] resultValue)

setResultByteArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultByteArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                              java.lang.Integer resultCode,
                                              @RpcParameter(name="resultValue")
                                              java.lang.Byte[] resultValue)

setResultShortArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultShortArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                               java.lang.Integer resultCode,
                                               @RpcParameter(name="resultValue")
                                               java.lang.Short[] resultValue)

setResultCharArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultCharArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                              java.lang.Integer resultCode,
                                              @RpcParameter(name="resultValue")
                                              java.lang.Character[] resultValue)

setResultIntegerArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultIntegerArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                                 java.lang.Integer resultCode,
                                                 @RpcParameter(name="resultValue")
                                                 java.lang.Integer[] resultValue)

setResultLongArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultLongArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                              java.lang.Integer resultCode,
                                              @RpcParameter(name="resultValue")
                                              java.lang.Long[] resultValue)

setResultFloatArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultFloatArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                               java.lang.Integer resultCode,
                                               @RpcParameter(name="resultValue")
                                               java.lang.Float[] resultValue)

setResultDoubleArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultDoubleArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                                java.lang.Integer resultCode,
                                                @RpcParameter(name="resultValue")
                                                java.lang.Double[] resultValue)

setResultStringArray

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultStringArray(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                                java.lang.Integer resultCode,
                                                @RpcParameter(name="resultValue")
                                                java.lang.String[] resultValue)

setResultSerializable

@Rpc(description="Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), the resulting intent will contain SCRIPT_RESULT extra with the given value.")
public void setResultSerializable(@RpcParameter(name="resultCode",description="The result code to propagate back to the originating activity, often RESULT_CANCELED (0) or RESULT_OK (-1)")
                                                 java.lang.Integer resultCode,
                                                 @RpcParameter(name="resultValue")
                                                 java.io.Serializable resultValue)

setActivity

public void setActivity(Activity activity)

shutdown

public void shutdown()
Description copied from class: RpcReceiver
Invoked when the receiver is shut down.

Specified by:
shutdown in class RpcReceiver