How can I call Waze App from codename in IOS devices - codenameone

I wrote a CodeNameOne Mobile App that launches "Waze App" and starts a visual navigation that helps our users (health professionals) reach at houses of their respective patients.
This App works fine in Android devices.
I simply call "Display.getInstance().execute(url)" method and all done. (Great!!!).
But , in iOS devices, this feature doesn't work.
I expected the same code should work on all platforms.
For iOS devices do I need to do some specific code or configuration?
Any help will be appreciated.
Thanks

I suggest trying this URL:
waze://?q=123%20main%20st%20San%20Jose%20California
Found it on the Waze developer website.
Display.execute should work if you want to explicitly invoke Waze but you should probably use canExecute to make sure it's available (notice that canExecute returns Boolean and NOT boolean as it has 3 modes).
Assuming you just want to navigate somewhere you can just call openNativeNavigationApp.

Related

restrict a web browser from streaming or downloading a file in Windows Phone 7

I am developing an app which is using a web browser control. In this app I want to restrict all streaming and downloading processes using web browser.
For example, if I click on a song link and if that leads to streaming and playing of that song in the web browser itself, I want to restrict such activity.
Is this possible?
Handle Navigating event of the browser. In the handler check the Uri, if you don't like it you can cancel the navigation.
This approach is not actually very reliable, and definitely should not be used for anything security-related.
It may or may not work for you.
OK, plan “B”.
You can handle browser’s Navigated event, in this event call browser.InvokeScript( "eval", JavaScriptSource ); where JavaScriptSource is the JavaScript code that alters the behavior of your target web site however you want.
The downside of this approach — your JS will likely stop working as soon as the web site owner change their JS to incompatible. If you’re the web site owner, you’re fine with that.

Integrating mobile app and mobile web

Currently I am developing an app in corona sdk. It is still very early in the development stage so I can change the IDE or SDK if needed to achieve my goal.
I wish to create an app that can be played on multiple platforms(mainly ios and android) and I eventually want the users to be able to use the browser to continue playing at home with their progress saved. It is a simple app and could probably be recreated in html. They will have to login their accounts in order to play
How do i go about to achieve this? Should I complete my app in corona first, and then recreate the app in html and php and link the database to it separately or is there a specific development kit I could use that has this ability. Also, I am new to the development scene, how do I detect if the user is logged in a particular platform as I realize if they are logged in, in multiple places and give multiple entries it may cause problems.
If you are new to the development scene then you should continue developing with Corona.
Corona doesn't povide any web port but I know Unity does.
I think first you should complete your game for mobile platforms and if it will have success you can port it to web.
You can read this:
http://www.graphic-buffet.com/2012/06/indie-game-development-where-start/
You might want to try phonegap (http://phonegap.com/). I have never used it, I just know that it exists, so do some research to see if it would be a good fit. This might allow you to create the app once for both browsers and mobile.

Demo Glassware via screenshare

I have built a demo application that I want to demo to a room of people. How do I go about sharing my google glass screen with the audience? I saw that in Google I/O, engineers were using something to share their screen with the audience, how do I get that?
The MyGlass Android app has a feature called "screencast" - if, for example, you set up a Nexus 10 with MyGlass, you can then use the mini-HDMI out to project the screencast to a large audience (I'm not sure how you'd hook other Android devices up to a projects, but I know this Nexus 10 method works).
You can find the screencast function at the bottom of the main drop-down menu in the MyGlass home screen.
I would turn debug mode to "on" in my Glass settings and then use Android Screencast to display the view from Glass on my computer screen. From there I could use a projector or external monitor for demoing purposes.
There is also a cool jar that I found called droidAtScreen which uses ADB to render whats showing on the glass onto a GUI; no setup required, easy to use.

Prompt user to install/view app on mobile site

Does there exist some kind of plugin or lightweight method of determining whether
A. A user is using a mobile device
B. The user has a particular app
C. The user does not have a particular app.
And depending on what criteria the user satisfies, display a prompt (modal, overlay, pop-up) that allows the user to view the app (if installed) or to install it (if they do not have it installed).
I realize "A" can be achieved by using media queries but I am not sure how to configure the others.
I've seen this done on many many sites so I know that it is not uncommon (view screenshot). Ideally I just want to implement some quick solution. I'm looking for something similar to "Hello Bar" for mobile only, I suppose.
Any help will be appreciated.
Example: http://i.imgur.com/VkWKu.png (the prompt at the top of the browser)
I ended up finding this:
http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
Which is exactly what I was looking for and will work in tandem with the other solutions.
I would try this approach if you really need to know if a user has your app installed.
When your app is installed and first run have it create a cookie. The only thing you have to remember to use is the CookieSyncManager because the set Cookies are stored in RAM and not storage, CookieSyncManager will sync these two.
CookieSyncManager.createInstance(context)
CookieSyncManager.getInstance().sync()
Once you've set the cookie you can then read the Cookie with the website, if its there show popup etc. Oh and only show this popup only if its a mobile device: http://www.quirksmode.org/js/detect.html
Android Developer On CookieSyncManager: http://developer.android.com/reference/android/webkit/CookieSyncManager.html
Bolg Post Explaining the Usage of the CookieSyncManager:
http://blog.tacticalnuclearstrike.com/2010/05/using-cookiesyncmanager/
I know how to do this with android not iOS or Windows...
There's no standard way to do this.
See the end of this post: http://blogs.msdn.com/b/ieinternals/archive/2011/07/14/url-protocols-application-protocols-and-asynchronous-pluggable-protocols-oh-my.aspx for one mechanism available to JavaScript in IE10.
IE10's Metro environment offers this: http://blogs.msdn.com/b/ie/archive/2011/10/20/connect-your-web-site-to-your-windows-8-app.aspx but I don't think that exists for the mobile browser.

Silverlight Notification API in-browser

I'd like to use the Notification API to create toast notifications for a Silverlight app designed to run both in and out of the browser, but the NotificationWindow class is only available OOB.
Does there exist anything that can replicate the behaviour inside the app? My idea is to have a container in the bottom right of the screen overlaying all other content. Then, create a wrapper which detects OOB-mode, passing params to the Notification API if possible, or populating and showing my own container if not. Is there anything that does this available?
It seems strange that MS chose not to implement something like this, as has been pointed out before.
Displaying a notification in browser is simple. You just need to use a popup and make it appear in the right place. See the following post as an example.
Now the difference with that approach is that the notification will show inside the browser. In OOB it shows outside the window and it's visible even if the windows is minimized. Due to security reasons it's not possible to directly do this.
Out of interest, Chrome Applications like Tweetdeck and Gmail, are able to display notifications outside of the browser. I think this might be a possiblity, but not exactly a Silverlight and cross browser solution.

Resources