How do you specify an image for WideTile on the Windows Phone when using Cordova?
Unfortunately, this option [Wide Live Tile] is not supported at present time. I'll create a feature request for WP8 and WP7.8. Most likely updated version of LiveTiles plugin will be landed to the following place
https://github.com/apache/incubator-cordova-wp8/tree/master/plugins/www/plugins/LiveTiles
UPDATE
Updated version could be found here
https://github.com/sgrebnov/incubator-cordova-wp8/tree/master/plugins/www/plugins/LiveTiles
Sample usage
navigator.plugins.liveTiles.updateAppTile(success, fail, {
title: document.getElementById('title').value,
image: 'Images/appbar.next.rest.png',
count: document.getElementById('count').value,
backTitle: 'Back title',
backContent: 'Back side',
backImage: 'Images/appbar.close.rest.png',
smallImage: 'Images/appbar.save.rest.png',
wideContent: 'This is wide content',
wideImage: 'Images/appbar.stop.rest.png',
wideBackImage: 'Images/appbar.feature.video.rest.png'
});
Related
I'm using the stageBlock method and the onProgress callback. I thought I had this working when I wrote this 9 months ago but I'm doubting myself now. The progress update is showing "loadedBytes" and it does not resemble what is actually going over the network. onProgress reports as all bytes "loaded" while the browser is still uploading the file via a network request. How do you monitor the network bytes while using this azure method?
await blockBlobClient.stageBlock(blockId, chunk, chunk.size, {
onProgress: e => {
console.log('onProgress loadedBytes: ' + e.loadedBytes);
},
abortSignal: abortControllerRef.current.signal,
});
I'm using version 12.1.1 of azure nodejs package...
I have just upgraded to version 12.3.0 and still have the same problem.
Edit
I have created a small repro here: https://github.com/philwindsor/az-progress-bug
Its a react app, clone it and run yarn install then yarn run.
Gif of problem:
I ended up raising an issue on github: https://github.com/Azure/azure-sdk-for-js/issues/13161 which I have now closed.
Turns out our company virus scanner (sohpos) is the cause of the problem. Once disabled the problem goes away!
I have a bot client and in which I have enabled speech functionality.
Everything works fine when I open the bot client in new window.
Recently we have added this bot client site url in a page as IFrame.
In this all the functionalities are working fine except speech functionality.
When we are clicking on microphone icon nothing is happening.
Have tried in multiple browsers and devices, same issue in all the devices.
Windows - Chrome, IE
IPad,
IPhone
Is it the expected behavior? or Do i need to update anything?
Please let me know if you want me to share any code.
Code.
speechOptions = {
speechRecognizer: new CognitiveServices.SpeechRecognizer({
subscriptionKey:
'xxx'
}),
speechSynthesizer: new CognitiveServices.SpeechSynthesizer({
gender: CognitiveServices.SynthesisGender.Female,
subscriptionKey: 'xxx'
voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, ZiraRUS)'
})
};
BotChat.App({
botConnection: botConnection,
user: { id: model.userId, Username: LoginUser,},
bot: { id: model.botId, name: model.botName },
resize: 'window',
speechOptions: speechOptions,
locale: 'en',
sendTypingIndicator: true
}, document.getElementById('BotChatElement'));
botConnection
.postActivity({
from: user,
name: 'requestWelcomeDialog',
type: 'event',
value: ''
})
.subscribe(function (id) {
console.log('"trigger requestWelcomeDialog" sent');
});
There's a few things you need to do in order to get speech working with WebChat.
Ensure that you are not using the version of WebChat with the embed code from the Azure Portal. You must use one of the WebChat bundles (use one of the es5 bundles if you want it to work in IE)
Speech Services are not supported on many version of major browsers. Ensure that you and your users are only using supported browsers or use Bing Speech
Chrome (and likely in the future, other browsers) blocks microphone access until certain interactions occur first on the page/iFrame. You should be able to get around this with <iframe allow="microphone *">
I am working on a nativescript app for android and ios in which I have used REST APIs to store/get data in JSON format.
Based on JSON result from APIs sometime I need to show alert to the user.
It was working fine with Nativescript 4.1 but since I have upgraded to 4.2 app is unable to show alert boxs in ios. It shows the blank page and shows the following error.
(UIKitCore) Warning: Attempt to present <UIAlertController: 0x7fb5834eb000> on <UIViewControllerImpl: 0x7fb58659a670> whose view is not in the window hierarchy!
I have suspected that I am calling alert too early so I have tried to add timeout before alert but still it's the same.
if (result.status === 'E') {
setTimeout(function () {
const alertOptions = { title: 'Error', message: result.errMsg, okButtonText: 'OK', cancelable: false };
dialogs.alert(alertOptions).then(() => {
resolve('Error');
});
}, 700);
Points to note here is I am using nativescript-autocomplete component in one of my tabs. and this problem occurs only when user searches something using that component.
So it could be something related to that component.May be when autocomplete closes the modal, app looses the parent reference ?
Found an interim solution for now.
nativescript-fancyalert works like a charm. Will stick with that for sometime.
It is based on SCLAlertView for ios.
Use Case: Choose image from Gallery and execute callbacks
Issue: Redirection to Home screen of the app after image selection from Gallery.
Getting image from Camera works:
navigator.camera.getPicture(function() {
console.log('success');
},function() {
console.log('failure');
} , {
destinationType: Camera.DestinationType.DATA_URL
});
Choosing image from Gallery redirects to the homescreen
navigator.camera.getPicture(function() {
console.log('success');
},function() {
console.log('failure');
} , {
destinationType: navigator.camera.DestinationType.FILE_URI,
sourceType: navigator.camera.PictureSourceType.SAVEDPHOTOALBUM
});
The code is fairly simple and is mentioned at many places to give an example of how to choose image from Gallery. This code doesn't work on any screen other than the home screen of App. Also, no errors are reported before redirection.
The following code also results in redirection to the homescreen after image selection.
<input type="file" name="">
Configuration:
Device: Windows Lumia 535
Device OS Version: 8.1
Cordova: 6.1.1
Cordova plugin camera: 2.2.0
Wasn't able to stop the page navigation, unless on the first page of the app(without query parameters). Later, transformed the app to single page application thus avoiding this issue.
Issue can be tracked at https://issues.apache.org/jira/browse/CB-11295
I'm having trouble getting angularjs working on windows phone 7 with phonegap. The simple stiff works, but as soon as I try to add page include or a view (route) it doesn't do anything. In the function matchUrl(url,obj) in angular.js (1.0.3) there is a regex that fails because Windows Phone use an unusual URL format.
What happens is angular is expecting a url like 'http://localhost/www/index.html' but in windows phone it will look like: 'x-wmapp0:app/www/index.html' instead.
Has anyone run across this and is there a solution?
This issue is as of now still unresolved and tracked here
https://github.com/angular/angular.js/issues/2303
EDIT:
The mentioned issue is still open although fix was submitted.
I managed to get a basic angular app running in phonegap WP7 by
applying the mentioned fix
including jquery (2.0.3) above angular.js
changing line of code in angular from
var xhr = new XHR();
to
var xhr = new XMLHttpRequest();
manually bootstrapping angular app after cordova deviceready event fired
I reported it here
Using angularjs-1.1.5 and changing line 5612 with
var SERVER_MATCH = /^([^:]+):[\/\/]*(\w+:{0,1}\w*#)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,
should fix the problem