Why is FormField class in android package public?
Tuesday, October 17, 2017 at 10:45pmI am following the EsignLive demo tutorial given by Michael Williams for ios here https://www.youtube.com/watch?v=mnhyEY7WQzw. I am working on android and I have thought of implementing EsignLive in similar fashion.
Requirement:
Pre populate the pdf form with signer's details and other relevant data that we fetch from our api. This is important for us as we have a good number of documents and many fields are to be populated. Doing it manually is tiresome.
In the tutorial, Michael uses ESFormField in his xcode project which is public for ios so he is able to instantiate it in the viewcontroller.
Similar class FormField is available in android but it is package public so I cannot instantiate it from application code.
How can I achieve similar result using android sdk? Any samples for this is highly appreciated.
Reply to: Why is FormField class in android package public?
Thursday, October 19, 2017 at 06:32amReply to: Why is FormField class in android package public?
Thursday, October 19, 2017 at 07:52amprivate void createLocalTransaction() { try { Transaction transaction = CreateTransactionViewModel.createTransaction("Locally created transaction"); CreateTransactionViewModel.setInPersonSigning(transaction.getId(),true); Role role = CreateTransactionViewModel.addRole(transaction.getId(),"Test","Signer","[email protected]","ACME",null); CreateTransactionViewModel.addRole(transaction.getId(),"Reviewer","Test","[email protected]","ACME",null); Approval approval = new Approval(null,role.getId()); FormField signature = new Signature(null, Signature.Type.CAPTURE_SIGNATURE, 0, 320, 350, 200,50); approval.addField(signature); List approvalsList = new ArrayList();
approvalsList.add(approval);
Uri docUri = moveAssetToHomeFolderIfNeeded("SampleDocument.pdf");
if (docUri == null) {
Log.e("APP","Doc not found");
return;
}
CreateTransactionViewModel.addDocument(transaction.getId(), docUri,"id123","SampleDocument","", approvalsList, new CreateTransactionViewModel.AddDocumentListener() {
@Override
public void documentAddSuccessful(final String transactionId, String documentId) {
Util.runOnMainThread(new Util.MainThreadListener() {
@Override
public void executeOnMainThread() {
CreateTransactionViewModel.sendTransaction(transactionId);
ESignLive.getInstance().startTransactionWithId(transactionId,false);
}
});
}
@Override
public void documentAddFailed(String transactionId, String documentId, Error error) {
Log.e("APP",error.toString());
}
});
} catch (Exception e) {
e.printStackTrace();
}
} In addition, the iOS/Android SDKs will be placed on GitHub in the near future and have interact-able code snippets.