Replies: 2 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
I'd probably use the config to append a user agent via I know you stated that you're not uploading to the google play store or the iOS app store, and thus don't care about the terms of service issues, but do understand that this is still exposing a vulnerability. If you have any embedded JS code, including code inside iframes and/or third-party code, it can gain access to the cordova environment and APIs. APIs will be mostly restricted to the plugins you have installed, but it can gain access to much more than what it is intended. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to make an APK version of my online game due to some user requests. My intent was to use Cordova to wrap the game pages on the website.
Background Info / Justification
I am wanting to go down the path of using remote pages because:
For the most part, the remote pages route seems to work, however, there are a couple issues in my current implementation that I would like to fix. To resolve them, I would like to be able to access cordova object on the remote page. The reasons are:
Text entry during fullscreen mode is not great as the system keyboard pops up over the game UI where text is being entered. The system back button is also hidden due to navigation disabled, so it's not clear to the user how to return to the game. Ideally, the viewport would adjust which would make this a non-issue, however, in my research it seems the non-adjusting viewport is an android fullscreen/seamless limitation and not the fault of cordova. So my thought here is that I would experiment with disabling fullscreen mode via AndroidFullScreen on the UI pages that require keyboard entry.
Using back button doesn't make much sense in this game, as pressing back would at best send the user back to somewhere they're not expecting, and at worst crash the app. (Pressing back button on some pages with captcha data entered sends user back to an expired page, thus generating a 'net::ERR_CACHE_MISS' which crashes the whole app.) Therefore, I would like to use the backbutton event listener to prevent back on pages it does not make sense to go back. I believe this requires cordova.js loaded
I have seen that previously, the method to accomplish this was via
cdvfile
but this appears to be going away / doesn't work properly.Question
So, that is a long way to ask, what is the best way to gain access to cordova from a remote page, that also doesn't break non-cordova clients? (IE, using regular web browser shouldn't try to load cordova.js)
Thank you,
-- Skye
Beta Was this translation helpful? Give feedback.
All reactions