Last active
April 21, 2020 15:08
-
-
Save dan085/549d63e8ae426f164f3c57d8a893e626 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// enla linea 95 aparece esta funcion | |
fun get_access_token_instance(): String { | |
Log.d("access_token",access_token); | |
if(access_token.length==0){ | |
try { | |
this.access_token = a_user_seleted.accessToken | |
if(access_token.length==0){ | |
this.access_token = sharedPreference.get_token_web(KEY_CREDENTIAL) | |
} | |
}catch (ee:java.lang.NullPointerException){ | |
this.access_token = sharedPreference.get_token_web(KEY_CREDENTIAL) | |
ee.printStackTrace() | |
}catch(ee: UninitializedPropertyAccessException){ ///--> agrege ese catch para inicializar la variable dentro de este catch | |
try { | |
account_selected(sharedPreference.get_user_selected(TAG.INFO_USERS_SELECTED)) | |
this.access_token = a_user_seleted.accessToken | |
ee.printStackTrace() | |
} catch(ee: UninitializedPropertyAccessException){ee.printStackTrace()}///-> agrege este catch para verificar nuevamente y si no esxiste nada que el access token sea vacio | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment