Commit ce5b7b72 authored by Himanshu Kohli's avatar Himanshu Kohli 💻 Committed by Prakhar Agrawal
Browse files

update-readme

Added new build.

Added new release.

Updated readme.

Updated readme.

Added new release file.

Update readme.md. Add JSON structure of broadcast event.
parent a8b206c5
Loading
Loading
Loading
Loading
+758 B (28.6 KiB)

File changed.

No diff preview for this file type.

+41 −7
Original line number Diff line number Diff line
# Leegality Android SDK 4.3
# Leegality Android SDK 4.4

### Steps to Use ###

1. Download Leegality Library from http://gitlab.leegality.com/leegality-public/android-sdk/blob/v4.3/leegality.aar
1. Download Leegality Library from http://gitlab.leegality.com/leegality-public/android-sdk/blob/v4.4/leegality.aar
2. Import Leegality Library to your project by following the steps laid down in https://developer.android.com/studio/projects/android-library.html#AddDependency. 
3. To initialize signing, start activity Leegality provided by the Leegality Library. 
Pass signing URL in url key.
@@ -12,7 +12,20 @@ Pass signing URL in url key.
    startActivityForResult(intent, REQUEST_CODE);
    //REQUEST_CODE is your constant, which is used to identify particular activity.
    ```

4. To disable zoom feature you need to pass the zoom parameter as false in intent. By default its enabled.
   ```
   intent.putExtra("zoom", false);
   ```
5. Leegality SDK broadcast events related to user activity. If you want to receive these broadcasts you can use following code.
   ```
   IntentFilter filter = new IntentFilter("com.gspl.leegality.events"); 
   registerReceiver(new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            Log.d("test", intent.getExtras().getString("data"));
        }
    }, filter);
    ```
### Note: 

1. It is recommended to start signing process by using startActivityForResult instead of startActivity to receive the response/error. 
@@ -56,3 +69,24 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data){
}
```

### JSON Structure: ###

Broadcast event JSON structure:

```
{
	"invitationId":"string",
	"eventName":"string",
	"sessionId":"string",
	"data":{
		"notificationRaised":{
			"messages":[
			{
				"code":"string",
				"message":"string"
			}],
		"type":"string"
		}
	}
}
```