<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Login with token Auth. in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/login-with-token-auth/m-p/70291#M500</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To provide you with help, people will probably need more information as to what the error actually is and why it is not working as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Mar 2016 22:26:27 GMT</pubDate>
    <dc:creator>WillCrick</dc:creator>
    <dc:date>2016-03-28T22:26:27Z</dc:date>
    <item>
      <title>Login with token Auth.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/login-with-token-auth/m-p/70290#M499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im developing an app that works with a secured rest service for loading layers and base maps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 2 Views are:&lt;/P&gt;&lt;P&gt;1.- activity_login: allows to access to the other view (map_activity) using token auth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the credential given is correct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change to the next activity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; charge the modules associated to the account. (A list of modules in could be another view or something similar)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; preload the layers to be used in the activity_map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shows a toast saying that ur credential is wrong or another error type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.- activity_map: where all the layers and map and another stuff is loaded and u are authenticated to see them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im having problems on the logic i think now. My code for login activity is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public class &lt;/SPAN&gt;Login &lt;SPAN style="color: #000080; font-weight: bold;"&gt;extends &lt;/SPAN&gt;AppCompatActivity{

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;private &lt;/SPAN&gt;Button &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;btnIngresar&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;private &lt;/SPAN&gt;EditText &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtUsuario&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;private &lt;/SPAN&gt;EditText &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtPassword&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;public &lt;/SPAN&gt;MapView &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;;
&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// public map classMapa = new map();
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onCreate(Bundle savedInstanceState) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onCreate(savedInstanceState);
&amp;nbsp; setContentView(R.layout.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;activity_login&lt;/SPAN&gt;);

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//getting object references:
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtUsuario &lt;/SPAN&gt;= (EditText)findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TxtNombre&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtPassword &lt;/SPAN&gt;= (EditText)findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TxtPassword&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;btnIngresar &lt;/SPAN&gt;= (Button)findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;btnIngreso&lt;/SPAN&gt;);

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//getting values for arcgis services
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;String urlToken = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;.getResources().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;webToken&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;String urlChq006 = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;.getResources().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;webChilquinta006&lt;/SPAN&gt;);

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//getting values for toasts
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;String toLoginIncorrecto = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;.getResources().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;toastLoginIncorrecto&lt;/SPAN&gt;);


&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;btnIngresar&lt;/SPAN&gt;.setOnClickListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;View.OnClickListener(){
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onClick(View v){

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//Login with static credentials
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; /*
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; if(txtUsuario.getText().toString().equals("evelyn") &amp;amp;&amp;amp; txtPassword.getText().toString().equals("asdf")){
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; Intent intent = new Intent(Login.this,map.class);
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; startActivity(intent);
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; }else{
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; Toast.makeText(Login.this,"Login Incorrecto",Toast.LENGTH_SHORT).show();
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; }
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; */
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; //Login with token credentials
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp; //Set map and options
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView &lt;/SPAN&gt;= (MapView) findViewById(R.id.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;mimapa&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//Set color de fondo mapa base
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;.setMapBackground(&lt;SPAN style="color: #0000ff;"&gt;0xffffff&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;0xffffff&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;10&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;10&lt;/SPAN&gt;);


&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//Ingresando con credenciales
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;UserCredentials credencial = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;UserCredentials();
&amp;nbsp; credencial.setUserAccount(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtUsuario&lt;/SPAN&gt;.getText().toString(), &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtPassword&lt;/SPAN&gt;.getText().toString());
&amp;nbsp; credencial.setTokenServiceUrl(&lt;SPAN style="color: #660e7a;"&gt;urlToken&lt;/SPAN&gt;);

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ArcGISDynamicMapServiceLayer layer = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISDynamicMapServiceLayer(&lt;SPAN style="color: #660e7a;"&gt;urlChq006&lt;/SPAN&gt;,&lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;,credencial);
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;.addLayer(layer);

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//Cabios en el mapa
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;.setOnStatusChangedListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;OnStatusChangedListener() {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onStatusChanged(Object o, STATUS status) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(STATUS.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LAYER_LOADED &lt;/SPAN&gt;== status) {

&amp;nbsp; Toast.&lt;SPAN style="font-style: italic;"&gt;makeText&lt;/SPAN&gt;(Login.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Logueando..."&lt;/SPAN&gt;, Toast.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;//Cambiando al mapa
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Intent intent = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Intent(Login.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, map.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;class&lt;/SPAN&gt;);
&amp;nbsp; startActivity(intent);
&amp;nbsp; }

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(status == STATUS.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LAYER_LOADING_FAILED&lt;/SPAN&gt;) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Check if a layer is failed to be loaded due to security
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;((status.getError()) &lt;SPAN style="color: #000080; font-weight: bold;"&gt;instanceof &lt;/SPAN&gt;EsriSecurityException) {
&amp;nbsp; EsriSecurityException securityEx = (EsriSecurityException) status
&amp;nbsp; .getError();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(securityEx.getCode() == EsriSecurityException.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;AUTHENTICATION_FAILED&lt;/SPAN&gt;)
&amp;nbsp; Toast.&lt;SPAN style="font-style: italic;"&gt;makeText&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;.getContext(),
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Authentication Failed! Resubmit!"&lt;/SPAN&gt;,
&amp;nbsp; Toast.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;else if &lt;/SPAN&gt;(securityEx.getCode() == EsriSecurityException.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TOKEN_INVALID&lt;/SPAN&gt;)
&amp;nbsp; Toast.&lt;SPAN style="font-style: italic;"&gt;makeText&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;.getContext(),
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Invalid Token! Resubmit!"&lt;/SPAN&gt;,
&amp;nbsp; Toast.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;else if &lt;/SPAN&gt;(securityEx.getCode() == EsriSecurityException.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;TOKEN_SERVICE_NOT_FOUND&lt;/SPAN&gt;)
&amp;nbsp; Toast.&lt;SPAN style="font-style: italic;"&gt;makeText&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;.getContext(),
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Token Service Not Found! Resubmit!"&lt;/SPAN&gt;,
&amp;nbsp; Toast.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;else if &lt;/SPAN&gt;(securityEx.getCode() == EsriSecurityException.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;UNTRUSTED_SERVER_CERTIFICATE&lt;/SPAN&gt;)
&amp;nbsp; Toast.&lt;SPAN style="font-style: italic;"&gt;makeText&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;myMapView&lt;/SPAN&gt;.getContext(),
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Untrusted Host! Resubmit!"&lt;/SPAN&gt;,
&amp;nbsp; Toast.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();

&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(o &lt;SPAN style="color: #000080; font-weight: bold;"&gt;instanceof &lt;/SPAN&gt;ArcGISFeatureLayer) {
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;// Set user credential through username and password
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a;"&gt;credencial&lt;/SPAN&gt;.setUserAccount(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtUsuario&lt;/SPAN&gt;.getText().toString(), &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;txtPassword&lt;/SPAN&gt;.getText().toString());
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a;"&gt;layer&lt;/SPAN&gt;.reinitializeLayer(&lt;SPAN style="color: #660e7a;"&gt;credencial&lt;/SPAN&gt;);
&amp;nbsp; }
&amp;nbsp; }
&amp;nbsp; }
&amp;nbsp; }
&amp;nbsp; });

&amp;nbsp; }
&amp;nbsp; });

&amp;nbsp; }
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My map class just have the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public class &lt;/SPAN&gt;map &lt;SPAN style="color: #000080; font-weight: bold;"&gt;extends &lt;/SPAN&gt;AppCompatActivity {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onCreate(Bundle savedInstanceState) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onCreate(savedInstanceState);&lt;/P&gt;&lt;P&gt;&amp;nbsp; setContentView(R.layout.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;content_map&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for XML files&lt;/P&gt;&lt;P&gt;i have the map in activity_map.xml&lt;/P&gt;&lt;P&gt;i have the login (button, edittexts and etc in the activity_login)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error that i have is with the map.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:41:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/login-with-token-auth/m-p/70290#M499</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2021-12-10T22:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Login with token Auth.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/login-with-token-auth/m-p/70291#M500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To provide you with help, people will probably need more information as to what the error actually is and why it is not working as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2016 22:26:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/login-with-token-auth/m-p/70291#M500</guid>
      <dc:creator>WillCrick</dc:creator>
      <dc:date>2016-03-28T22:26:27Z</dc:date>
    </item>
  </channel>
</rss>

