eclipsesource / eclipsesource/tabris-js
ActionSheet or app.launch() issue on Android 11/12
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
- Android App released with Tabris 3.7.2 (not 3.8 because the [cloud build is broken](https://github.com/eclipsesource/tabris-js/issues/2201)).
- We're receiving reports that Google Maps/Waze is not opening when people use the buttons on an ActionSheet using Android devices.
- No reports of issues on iOS (built on 3.8 as cloud build works).
- When we test using the Tabris.js development app (which is using 3.7.1 I think) this work perfectly on both iOS and Android 10 and Android 11 (we have not Android 12 test device yet).
- Multiple users have been reporting this issue on Android 11 and 12 with our released app.
- Our own cloud built app doesn't open Google Maps/Waze on our Android 11 Samsung A40. Nothing appears to happen at all when using the action button, but with the Tabris.js development app, it works perfectly so it's hard to get further insight in errors. The ActionSheet does hide when an action button is touched.
- The Tabris.js test app built with 3.7.2 or ideally 3.8 would be useful here for test.
### Expected behavior
Google Maps or Waze should be launched
### Environment
- Tabris.js version: 3.7.1, 3.7.2 and 3.8 (see above)
- Device/OS: Works on Honor Android 10. Doesn't work on Samsung A40 Android 11. Reports from Android 12 Samsung devices too. No known issues with iOS.
### Code snippet
```js
let lat = 51.507351;
let lon = -0.127758;
let actions = [
{title: 'Google Maps'},
];
if (device.platform == "iOS") {
actions.push({title: 'Apple Maps'});
}
actions.push({title: 'Waze'});
actions.push({title: 'Cancel', style: 'cancel'});
let lat_lon = encodeURIComponent(lat + "," + lon);
new ActionSheet({
title: 'Which map app would you like to use?',
actions: actions
})
.onSelect(function(action){
switch (String(action.action)) {
case 'Google Maps':
app.launch("https://www.google.com/maps/dir/?api=1&travelmode=driving&dir_action=navigate&destination=" + lat_lon);
break;
case 'Apple Maps':
app.launch("http://maps.apple.com/?dirflg=d&daddr=" + lat_lon);
break;
case 'Waze':
app.launch("https://waze.com/ul?ll=" + lat_lon + "&navigate=yes");
break;
}
})
.open();
```
Contributor guide
Assessment
This issue has not been assessed yet.