Commit 5dd2fa6c authored by Prakhar Agrawal's avatar Prakhar Agrawal
Browse files

Fixed preview.

parent 3510076c
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -4,10 +4,13 @@

1. Download Leegality Helper Application from https://play.google.com/store/apps/details?id=com.gspl.leegalityhelper
2. Client Android Application has to submit the eSigning URL to Leegality Helper Application. Please check below snippet :
    <br __>Eg. `Intent intent = new Intent("com.gspl.leegalityhelper.Leegality");
    <br __>Eg. 
    ```
    Intent intent = new Intent("com.gspl.leegalityhelper.Leegality");
	intent.putExtra("url", "signing-url-here");
	startActivityForResult(intent, REQUEST_CODE);
	//REQUEST_CODE is your constant, which is used to identify particular activity.`
	//REQUEST_CODE is your constant, which is used to identify particular activity.
    ```

#### Note: It is recommended to start signing process by using startActivityForResult instead of startActivity to receive the response/error. 

@@ -19,17 +22,19 @@ Override method onActivityResult to check the response of signing process.
2. In case of error in signing process, signing window will be closed automatically and you will get a response with key name 'error' and corresponding 'error message'.


`@Override
```
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data){
	//Check requestCode, If it match with the provided REQUEST_CODE then this response is for the signing process.	
	if(requestCode == REQUEST_CODE){
		String error = data.hasExtra("error") ? data.getExtras().getString("error") : null;
		String message = data.hasExtra("message") ? data.getExtras().getString("message") : null;
		if(error != null){		
			log.info("Error: ", error);
			System.out.println("Error: " + error);
		}else if(message != null){
			log.info("Message: ", message);
			System.out.println("Message: " + message);
		}		
	}
	super.onActivityResult(requestCode, resultCode, data);
}`
 No newline at end of file
}
```
 No newline at end of file