Android App - Not able to read elements from pop up menu

I am not able to read elements from a popup .

The pop up is designed using native components, eventhough UI Automator Viewer is not able to recognize the elements. Please suggest a workaround for the same…

I have exactly the same issue with Android WindowPopups using ruby. Javascript methods do not work for me (execute_script). The UIAutomator Viewer does not see the elements and neither does the Appium Console.

Working with one of our developers we were finally able to get this to work.

Old app code for the WindowPopup:

setBackgroundDrawable(context.getResources().getDrawable(R.drawable.border_controls_dialog));
setOutsideTouchable(true);
setTouchable(true);
setFocusable(true);
mContext = context;
pd = new SmartyProgressBar(context);

new code (one line added in bold):

setBackgroundDrawable(context.getResources().getDrawable(R.drawable.border_controls_dialog));
setOutsideTouchable(true);
setTouchable(true);
getContentView().setFocusable(true);
setFocusable(true);
mContext = context;
pd = new SmartyProgressBar(context);

apparently, without that line of code the UIAutomation Viewer let alone UIAutomation will NOT work. This problem is specific to kitkat and ice cream sandwich and might not be a problem for Lollipop

Thanks Chris_Billante. Will try this out.