-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding ofxAndroidLaunchBrowser(String url) to ofxAndroidUtils #1776
Adding ofxAndroidLaunchBrowser(String url) to ofxAndroidUtils #1776
Conversation
just as a btw, shouldn't |
that's also what I originally thought, just add another but, I think Android and iPhone code is being kept separately in their own addons for now. I wonder if that is always going to be the case, or if the plan is to someday pull their code into the core.... |
sure it is smart to keep the code where it is, but in the |
true. true. I can do that in a different branch and PR ... |
there's other functions like this that are called from the core, si it's ok to add it. also you can add it in this PR if it's easier for you |
yeah, I remembered that ofSoundStream and ofSoundPlayer already have Android/iOS stuff #defined in there... I'll add to this PR then. It will be easier to just check for "http://" in the url string inside ofLaunchBrowser. |
ok. I added Android/iOS support to I made some modifications to the code that checks for "http" or "https" in the string url of Tested on Android 2.3.4 and macosx 10.8 (to make sure I didn't break the desktop version). |
thank you! 2 things:
also, did you check on iOS, too? Otherwise we should get someone else (maybe @julapy?) to confirm that it works on the iphone. |
|
…works into feature-ofxAndroidLaunchBrowser
I'll revert the check in ofUtils.cpp to Poco::icompare(), then somewhere in the android code I'll add a special check for lowering the case of only http/https (probably in the java side). |
ok, i think it would be ok to do it on the c++ side though, even if most browsers support HTTP the correct is http |
I added the Poco::icompare() lines to that code a few months back to allow https and I think that @thiagohersan's One small addition -- I'd suggest a comment next to |
@arturoc cautioned in #1680 that
|
Good point @arturoc and @bilderbuchi -- |
what do you guys think of this? tested on Android 2.3.4 and macosx 10.8. |
Looks like a good solution to me. |
the same. |
…owser Adding ofxAndroidLaunchBrowser(String url) to ofxAndroidUtils
thanks thiago |
@thiagohersan @arturoc this addition causes the compiler to throw a ton of errors when trying to compile for IOS. In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8: I'll try to fix this so this function. But for the mean time I thik that this should be reverted. At least for iOS. PS: Here in the github comments system, How can I wrap a block of text so it's rendered like code? |
just put 4 spaces before each of the code lines going to take a look |
or put 3 "`" above and below the code block. or press the link in the comment box which says "GitHub Flavored Markdown" which is the helpfile for the syntax. |
This wasn't discussed as an issue... Sorry. I needed it, so it got implemented, and now I'm submitting it.
Similar to ofLaunchBrowser(string url) in ofUtils and ofxiPhoneLaunchBrowser(string url) in ofxiPhoneExtras.
Tested on an Android 2.3.4 device with SDK r21, NDK r8c and API 17.
I have a very simple example that I used for testing, that I can also submit with this PR.