You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Philip Abrahamson (Created) (JIRA)" <ji...@apache.org> on 2012/04/15 19:13:18 UTC
[jira] [Created] (CB-515) getIntent() needed in
CordovaInterface.java on Android
getIntent() needed in CordovaInterface.java on Android
------------------------------------------------------
Key: CB-515
URL: https://issues.apache.org/jira/browse/CB-515
Project: Apache Callback
Issue Type: Bug
Components: Android
Affects Versions: 1.6.0
Environment: Android
Reporter: Philip Abrahamson
Assignee: Joe Bowser
Fix For: 1.6.0
The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
The following patch fixes this issue:
--- a/framework/src/org/apache/cordova/api/CordovaInterface.java
+++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
@@ -143,5 +143,7 @@ public interface CordovaInterface {
public abstract Context getApplicationContext();
public abstract boolean isUrlWhiteListed(String source);
+
+ public abstract Intent getIntent();
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Philip Abrahamson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254374#comment-13254374 ]
Philip Abrahamson commented on CB-515:
--------------------------------------
Without this fix in place the build of the WebIntent plugin fails.
I should also mention if testing this with the plugin that it also requires the following change to the plugin javascript:
// following was removed in 1.0 (now in plugins.xml file)
//PluginManager.addService("WebIntent","com.borismus.webintent.WebIntent");
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Labels: android, patch, plugin
> Fix For: 1.6.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-515:
--------------------------------
Fix Version/s: (was: 1.6.0)
1.7.0
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Labels: android, patch, plugin
> Fix For: 1.7.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser updated CB-515:
--------------------------
Fix Version/s: (was: 1.7.0)
1.8.0
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Priority: Minor
> Labels: android, patch, plugin
> Fix For: 1.8.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser resolved CB-515.
---------------------------
Resolution: Incomplete
This patch is a victim of progress.
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Priority: Minor
> Labels: android, patch, plugin
> Fix For: 1.8.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser updated CB-515:
--------------------------
Priority: Minor (was: Major)
I wish JIRA had a priority between major and minor.
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Priority: Minor
> Labels: android, patch, plugin
> Fix For: 1.7.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Philip Abrahamson (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Philip Abrahamson updated CB-515:
---------------------------------
Attachment: WebIntent.diff
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Labels: android, patch, plugin
> Fix For: 1.6.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255146#comment-13255146 ]
Joe Bowser commented on CB-515:
-------------------------------
This may change in 1.8, so I'm not sure that there would be a lot of use putting it in to only have it be removed two weeks later. (We may go back to the old way of handling Contexts to reduce code complexity).
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Labels: android, patch, plugin
> Fix For: 1.7.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Simon MacDonald (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258359#comment-13258359 ]
Simon MacDonald commented on CB-515:
------------------------------------
In the mean time where you see:
this.ctx.getIntent()
replace it with:
((DroidGap)this.ctx).getIntent()
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Priority: Minor
> Labels: android, patch, plugin
> Fix For: 1.8.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-515) getIntent() needed in
CordovaInterface.java on Android
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271698#comment-13271698 ]
Joe Bowser commented on CB-515:
-------------------------------
This did change in 1.8. We no longer own the activity in every case, therefore you should not rely on it. Instead, you should do this:
((Activity)this.ctx).getIntent()
This removes a dependency on us having DroidGap available, and makes it dependent on the basic Android API not changing. I don't see Activity going away any time soon, so we should be good with this. Sorry about this.
> getIntent() needed in CordovaInterface.java on Android
> ------------------------------------------------------
>
> Key: CB-515
> URL: https://issues.apache.org/jira/browse/CB-515
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.6.0
> Environment: Android
> Reporter: Philip Abrahamson
> Assignee: Joe Bowser
> Priority: Minor
> Labels: android, patch, plugin
> Fix For: 1.8.0
>
> Attachments: WebIntent.diff
>
>
> The plugin "WebIntent" for Android stopped working sometime after 0.96 because the CordovaInterface.java file does not include getIntent(). This plugin is useful in particular because it allows users to call their android application from e.g. an email link, and parse any arguments passed to the application in the URL.
> The following patch fixes this issue:
> --- a/framework/src/org/apache/cordova/api/CordovaInterface.java
> +++ b/framework/src/org/apache/cordova/api/CordovaInterface.java
> @@ -143,5 +143,7 @@ public interface CordovaInterface {
> public abstract Context getApplicationContext();
>
> public abstract boolean isUrlWhiteListed(String source);
> +
> + public abstract Intent getIntent();
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira