Disable branch.io smart banner for non-ios and non-android platforms? - branch.io

Is there a way to disable branch.io smart banner for all non-ios and non-android platforms?
For eg. disabling smart banner for windows, blackberry etc.

Alex from Branch.io here: sure is! Take a look at the parameters here.
branch.banner({
icon: 'http://icons.iconarchive.com/icons/wineass/ios7-redesign/512/Appstore-icon.png',
title: 'Branch Demo App',
description: 'The Branch demo app!',
rating: 5, // Displays a star rating out of 5. Supports half stars through increments of .5
reviewCount: 1500, // Amount of reviews your app has received next to the star rating
openAppButtonText: 'Open', // Text to show on button if the user has the app installed
downloadAppButtonText: 'Download', // Text to show on button if the user does not have the app installed
sendLinkText: 'Send Link', // Text to show on desktop button to allow users to text themselves the app
phonePreviewText: '+44 9999-9999', // The default phone placeholder is a US format number, localize the placeholder number with a custom placeholder with this option
showiOS: true, // Should the banner be shown on iOS devices (both iPhones and iPads)?
showiPad: true, // Should the banner be shown on iPads (this overrides showiOS)?
showAndroid: true, // Should the banner be shown on Android devices?
showBlackberry: true, // Should the banner be shown on Blackberry devices?
showWindowsPhone: true, // Should the banner be shown on Windows Phone devices?
showKindle: true, // Should the banner be shown on Kindle devices?
showDesktop: true, // Should the banner be shown on desktop devices?
iframe: true, // Show banner in an iframe, recomended to isolate Branch banner CSS
disableHide: false, // Should the user have the ability to hide the banner? (show's X on left side)
forgetHide: false, // Should we show the banner after the user closes it? Can be set to true, or an integer to show again after X days
respectDNT: false, // Should we skip showing the banner when a user's settings show 'Do Not Track'?
mobileSticky: false, // Determines whether the mobile banner will be set `position: fixed;` (sticky) or `position: absolute;`, defaults to false *this property only applies when the banner position is 'top'
desktopSticky: true, // Determines whether the desktop banner will be set `position: fixed;` (sticky) or `position: absolute;`, defaults to true *this property only applies when the banner position is 'top'
make_new_link: false, // Should the banner create a new link, even if a link already exists?
open_app: false, // Should the banner try to open the app passively (without the user actively clicking) on load?
}, {
tags: ['tag1', 'tag2'],
feature: 'dashboard',
stage: 'new user',
data: {
mydata: 'something',
foo: 'bar',
'$deeplink_path': 'open/item/1234'
}
});

Related

How to receive audio/video without accepting the autorequest popup in WebRTC?

I want to receive audio/video without accepting the permission that browser asks to access mic/cam. Is it possible?
I'm using SimpleWebRTC, my code is here:
// create our webrtc connection
var webrtc = new SimpleWebRTC({
// the id/element dom element that will hold "our" video
localVideoEl: 'localVideo',
// the id/element dom element that will hold remote videos
remoteVideosEl: '',
// immediately ask for camera access
autoRequestMedia: true,
debug: false,
detectSpeakingEvents: true,
autoAdjustMic: false,
media: {
video: {
frameRate: {
max: 30
},
width: {
max: 176
},
height: {
max: 144
}
},
audio: true
},
});
If I delete this => autoRequestMedia: true or change it to false, so it doesn't ask to get permission and the result is NOTHING
:(
If I leave this => autoRequestMedia: true to be true, so the browser asks to get permission,
2-1: if I don't accept, the result is NOTHING :(
2-2: if I accept, it works :)
So my problem is how I can receive(not send) data(audio/video) without accepting that permission popup or even set that autoRequestMedia to false and receive data?
Thanks
This is a browser restriction. Otherwise any application could open your devices silently in the background and listen for you.
However it is possible to call getUserMedia() only once at your app start (this is where the popups appears) and reuse that onward everywhere thus preventing any additional popups at incoming audio/video.

Can I receive video without giving permission to browser to use my camera in SimpleWebRTC?

Does SimpleWebRTC has this feature to get data(video/audio) without giving permission to browser to use my camera/microphone?
// create our webrtc connection
var webrtc = new SimpleWebRTC({
// the id/element dom element that will hold "our" video
localVideoEl: 'localVideo',
// the id/element dom element that will hold remote videos
remoteVideosEl: '',
// immediately ask for camera access
**autoRequestMedia: true,**
debug: true,
detectSpeakingEvents: true,
autoAdjustMic: false,
media: {
video: false,
**audio: true**
},
});
When I change those parts surrounded by asterisks to true it works, otherwise it doesn't.
Have you tried setting autoRequestMedia to true and while having both video and audio of the media object set to false? You should receive the readyToCall event and can join the room as shown on the simplewebrtc homepage.
First negotiate (accept the call/join the room) with video and audio and then disable the video, somehting like webrtc.videoStreams.disable()

Difference between Enplug SDK web extension URLs?

I'm using the Enplug SDK web extension to create an app to show digital menus from DSMenu on screens using Enplug. I'm using AngularJS on my config page.
I'm confused about the relationship between the "Configure Url" setting in the back-end from this guide, and the Value.Url in the payload from this tutorial.
Configure URL
Value.Url
$scope.page = {
Value: {
ShowContent: 'url', // Show Content is used to hide/show the Url or Html form field based on the selection.
Url: '', // The Url the web page back-end uses to display the content.
Html: '', // If applicable, used to show custom HTML. Cannot be used in conjunction with the Url.
ShowMobileWebsite: false, //Only applies if OverrideUserAgent is true, False = Show Desktop Website, True = Show Mobile Website
OverrideUserAgent: false, //False = Use android's best fit. True = Use the value of ShowMobileWebsite
ShowDelay: 0, //Custom delay between displaying the page after it's been loaded.
RefreshInterval: 0, // Custom refresh interval rate in X seconds.
AllowJavascript: true, // Set to true by default, allows Javascript to be executed on the page.
Username: '', // Username option, would need to write script passing in credentials.
Password: '', // Password option, would need to write script passing in credentials.
Token: '', // Token option, would need to wrtie script passing in credentials.
JavascriptOnload: '' // Custom JS to be executed once the page loads, can be used to log into authenticated pages.
}
};
I created a page http://www.dsmenu.com/con-enplug-display.php and each app will have a custom URL to show the menu like http://www.dsmenu.com/uph/204. Where do I put each?
The 'Configure Url' is the link to the configuration page which will be displayed to the end user on Enplugs web dashboard, in your example http://www.dsmenu.com/con-enplug-display.php
The Value.Url is the link to the web app that will be shown publicly on the screen in the venue. In your case http://www.dsmenu.com/uph/204

iscroll: image carousel like App Store

We are working on a mobile web application. The designer likes the image carousel effect on App Store (the screenshots of the an App). So we try to mimic the same effect using JavaScript.
We are using iScroll to implement. So here is a customization of its demo carousel: http://jsfiddle.net/0t9savgj/. The options are:
{
scrollX: true,
scrollY: false,
momentum: false,
snap: true,
snapSpeed: 400,
keyBindings: true,
indicators: {
el: document.getElementById('indicator'),
resize: false
}
});
The problem is: for the last image, there is always some extra space, which is unwanted:
Does any one knows how to solve this? Or some other JS libraries implementing the same carousel? Thanks.
After exploration, the only way is to use the scroll event of iscroll-probe.js. Manually stop the scrolling when reaching the right border. But the indicators are not exact.

Sencha Touch: dialing phone number from sencha application

We created a telephone directory Sencha touch mobile application for our company. We have a requirement to dial a employee by tapping the phone number in the employee details screen which should trigger dialing the phone. To achieve the same we used the code highlighted in green color which works in iOS and Andorid Icecream (Tested in older version of Samsung) but failing in Jellybean OS.
Can someone help us how to overcome this or what is the best way to make it work in all the devices.
Ext.Viewport.setActiveItem({ xtype: 'adminstaffdetailview', styleHtmlContent: true, html: adminStaffDetailsTemplate,
listeners: {
tap: function( tap, element ){
if(tap.delegatedTarget.id == 'rowPhoneTap'){
window.location = "wtai://wp/mc;[" + tap.delegatedTarget.innerText.trim() + "]";
}
},
element: 'element',
delegate: 'tr'
}});
Ext.Viewport.unmask();
}
Why not using a link with tel protocol instead of a window location to call ?
You need to set data to your tpl (phone_number)
Ext.Viewport.setActiveItem({
xtype: 'adminstaffdetailview',
styleHtmlContent: true,
tpl: ['call'], // your template adminStaffDetailsTemplate,
});