<?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>Question Re: Map Extension does not recognize androidContext() in MDK application in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144988#M4539792</link>
    <description>&lt;P&gt;hi  &lt;SPAN class="mention-scrubbed"&gt;jitendrakumar.kansal&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;my colleague has a Windows device and he told me, that for him, the this.androidContext() was null, too.&lt;/P&gt;&lt;P&gt;However, in another extension, he created a new instance of an EditText (Android) &lt;A href="https://developer.android.com/reference/android/widget/EditText.html"&gt;https://developer.android.com/reference/android/widget/EditText.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The textfield rendered for him, but in his Android debugger, "this.androidContext()" is also null.&lt;/P&gt;&lt;P&gt;Is it normal, that the debugger shows no data for that? &lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Sher-Chan Kodirov&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2020 13:27:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2020-05-08T13:27:26Z</dc:date>
    <item>
      <title>Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaq-p/12144983</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
  &lt;P&gt;currently I develop an MDK application in Visual Studio Code using your MDK extension for VSC.&lt;/P&gt;
  &lt;P&gt;I added the extension you created from: &lt;A href="https://developers.sap.com/tutorials/cp-mobile-dev-kit-map-extension.html"&gt;https://developers.sap.com/tutorials/cp-mobile-dev-kit-map-extension.html&lt;/A&gt;. Note, that I didn't change any code, its the same version posted in the tutorial.&lt;/P&gt;
  &lt;P&gt;For iOS, the map works as expected, but for Android, I recognized some issue. I checked for your documentation (&lt;A href="https://help.sap.com/viewer/977416d43cd74bdc958289038749100e/3.2/en-US/9411d35cb91a4a8986a2635b7375c12f.html"&gt;https://help.sap.com/viewer/977416d43cd74bdc958289038749100e/3.2/en-US/9411d35cb91a4a8986a2635b7375c12f.html&lt;/A&gt;) and analogue to it, the Map extension tries to create a new instance for the "_mapView" variable (object of class MapView):&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;this._mapView = new com.google.android.gms.maps.MapView(this.androidContext());
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This line, however, throws a java.lang.NullPointerException, because the context of android (this.androidContext()) is null for me.&lt;/P&gt;
  &lt;P&gt;In the second link I posted above, the following information is delivered about the androidContext:&lt;BR /&gt;androidContext() - this function returns the current page's context that will be needed to create an Android native view.&lt;/P&gt;
  &lt;P&gt;Do you have any idea, why this problem occurs? Do I maybe have to adjust something, since, e.g., the mdk client sdk has been changed? In my TypeScript-file, the current android context is null and that is why I think, that the NullPointerException is thrown.&lt;/P&gt;
  &lt;P&gt;Thank you in advance for your help!&lt;/P&gt;
  &lt;P&gt;Best regards,&lt;/P&gt;
  &lt;P&gt;Sher-Chan Kodirov&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 09:30:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaq-p/12144983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-08T09:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144984#M4539788</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;sherchan_kodirov19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I quickly tested same tutorial on Android client built using &lt;STRONG&gt;MDK SDK 4.2.1&lt;/STRONG&gt; and can see the expected result. &lt;/P&gt;&lt;P&gt;Which MDK SDK version you are trying with? &lt;/P&gt;&lt;P&gt;Did you already follow step#8 to add required info in grandle &amp;amp; AndroidManifest.xml files?  &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;JK&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 11:07:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144984#M4539788</guid>
      <dc:creator>Jitendra_Kansal</dc:creator>
      <dc:date>2020-05-08T11:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144985#M4539789</link>
      <description>&lt;P&gt;hi &lt;SPAN class="mention-scrubbed"&gt;jitendrakumar.kansal&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;by the way, I am using a macOS Catalina with Version 10.15.4 and I have the MDK SDK version "MDKCLNT02P_1-80005072". I setup my whole dev environment for both iOS &amp;amp; Android.&lt;/P&gt;&lt;P&gt;And yes, i followed step#8 setting gradle-file as well as AndroidManifest.xml file in the built application I use for debug app root.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Sher-Chan Kodirov&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 11:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144985#M4539789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-08T11:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144986#M4539790</link>
      <description>&lt;P&gt;You can find MDK SDK version in Readme.html file under SDK folder. By looking at folder name, looks like it's 4.2.1&lt;/P&gt;&lt;P&gt;In order to further investigate this issue, could you raise an OSS ticket (component MOB-MDK) , attach your local.mdkproject, metadaproject &lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 11:59:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144986#M4539790</guid>
      <dc:creator>Jitendra_Kansal</dc:creator>
      <dc:date>2020-05-08T11:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144987#M4539791</link>
      <description>&lt;P&gt;hi &lt;SPAN class="mention-scrubbed"&gt;jitendrakumar.kansal&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;it's the version 4.2.1 for my MDK Client SDK. However, sure, I can share my code so you can get any idea!&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Sher-Chan Kodirov&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 12:08:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144987#M4539791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-08T12:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144988#M4539792</link>
      <description>&lt;P&gt;hi  &lt;SPAN class="mention-scrubbed"&gt;jitendrakumar.kansal&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;my colleague has a Windows device and he told me, that for him, the this.androidContext() was null, too.&lt;/P&gt;&lt;P&gt;However, in another extension, he created a new instance of an EditText (Android) &lt;A href="https://developer.android.com/reference/android/widget/EditText.html"&gt;https://developer.android.com/reference/android/widget/EditText.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The textfield rendered for him, but in his Android debugger, "this.androidContext()" is also null.&lt;/P&gt;&lt;P&gt;Is it normal, that the debugger shows no data for that? &lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Sher-Chan Kodirov&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 13:27:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144988#M4539792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-08T13:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144989#M4539793</link>
      <description>&lt;P&gt;hi  &lt;SPAN class="mention-scrubbed"&gt;jitendrakumar.kansal&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;for your info, I found the solution. After I &lt;STRONG&gt;exchanged&lt;/STRONG&gt; the "&lt;STRONG&gt;this.androidContext()&lt;/STRONG&gt;"&lt;STRONG&gt; with app.android.context&lt;/STRONG&gt; in the code of your tutorial (for the map extension), I was finally able to display the correct result.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Sher-Chan Kodirov&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 08:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144989#M4539793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-11T08:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Map Extension does not recognize androidContext() in MDK application</title>
      <link>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144990#M4539794</link>
      <description>&lt;A href="https://answers.sap.com/users/952480/sherchan_kodirov19.html"&gt;Sher-Chan Kodirov&lt;/A&gt;Thanks for heads-up. Glad you got it working.coming to original query, i see it working with source code mentioned in the tutorial and also debugging the "&lt;STRONG&gt;this.androidContext()&lt;/STRONG&gt;" returns below.You can raise an OSS ticket for further investigation if something breaks as per tutorial.&lt;PRE&gt;&lt;CODE&gt;Object {constructor: , _needRestart: false, _callbacks: ActivityCallbacksImplementation}
_callbacks:ActivityCallbacksImplementation {_rootView: Frame}
_needRestart:false
constructor:function () { … }
isNativeScriptActivity:true
skipExit:undefined
super:Object
__proto__:Activity {constructor: } &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 May 2020 08:59:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/map-extension-does-not-recognize-androidcontext-in-mdk-application/qaa-p/12144990#M4539794</guid>
      <dc:creator>Jitendra_Kansal</dc:creator>
      <dc:date>2020-05-11T08:59:37Z</dc:date>
    </item>
  </channel>
</rss>

