How to disable lex-web-ui microphone? - amazon-lex

I followed this tutorial in setting up lex bot: https://aws.amazon.com/blogs/machine-learning/deploy-a-web-ui-for-your-chatbot/
How do I disable the microphone
I've tried modifying the lex-web-ui.js file but it keeps reverting to original versions. (I've updated the version in S3 stack)
Thank you

In lex-web-ui.loader.min.js remove ,a.setAttribute("allow","microphone"). When updated, set public read only access.
Ensure that the code refers to updated file. In broswer script, add above where the chatbot is loaded.

Related

How to write text into the file saved on server in swift3 iOS

I am trying to write some text to the file on Server. Text file server path is:
http://test.info.com/log.txt
So, whatever we will write on this text file can able to see in browser. Please anyone suggest me.
In one word, There is no on the fly write possible from mobile to server file.
Justification:
Question:
What's happen if I paste the logfile URL(http://test.info.com/log.txt)
into the browser?
Answer:
It will just download the log.txt file. Also, It will not allow doing
direct editing in the browser too. If it will is not feasible from the browser So how can we do it from the mobile end?
Alternatives:
Recently I worked with the same type of requirements. I have achieved it by creating the local log.txt file. Write into this file. Every day, I have uploaded the same log file into the server.
To write into the log file, I have used SwiftLog(Simple and easy logging in Swift)
You need to create 2 APIs on the server where your text file is kept. One API to get the data of the text file. Once that is done, show it in a TextView and edit it.
After editing, you can call another api to send the updated data back to the server.

Is “NSObjCMessageLoggingEnabled” still alive?

I’m trying to see how NSObjCMessageLoggingEnabled log looks like.
I created a new single-view iOS project, set NSObjCMessageLoggingEnabled to YES:
And after running an app, viewed AppData/tmp folder inside an app’s folder:
There’re no files.
How to check if this variable is still working, or which possibility can be used now?
UPD:
As is said in the link provided by #SaurabhJain, the logging is possible only on Simulator.
I've tried it, and while there still weren't files in ~/Library/Developer/CoreSimulator/Devices/(SIMULATORID)/data/Containers/Data/Application/(APPLICATIONID), there was file like launches.2019-04-05.17.15.02.log in /tmp. But this file was created also when NSObjCMessageLoggingEnabled was NO, and it's content is about the same: I don't see the names of functions called.
So I can't make it work even in Simulator.

Write files changes made when opening file through windows explorer in a mapped drive

I'm implementing a WebDAV file server using the ITHit WebDave engine, i have the following problem
When i list the files and open one of them i get the ReadAsync method called, i provide the content and the file is opened correctly
However any changes i make to the file can't be saved, i get an error saying
A device attached to the system is not working
I looked at the file system samples and implemented support based on the FileSystemStorage.AspNetCore sample,
From what can understand the WriteAsync method is used when creating new files, should i expect for WriteAsync to also be called for file edits that need to be changed?
Am i wrong in the assumption that DavFile.WriteAsync will be called with a stream for the updated content?
If WriteAsync is not the right location to save updates to a file, could you provide some guidance on the process of saving changes to existing files?
Edited to add:
Now i can see that after i dismiss the first error about the device not working i get the standard save dialog box, if i click save it asks me if i want to overwrite the existing file, after accepting to overwrite then WriteAsync is called and i can update the file contents
I'm not quite sure why it would first tell me there's an error and then still allow me to write the file but only as replacement to the original file
Thanks for your help
Fixed, i found that there were issues with the ILockAsync implementation, reviewing the FileSystemStorage sample helped fix the issue with locking files before writing or updating properties

react-native-fetch-blob IOS API openDocument not working

I require showing applications in the IOS device capable of opening various file formats.I tried using react native share to achieve the same but options of copying file to other apps did not appear.So i tried using react native fetch blob. RNFetchBlob.fs.exists(fs.dirs.DocumentDir+'/sample.pdf') return true , meaning the file does exist but when i use RNFetchBlob.ios.openDocument(fs.dirs.DocumentDir+'/sample.pdf') nothing happens, not even an error but rather the success callback is called. Appreciate any help.
I was able to resolve the issue , but i don't know why it actually happened in the first place. I used an Alert.alert to find if the file existed or not and then called the RNFetchBlob.ios.openDocument function, upon removing the alert just before the function call it started working.Posting this answer incase it does happen to anyone else.

Config file to change values within an app

I'm having a problem meeting a requirement for an Java app I'm developing. My client must be able to deploy the app to multiple BES servers without the need to resign the code (or have any interaction with the developers). Currently the web address of one of their BES servers is hard coded into the app but they require the ability to change this value at will prior to deployment. (it can be assumed they will administrate any BES server the app is deployed from)
I've tried attaching a text file to the project which is read by the app but this is packaged along with the app, meaning it can't be manually edited (as far as I'm aware), I've also tried having a custom property in the JAD file but this needs resigned after any change.
Am I doing any of these approaches wrong or is there a better solution I'm missing?
Also, is it possible to deploy a simple text file to a BlackBerry via the BES to a specific file location? If so I could have my app read this file which would solve the problem?
Thanks,
Implement custom attachment handler in your application.
And send email with an attached xml-config file to BlackBerry device.
User opens the received message and selects the custom menu item provided by attachment handler.
And you can parse this xml config and act accordingly.
An easier way is to use a user defined ItPolicy to provide the configuration information you need.

Resources