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

Joe Bowser commented on CB-5351:
--------------------------------

The majority of the hooks that we do have are directly related to the android 
lifecycle and intent handling (onPause, onResume, onNewIntent, onDestroy, 
onActivityResult), and WebView state (onReset).  The only other hooks that we 
have is onOverrideUrlLoading and remapUri, and the super powerful onMessage.  
We currently use onMessage to handle the existing Menu events, and we use 
postMessage to display the splashscreen, since the splashscreen has to live in 
the main activity since it needs to exist before everything else.

Basically, unless there's a really good reason for it to exist (i.e. Android 
Lifecycle stuff), we should try to keep using postMessage and onMessage.  
Having a new hook for every event that could ever possibly happen on an 
activity or a WebView will quickly become overkill, since we just need a way to 
pass objects to and from the core code and the plugins.

> Support context menu plugins with postMessage
> ---------------------------------------------
>
>                 Key: CB-5351
>                 URL: https://issues.apache.org/jira/browse/CB-5351
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>    Affects Versions: Master
>            Reporter: Abel MuiƱo
>            Assignee: Joe Bowser
>
> There is [support in 
> `CordovaActivity`|https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaActivity.java#L1006-L1026]
>  for menu plugins.
> It would be great to have the same support for context menus. Currently we 
> need to tell the user to [modify their class in a similar 
> way|https://github.com/amuino/cordova-actionsheet/blob/master/plugin.xml#L29-L50].



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to