You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Xiaolei Yu (JIRA)" <ji...@apache.org> on 2017/06/04 03:36:04 UTC

[jira] [Commented] (CB-12835) Add a Context getter in CordovaInterface

    [ https://issues.apache.org/jira/browse/CB-12835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036160#comment-16036160 ] 

Xiaolei Yu commented on CB-12835:
---------------------------------

Our app originally targets electron/node and has been ported to android. It is designed to run in background most of the time so we keep the webview instance within the service and only attach it to an activity for user interaction.
Some team members would like to have cordova integration (for its plugins) and I am working on a proof-of-concept.
I understand such use case is a niche so I am requesting some minimal changes.
If this goes through I will update CB-12623 to use the new method on CordovaInterface, otherwise both can be closed and I will have to return a dummy activity wrapping the service context.




> Add a Context getter in CordovaInterface
> ----------------------------------------
>
>                 Key: CB-12835
>                 URL: https://issues.apache.org/jira/browse/CB-12835
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-android
>    Affects Versions: 3.5.0
>            Reporter: Xiaolei Yu
>
> We use a WebView instance within an android Service and attach it to an activity view hierarchy when user interaction is required.
> Assuming cordova wants to support such use case a Context getter is needed in CordovaInterface for plugins that are accessing Context through getActivity() (such as the device plugin)
>  
> I originally created CB-12623 for the device plugin. After receiving comments I think it should be addressed here first.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org