[Huawei Developers] Freemind R:
More articles like this, you can visit HUAWEI Developer Forum and Medium.​

To integrate HMS Account kit in B4A platform we need to follow below steps

Step 1: Follow all the steps mentioned in Basic Setup to start HMS integration on B4A Platform

Refer to https://forums.developer.huawei.com/forumPortal/en/topicview?tid=0201286424114350051&fid=0101246461018590361

Step 2: Enable Account Kit in App gallery connect

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627125927.26351951087070574746342823332678:50510703015026:2800:BE4557E8985845CC8D5BD11C6CE46ACC6F2DCCC669CDA2A021317AC932099864.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627125927.26351951087070574746342823332678:50510703015026:2800:BE4557E8985845CC8D5BD11C6CE46ACC6F2DCCC669CDA2A021317AC932099864.png[/IMG]

Step 3: Download Account Kit AAR Package from below link

https://github.com/Arkesh-Unity/Account-Kit-in-B4A-Platform/tree/master/Addition

Step 4: Extract and rename the classes.jar --> hwid-4.0.1.300.jar and Androidmanifest.xml -> hwid-4.0.1.300.xml

Step 5: Add hwid-4.0.1.300.jar file to libs

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130058.48410157314490264890890155791306:50510703015026:2800:74AA9A485487BE0705F351790C62F0ADF3D33B7FD399BAAAB1CFF0AB34486A34.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130058.48410157314490264890890155791306:50510703015026:2800:74AA9A485487BE0705F351790C62F0ADF3D33B7FD399BAAAB1CFF0AB34486A34.png[/IMG]

Step 6: get the below marked content from hwid-4.0.1.300.xml and add it to manifest in B4A IDE

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130126.96759630865450856536751923619544:50510703015026:2800:505914518D2143D0139661AE4DC24D9AE7CFEBF83D5DC176DD4D64E3BBE63A47.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130126.96759630865450856536751923619544:50510703015026:2800:505914518D2143D0139661AE4DC24D9AE7CFEBF83D5DC176DD4D64E3BBE63A47.png[/IMG]

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130152.54990740788857454241664365505351:50510703015026:2800:9576E9447C577156BCCDB0AF6E9C757E711524BB3CFF95089CD301CCEB463D91.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130152.54990740788857454241664365505351:50510703015026:2800:9576E9447C577156BCCDB0AF6E9C757E711524BB3CFF95089CD301CCEB463D91.png[/IMG]

Step 7: Create below marked java files

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130210.18402933794274061662099431206905:50510703015026:2800:1698D3BDA9BE6D399971C7607753EF7DA6141BC3DC7BE90E415F810BE3A1AF30.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130210.18402933794274061662099431206905:50510703015026:2800:1698D3BDA9BE6D399971C7607753EF7DA6141BC3DC7BE90E415F810BE3A1AF30.png[/IMG]

1) Account.java file is used as communicator between B4A and java code

2) AccountAuthWork.java file contains code for Authentication code implementation

3) AccountWork.java file contains code for IdToken implementation

Step 8: Compile and generate B4A library

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130311.05553189599568228781583830379730:50510703015026:2800:AD1771FD1DF5DBA1F41AA857F07A457A0E8694DDA552E0DE29FBF4E623CE84C4.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130311.05553189599568228781583830379730:50510703015026:2800:AD1771FD1DF5DBA1F41AA857F07A457A0E8694DDA552E0DE29FBF4E623CE84C4.png[/IMG]

Step 9: Enable library in B4A IDE

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130336.96809559952164161419121795806611:50510703015026:2800:E0042F62CDEFDEE099100EF3D373532E7F5CAE9FB1B0B253FD97D5578712DDD3.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130336.96809559952164161419121795806611:50510703015026:2800:E0042F62CDEFDEE099100EF3D373532E7F5CAE9FB1B0B253FD97D5578712DDD3.png[/IMG]

Step 10: Add below code in B4A project to call the methods written for account kit

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130406.66520485678817947886277124108818:50510703015026:2800:05828E1F3E18244F8ADB335085223A8E1F39B2247993D552ED56AE9C71BFCBB4.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/000/002/116/0890091000000002116.20200627130406.66520485678817947886277124108818:50510703015026:2800:05828E1F3E18244F8ADB335085223A8E1F39B2247993D552ED56AE9C71BFCBB4.png[/IMG]

Refer code : https://github.com/Arkesh-Unity/Account-Kit-in-B4A-Platform