java/app/app/src/main/java/com/example/app/components/DashboardFragment.java [45:57]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        APIInfo api = new APIInfo();

        Amplify.Auth.fetchAuthSession(
                result -> {

                    AWSCognitoAuthSession cognitoAuthSession = (AWSCognitoAuthSession) result;
                    switch(cognitoAuthSession.getIdentityId().getType()) {
                        case SUCCESS:
                            // Get a valid user JWT.
                            String accessToken = cognitoAuthSession.getUserPoolTokens().getValue().getIdToken();
                            api.getPersonalInfo(getContext(), accessToken, new UserInfoRunInterface() {
                                @Override
                                public void run(User user) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/app/app/src/main/java/com/example/app/components/UserDataFragment.java [48:60]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        APIInfo api = new APIInfo();

        Amplify.Auth.fetchAuthSession(
                result -> {
                    AWSCognitoAuthSession cognitoAuthSession = (AWSCognitoAuthSession) result;
                    switch(cognitoAuthSession.getIdentityId().getType()) {
                        case SUCCESS:


                            String accessToken = cognitoAuthSession.getUserPoolTokens().getValue().getIdToken();
                            api.getPersonalInfo(getContext(), accessToken, new UserInfoRunInterface() {
                                @Override
                                public void run(User user) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



