<?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 I get a similar error when in Wireless</title>
    <link>https://community.cisco.com/t5/wireless/unable-to-connect-to-cmx-simulation-server/m-p/2715784#M96048</link>
    <description>&lt;P&gt;I get a similar error when running the sample android app of cisco provided &lt;A href="https://developer.cisco.com/site/cmx-mobility-services/downloads/"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;PRE class="prettyprint"&gt;01-01 00:34:49.010: E/AndroidRuntime(1769): FATAL EXCEPTION: main&lt;BR /&gt;01-01 00:34:49.010: E/AndroidRuntime(1769): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cisco.cmx.sample.core/com.cisco.cmx.sample.core.MainActivity}: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application&lt;BR /&gt;01-01 00:34:49.010: E/AndroidRuntime(1769): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Jan 2017 10:27:27 GMT</pubDate>
    <dc:creator>saifeddinehakim</dc:creator>
    <dc:date>2017-01-30T10:27:27Z</dc:date>
    <item>
      <title>Unable to connect to CMX Simulation Server</title>
      <link>https://community.cisco.com/t5/wireless/unable-to-connect-to-cmx-simulation-server/m-p/2715782#M96046</link>
      <description>&lt;P&gt;I am trying to get "Hello World" working with the Simulation server using the Android SDK. &amp;nbsp; I do have the NodeJS server up and running and I can hit the /demo/start url from both a desktop and mobile device. &amp;nbsp;However, when I try to register the Android client, I receive this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE&gt;
Failed CMX Registration:Registration to CMX server has failed.&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anyway to turn on more debugging information with the client to get a more specific error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code that I have in my app:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE style="background-color:#ffffff;color:#000000;font-family:'Menlo';font-size:12.0pt;"&gt;
// In onCreateView of fragment
...
    CMXClient.&lt;SPAN style="font-style:italic;"&gt;getInstance&lt;/SPAN&gt;().initialize(getActivity());
    CMXClient.&lt;SPAN style="font-style:italic;"&gt;getInstance&lt;/SPAN&gt;().setConfiguration(getConfiguration());

    registerButton.setOnClickListener(&lt;SPAN style="color:#000080;font-weight:bold;"&gt;new &lt;/SPAN&gt;View.OnClickListener() {
        &lt;SPAN style="color:#808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color:#808000;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color:#000080;font-weight:bold;"&gt;public void &lt;/SPAN&gt;onClick(View v) {
            CMXClient.&lt;SPAN style="font-style:italic;"&gt;getInstance&lt;/SPAN&gt;().registerClient(&lt;SPAN style="color:#000080;font-weight:bold;"&gt;new &lt;/SPAN&gt;CMXClientRegisteringResponseHandler() {
                &lt;SPAN style="color:#808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color:#808000;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color:#000080;font-weight:bold;"&gt;public void &lt;/SPAN&gt;onSuccess() {
                    Log.&lt;SPAN style="font-style:italic;"&gt;e&lt;/SPAN&gt;(&lt;SPAN style="color:#660e7a;font-weight:bold;font-style:italic;"&gt;FRAGMENT_TAG&lt;/SPAN&gt;, &lt;SPAN style="color:#008000;font-weight:bold;"&gt;"Successful CMX Registration."&lt;/SPAN&gt;);
                    &lt;SPAN style="color:#000080;font-weight:bold;"&gt;super&lt;/SPAN&gt;.onSuccess();
                }

                &lt;SPAN style="color:#808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color:#808000;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color:#000080;font-weight:bold;"&gt;public void &lt;/SPAN&gt;onFailure(Throwable throwable) {
                    Log.&lt;SPAN style="font-style:italic;"&gt;e&lt;/SPAN&gt;(&lt;SPAN style="color:#660e7a;font-weight:bold;font-style:italic;"&gt;FRAGMENT_TAG&lt;/SPAN&gt;, &lt;SPAN style="color:#008000;font-weight:bold;"&gt;"Failed CMX Registration:" &lt;/SPAN&gt;+ throwable.getLocalizedMessage());
                    &lt;SPAN style="color:#000080;font-weight:bold;"&gt;super&lt;/SPAN&gt;.onFailure(throwable);
                }
            });
        }
    });

...

&lt;SPAN style="color:#000080;font-weight:bold;"&gt;public &lt;/SPAN&gt;CMXClient.Configuration getConfiguration() {
    SharedPreferences settings = PreferenceManager.&lt;SPAN style="font-style:italic;"&gt;getDefaultSharedPreferences&lt;/SPAN&gt;(getActivity());
    String baseUrl = settings.getString(&lt;SPAN style="color:#008000;font-weight:bold;"&gt;"prefBaseUrl"&lt;/SPAN&gt;, getResources().getString(R.string.&lt;SPAN style="color:#660e7a;font-weight:bold;font-style:italic;"&gt;default_settings_base_url&lt;/SPAN&gt;));
    String port = settings.getString(&lt;SPAN style="color:#008000;font-weight:bold;"&gt;"prefPort"&lt;/SPAN&gt;, getResources().getString(R.string.&lt;SPAN style="color:#660e7a;font-weight:bold;font-style:italic;"&gt;default_settings_port&lt;/SPAN&gt;));
    String senderId = settings.getString(&lt;SPAN style="color:#008000;font-weight:bold;"&gt;"prefSenderId"&lt;/SPAN&gt;, getResources().getString(R.string.&lt;SPAN style="color:#660e7a;font-weight:bold;font-style:italic;"&gt;default_settings_senderid&lt;/SPAN&gt;));
    &lt;SPAN style="color:#000080;font-weight:bold;"&gt;try &lt;/SPAN&gt;{
        CMXClient.Configuration config = &lt;SPAN style="color:#000080;font-weight:bold;"&gt;new &lt;/SPAN&gt;CMXClient.Configuration();
        config.setServerAddress(baseUrl);
        config.setServerPort(port);
        config.setSenderId(senderId);
        &lt;SPAN style="color:#000080;font-weight:bold;"&gt;return &lt;/SPAN&gt;config;
    } &lt;SPAN style="color:#000080;font-weight:bold;"&gt;catch &lt;/SPAN&gt;(MalformedURLException e) {
        e.printStackTrace();
    }
    &lt;SPAN style="color:#000080;font-weight:bold;"&gt;return null&lt;/SPAN&gt;;
}&lt;/PRE&gt;

&lt;PRE style="background-color:#ffffff;color:#000000;font-family:'Menlo';font-size:12.0pt;"&gt;
//in strings.xml
&amp;lt;&lt;SPAN style="color:#000080;font-weight:bold;"&gt;string &lt;/SPAN&gt;&lt;SPAN style="color:#0000ff;font-weight:bold;"&gt;name=&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-weight:bold;"&gt;"default_settings_base_url"&lt;/SPAN&gt;&amp;gt;http://&amp;lt;My simulation server ip&amp;gt;/&amp;lt;/&lt;SPAN style="color:#000080;font-weight:bold;"&gt;string&lt;/SPAN&gt;&amp;gt;
&amp;lt;&lt;SPAN style="color:#000080;font-weight:bold;"&gt;string &lt;/SPAN&gt;&lt;SPAN style="color:#0000ff;font-weight:bold;"&gt;name=&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-weight:bold;"&gt;"default_settings_port"&lt;/SPAN&gt;&amp;gt;8082&amp;lt;/&lt;SPAN style="color:#000080;font-weight:bold;"&gt;string&lt;/SPAN&gt;&amp;gt;
&amp;lt;&lt;SPAN style="color:#000080;font-weight:bold;"&gt;string &lt;/SPAN&gt;&lt;SPAN style="color:#0000ff;font-weight:bold;"&gt;name=&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-weight:bold;"&gt;"default_settings_senderid"&lt;/SPAN&gt;&amp;gt;&amp;lt;my google sender id&amp;gt;&amp;lt;/&lt;SPAN style="color:#000080;font-weight:bold;"&gt;string&lt;/SPAN&gt;&amp;gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anything wrong in my configuration or code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 10:24:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/unable-to-connect-to-cmx-simulation-server/m-p/2715782#M96046</guid>
      <dc:creator>wesleylemke</dc:creator>
      <dc:date>2021-07-05T10:24:47Z</dc:date>
    </item>
    <item>
      <title>A couple of other notes: I</title>
      <link>https://community.cisco.com/t5/wireless/unable-to-connect-to-cmx-simulation-server/m-p/2715783#M96047</link>
      <description>&lt;P&gt;A couple of other notes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I get a similar error when using the cmx-sample-core app: &amp;nbsp;"Faied (sic) To Load Venue: &amp;nbsp;org.apache.http.client.HttpResponseException: Not Found" &amp;nbsp;(this is using the sandbox IP address from here: &amp;nbsp;https://developer.cisco.com/site/cmx-mobility-services/learn/tutorials/android-mobile-app/#step-2-launch-android-emulator-and-core-sample&lt;/LI&gt;&lt;LI&gt;When I try my app or the cmx-sample-core app on a device running Lollipop, I get the app crashing when initializing CMXClient: &amp;nbsp;&amp;nbsp; &amp;nbsp; java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cisco.cmx.sample.core/com.cisco.cmx.sample.core.MainActivity}: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 15 Jun 2015 19:43:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/unable-to-connect-to-cmx-simulation-server/m-p/2715783#M96047</guid>
      <dc:creator>wesleylemke</dc:creator>
      <dc:date>2015-06-15T19:43:22Z</dc:date>
    </item>
    <item>
      <title>I get a similar error when</title>
      <link>https://community.cisco.com/t5/wireless/unable-to-connect-to-cmx-simulation-server/m-p/2715784#M96048</link>
      <description>&lt;P&gt;I get a similar error when running the sample android app of cisco provided &lt;A href="https://developer.cisco.com/site/cmx-mobility-services/downloads/"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;PRE class="prettyprint"&gt;01-01 00:34:49.010: E/AndroidRuntime(1769): FATAL EXCEPTION: main&lt;BR /&gt;01-01 00:34:49.010: E/AndroidRuntime(1769): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cisco.cmx.sample.core/com.cisco.cmx.sample.core.MainActivity}: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application&lt;BR /&gt;01-01 00:34:49.010: E/AndroidRuntime(1769): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2017 10:27:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/unable-to-connect-to-cmx-simulation-server/m-p/2715784#M96048</guid>
      <dc:creator>saifeddinehakim</dc:creator>
      <dc:date>2017-01-30T10:27:27Z</dc:date>
    </item>
  </channel>
</rss>

