Select to view content in your preferred language

How to get PopUp windows in arcgis.com webmap to display within an android app

998
2
04-05-2014 03:28 PM
markdustin
New Contributor
Hello

I created a web map within arcgis.com from a csv table that displays some points with popup windows displaying the attribute info.
This map displays perfectly fine within a browser and the popup windows display when clicking a point. When I add the map to my
app, the map displays with the points, but the popup windows do not display when tapping on them. I am using the ArcGIS Runtime for Android SDK v 10.2.2 in Eclipse and following the popup in web map for viewing sample within the SDK, following the directions as
stated with the sample on the ArcGIS for Developers website. Any tips or advice on how to fix this issue would be greatly appreciated.

Thank you
Mark
0 Kudos
2 Replies
zijianzhu
Deactivated User
Hello,

   I have the similar problem. I import the "IdentifyTask" example from the site of tutorial, it works well.

  But when I implamnt the task part to my own code, it does not work any more. The problem is that when I click the popwindow to specify the list, the application ternimate exceptionally.

04-11 11:23:23.606: E/AndroidRuntime(3811): FATAL EXCEPTION: main
04-11 11:23:23.606: E/AndroidRuntime(3811): Process: com.example.testsig, PID: 3811
04-11 11:23:23.606: E/AndroidRuntime(3811): android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@4239b6e0 is not valid; is your activity running?
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.view.ViewRootImpl.setView(ViewRootImpl.java:536)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:259)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.widget.PopupWindow.invokePopup(PopupWindow.java:1019)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:925)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.widget.ListPopupWindow.show(ListPopupWindow.java:625)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.widget.Spinner$DropdownPopup.show(Spinner.java:1110)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.widget.Spinner.performClick(Spinner.java:658)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.view.View$PerformClick.run(View.java:18422)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.os.Handler.handleCallback(Handler.java:733)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.os.Handler.dispatchMessage(Handler.java:95)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.os.Looper.loop(Looper.java:136)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at android.app.ActivityThread.main(ActivityThread.java:5017)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at java.lang.reflect.Method.invokeNative(Native Method)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at java.lang.reflect.Method.invoke(Method.java:515)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
04-11 11:23:23.606: E/AndroidRuntime(3811):  at dalvik.system.NativeStart.main(Native Method)
0 Kudos
jamelorys
Deactivated User
Edited popup attributes in a web map mainly turns off unwanted fields and then saves web map as hosted web app.

mobile" rel="nofollow" target="_blank">http://www.mappfia.com/]mobile apps developer
0 Kudos