Hello,
i´m trying to get a GoogleApiclient working to be able to use the Google Calendar Api.
But i´m running into Exceptions and do not know what i need to add (include, additionaljar)
The code which raises the Exception is:
Anyone have an Idea?
i´m trying to get a GoogleApiclient working to be able to use the Google Calendar Api.
But i´m running into Exceptions and do not know what i need to add (include, additionaljar)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 346)
java.security.KeyStoreException: JKS not found
at java.security.KeyStore.getInstance(KeyStore.java:890)
at com.google.api.client.util.SecurityUtils.getJavaKeyStore(SecurityUtils.java:53)
at com.google.api.client.googleapis.GoogleUtils.getCertificateTrustStore(GoogleUtils.java:74)
at com.google.api.client.googleapis.javanet.GoogleNetHttpTransport.newTrustedTransport(GoogleNetHttpTransport.java:55)
at de.donmanfred.GoogleCalendarClientwrapper.Initialize(GoogleCalendarClientwrapper.java:50)
at de.donmanfred.gcalclient.main._activity_create(main.java:346)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at de.donmanfred.gcalclient.main.afterFirstLayout(main.java:104)
at de.donmanfred.gcalclient.main.access$000(main.java:17)
at de.donmanfred.gcalclient.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.security.NoSuchAlgorithmException: JKS KeyStore not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at java.security.Security.getImpl(Security.java:590)
at java.security.KeyStore.getInstance(KeyStore.java:887)
... 17 more
The code which raises the Exception is:
B4X:
ba.Log("Build Credentials");
this.credentials = new GoogleCredential.Builder().setTransport(GoogleNetHttpTransport.newTrustedTransport())
.setJsonFactory(new GsonFactory())
.setServiceAccountId(ServiceAccountId)
.setServiceAccountScopes(Arrays.asList("https://www.googleapis.com/auth/calendar"))
.setServiceAccountPrivateKeyFromP12File(new File(p12file))
.setServiceAccountUser(ServiceAccountUSer)
.build();
Anyone have an Idea?
Last edited: