Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 29f4a36

Browse files
author
Irvine Sunday
committed
Getting Client ID
1 parent 26ba0b7 commit 29f4a36

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/main/java/com/microsoft/graph/connect/AuthenticationManager.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import android.content.Context;
1111
import android.util.Log;
1212

13+
import com.microsoft.graph.connect.util.IManifestReader;
14+
import com.microsoft.graph.connect.util.ManifestReader;
1315
import com.microsoft.identity.client.AuthenticationCallback;
1416
import com.microsoft.identity.client.AuthenticationResult;
1517
import com.microsoft.identity.client.IAccount;
@@ -33,8 +35,12 @@ private AuthenticationManager() {
3335
public static synchronized AuthenticationManager getInstance() {
3436
if (INSTANCE == null) {
3537
INSTANCE = new AuthenticationManager();
38+
39+
IManifestReader metaDataReader = new ManifestReader();
40+
String clientID = metaDataReader.getApplicationMetadataValueString("com.microsoft.identity.client.ClientId");
41+
3642
if (mPublicClientApplication == null) {
37-
mPublicClientApplication = new PublicClientApplication(Connect.getInstance());
43+
mPublicClientApplication = new PublicClientApplication(Connect.getInstance(), clientID);
3844
}
3945
}
4046
return INSTANCE;

0 commit comments

Comments
 (0)