I have a website with a payment link like this: sumupmerchant://pay/1.0?affiliate-key=aa&app-id=bb&total=0¤cy=EUR&title=cc and when i open this URL in Google Chrome on my android device, it opens the app which is installed on the device. The Enterprise Browser doesn't open it (it shows a webpage not available error). Is there anyone who knows if it's possible to open another app from within the enterprise browser?
If it was possible to use the Chrome browser then i would but it's not possible since we have a webapp which needs this browser to make a connection with a Zebra printer.
Thank you in advance.
Pim
Is this Zebra's Enterprise Browser? If so, although you can't open apps by clicking on links there is an Intent API available and you could say something like this:
<script type="text/javascript" charset="utf-8" src="ebapi-modules.js"></script>
var params = {
intentType: EB.Intent.START_ACTIVITY,
action: 'pay',
appName: 'com.company.sumupmerchant',
data: {"afilliate_key":"aa", "app-id":"bb","total":"0","currency":"EUR","title":"cc"}
EB.Intent.send(params);
I'm not sure exactly how to launch your app via Intent, the above is just a guess. More on the Intent API at https://techdocs.zebra.com/enterprise-browser/2-5/api/Intent/
Related
I have a problem where I want to make my website when you first accessed through a mobile phone message to download the app or website.
What is needed? Can anyone help me solve my problem?
Javascript for example:
You can set a cookie.
<script>
var tehDiv = document.getElemenbyId('adiv');
if (localStorage.getItem('firstTime'){
theDiv.innerHTML='';
}else{
localStorage.setItem('firstTime', 'no');
theDiv.innerHTML='The html that shows download app buttons';
}
</script>
<body>
blablablabla
<div id="adiv">Here will be placed download buttons or not</div>
If need to know if is a mobile there are many scripts to that. For example this one: Detecting iOS / Android Operating system
I am using Corona to make an app. I have implemented following code to open a website/a page inside my app view instead of browser:
function openLink(event)
if(event.phase == "ended")then
print("btn clicked")
local webView = native.newWebView( display.contentCenterX, display.contentCenterY, 320, 480 )
webView:request( "http://www.coronalabs.com/" )
local text1 = display.newText("",100,100,native.systemFontBold,20)
text1.text = "native should come"
end
end
btn:addEventListener("touch", openLink)
Its giving me following error on device when button is tapped:
net::ERR_CACHE_MISS
Please help me out with this. Also, I have few questions regarding feasibility of this function.
Can I access full interactivity of website inside app view? i.e. scroll through pages, open other pages, navigate to other elements of website etc.
If I can't access complete website with ease, is there any possibility that I can open multiple pages one after another of same website on click of various buttons created by me inside app?
Any help is greatly appreciated.
The ERR_CACHE_MISS error comes from Chrome. To avoid it, check the following:
Make sure you can get to the URL from a browser on the mobile
device to ensure the issue isn't with your Internet connection.
Make sure that your build.settings file in your Corona app allows for Internet
permissions. For Android, this means including the following in build.settings:
-- Android permissions
androidPermissions = {
"android.permission.INTERNET",
},
I am trying to use a hardware serial device to change what displays on a webpage in Chrome. I'm making a Chrome extension to do so, however it seems as if I cannot use both the activeTab and serial permissions at the same time. The activeTab permission requires the app to not be a packaged app, and the serial permission requires the app to be packaged.
How can I get around this if possible?
I am using the page redder sample code as the way to change the webpage, however it requires the activeTab permission. Maybe there is a workaround to this? Thanks
The only way I can think of is to create one Chrome Extension and one Chrome App that communicates to each other: https://developer.chrome.com/extensions/messaging#external
// The ID of the extension we want to talk to.
var laserExtensionId = "abcdefghijklmnoabcdefhijklmnoabc";
// Make a simple request:
chrome.runtime.sendMessage(laserExtensionId, {getTargetData: true},
function(response) {
if (targetInRange(response.targetData))
chrome.runtime.sendMessage(laserExtensionId, {activateLasers: true});
});
// Start a long-running conversation:
var port = chrome.runtime.connect(laserExtensionId);
port.postMessage(...);
An alternative is to make a Native Messaging host that communicates with the device and with your extension.
From architectural point of view this makes more sense, but limits your deployment options, as the host program can't be bundled with the extension in the Web Store.
ChromeCast (google cast) can't find my app name.
I already registered the app in the whitelist.
I can find and launch apps/YouTube, apps/ChromeCast, apps/OldAppName,
but not apps/NewAppName.
Why so? How can I do any thing?
thanks a lot.
Sincoew
Hi Ali Naddaf,
Thanks you for your reply.
I already checked each step by your link again, My app ID is already in whitelist.
I used "//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"
in my receiver app.
but when I Invoke receiver use new app ID, It's return below Error on receiver source code.
(google default)enter code here
case Message.CODE.ERROR_NET_ABORTED:
return new Message(
Message.getLocaleString('BrainFreeze'),
Message.getLocaleString('Sorry'),
Message.getLocaleString('ActivityAborted'));
On ChromeCast "receiver/1.0/cast_receiver.js",
I can found my app use app ID, such as "192.168.xxx.xxx:8008/apps/AppID",
This rule is still can work???
Thanks a lot.
Sincoew
The error source code is in home screen,
http://192.168.xxx.xxx:9222/devtools/devtools.html?xxxxxx
"message.js" file,
This is ChromeCast default home screen source code
I use below receiver:
//github.com/googlecast/cast-custom-receiver/blob/master/sample_media_receiver.html
sender:
1 //github.com/googlecast/cast-sender-tool-chrome
2 our iOS app sender, (google sample)
ps. default app is normal work, YouTube/ChromeCast/old app-ID(version 1.0 js)
and I can found below page use browser,
"192.168.xxx.xxx:8008/apps/YouTube"
"192.168.xxx.xxx:8008/apps/Chromecast"
"192.168.xxx.xxx:8008/apps/old app-ID"
but can't found
"192.168.xxx.xxx:8008/apps/new app-ID"
Thanks a lot,
Sincoew
Most likely your device is not whitelisted. You need to register your chromecast device for your appid and then, follow the instructions in this post to troubleshoot. Also read the development site for chromecast; it has valuable info.
i wonder if and how it is possible to open a website inside a panel or in an external browser window of the mobile safari! I tried to open a website inside a panel but due to crossdomain problems only the htm without the css was loaded.
any ideas?
thnx!
edit: let's say, we use phoneGap
As far as I know, cross-domain issues do block you from IFRAME solutions for displaying external links inside your app.
Best solution currently is to have links include target="_blank" to force a new browser window to open.
#Stevanicus #Dalar It does open a new window in Mobile Safari if you use Phonegap and allowed domains using phonegap.plist whitelist property, but if you do somthing like
var rateMsg = Ext.Msg.confirm('Title', 'Some message', function(e) {
if(e == 'yes')//If user confirms yes
{
window.open("http://www.example.com", "_blank");//We open a link with _blank to use mobile safari and not your webview
}
});
It does not work.