will sencha-charts work without sencha-touch? - html

I have downloaded sancha touch-charts.If i want to host in my local host,I have to install sencha touch? will sencha-charts work without sencha-touch? how can I configure both in webserver?because sencha-charts is add-on of sencha-touch?

Yes, Touch Charts is an addon for Sencha Touch and requires you load sencha-touch.js before loading touch-charts.js. When you download the Touch Charts beta, Sencha Touch is included in the download and the examples provide everything you need to get started.

Related

How to open my electron program when a link (like myprogram://a/a) is clicked in a web browser

I want to transfer information from my website to my electron program by using a link that has some data in it (like myprogram://data). But can't seem to find any info on the internet about this. Any help would be gladly appreciated.
Thanks!
You need to register your app as a protocol handler using app.setAsDefaultProtocolClient
app.setAsDefaultProtocolClient("myprogram")
On Windows, when the "myprogram://data" link is clicked, a new instance of your application will be launched and the arguments will be included in process.argv
Use app.requestSingleInstanceLock if you don't want multiple instances of your app to be running
On macOS, you can get the arguments using the open-url event

Agora.io: android.permission.CAMERA not compatible with Oculus device

I'm developing an VR Video Chat application using Agora.io api and Unity3D Engine, in which a main user streams his webcam from a standalone Pc to users equippped with an Oculus device.
As soon as I try to upload the VR app to the Oculus Server, I got that error:
This app uses permission(s) that are not compatible with this device: android.permission.CAMERA.
How do I overcome that issue?
Any suggestions?
I haven't programmed for Oculus yet but here are some ideas:
First you may try just to set android:required=“false” in the manifest to see what happens?
Secondly check the official Oculus documentation here to see if helps? https://developer.oculus.com/blog/tech-note-android-plugins-and-permissions/?locale=en_US
"You will need to modify your Android Manifest file. Because the Oculus Quest doesn’t have cameras (well, none that can be used for this demo) we will get rid of the camera use requirement ( ) located on line 9 in the folder Assets/Plugins/Android/AgoraRtcEngineKit.plugin "
This is a quote from this quick start tutorial which will get you up and running with Agora.io Video chat and Oculus Quest. It explains how to stream your webcam from a standalone PC to Oculus Quest. https://medium.com/#jake_agora.io/live-realtime-video-to-vr-oculus-quest-6bbb74e4fc63
Just in case anyone else falls into this. The solution posted where you remove the entry from the Agora included manifest doesn't work anymore, and I can't identify where its being added from, perhaps Agora can post a solution. The only way around it is to export from Unity, edit the Manifest to remove the unwanted camera permissions and then build in Android Studio.

IsolatedStorage in MvvmCross

I am creating an Android App using MvvmCross.
Before calling some service,I want my MvxActivity should first check app's isolated
storage whether that data is present in its isolatedStorage, if it is then it should
populate its UI controls(eg. ListView,Spinner etc.)by fetching data from
isojatedstorage otherwise call service and then populate them using data received from service.
How can i achieve this?
You can use File plugin for MvvmCross
https://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-plugins#file
Another option is to use that plugin for Android (i didnt dig to deep inside), but for Windows Phone i had used this solution for downloading/storing images and here is my own lib for storing any text data in the isostorage (serialization/deserailzation is included).
I use PCLStorage, it's cross platform. Just search for it on NuGet.

mobile html5 launch phone's native navigation app

I'm developing a phonegap/cordova app. Is there a way to open a phone's native navigation app within the browser view? Or is there a best practice on opening native map applications from html5 apps? Or are they all platform specific?
I've read some places that the following works for certain versions of Android
<a href="geo:some address here" />Navigate to here</a>
and that this works for iOS
Directions
I'm amazed that Phonegap hasn't implemented something like this.
You can open the native navigation app on iOS 5 (Google Maps) and iOS 6 (Apple Maps) by using the magic "maps:" protocol, e.g. window.location = "maps:daddr=50.4,-4.5"
But to launch the native Google Navigator app on Android you need to use a phonegap plugin. I wrote this one for my own purposes.
Update
The plugin has now been updated for Phonegap 3.x and supports Android, iOS and Windows Phone, including an option to prefer Google Maps on iOS.
The plugin is here: https://github.com/dpa99c/phonegap-launch-navigator
The plugin is great! Thanks for sharing!
I tried it in my app but unfortunately I have Phonegap version 3.x and your plugin is only working for Phonegap 2.x :(
So in order to get it working on Phonegap 3.x I got the plugin from your github repo and made some changes so that it works for 3.x
The modified PhoneNavigator Plugin for Phonegap 3.x can be downloaded from my github repo:
https://github.com/viktor0710/PhoneNavigator-Phonegap-3.x.git
How to integrate it in your Phonegap 3.x project:
Open a console window
Go to your Phonegap app root
Then execute: phonegap local plugin add https://github.com/viktor0710/PhoneNavigator-Phonegap-3.x.git
Copy "phonenavigator.js" from the repo (www/phonenavigator.js) in your app (ex: yourapp/www)
include "phonenavigator.js" in you app:
Copy "cordova.js" from the repo (www/cordova.js) in your app (ex: yourapp/www)
include "cordova.js" in you app:
How to use it:
//function declaration
function navigateTo (lat, lon, successFn, errorFn) {
cordova.require('cordova/plugin/phonenavigator').doNavigate(lat, lon, successFn, errorFn);
}
//set lat and lon variables. Most probably read them from the UI
var latitude = 48.137607;
var longitude = 11.568569;
//call function
navigateTo(
latitude,
longitude,
function(){
console.log("Successfully opened navigator");
},
function(){
console.log("Error opening navigator");
}
);
As mentioned above, the following works on Galaxy S4 Android (just tested it), to bring up the Google Maps/Navigation app and waze:
Wikimedia Headquarters
Credit: http://en.wikipedia.org/wiki/Geo_URI#Example
Please also see the answer here: https://stackoverflow.com/a/19765368/2728686
For the record, if someone find this thread by looking on Google like I did, it worked for me directly, working with Ionic framework, by doing two things :
In the myapp.config(...) of your app add
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|geo):/);
(dont forget to add $compileProvider as a dependency)
In the config.xml, add the line
<access origin="geo:*" launch-external="yes"/>
That's all.
Cordova 3.6.0 introduces a second whitelist, for restricting which URLs are allowed to launch external applications. In previous versions of Cordova, all non-http URLs, such as mailto:, geo:, sms: and intent, were implicitly allowed to be the target of an a tag. Because of the potential for an application to leak information, if an XSS vulnerability allows an attacker to construct arbitrary links, these URLs must be whitelisted as well, starting in Cordova 3.6.0.
Cordova 3.6.0 Whitelist Guide
So you need to add explicitly in the config.xml:
<access origin="tel:*" launch-external="yes" />
<access origin="mailto:*" launch-external="yes" />

compiling HTML5 to .exe/.dmg

I am currently beginning a project where we want to build an Interactive Whiteboard (educational activities) and deploy via CD-ROM. I want to build the project in HTML5 for it's interactivity and then somehow compile it to both .exe. and .dmg so when the CD-ROM is inserted it autoplays the 'Game'.
How is this possible? Any help/advice would be greatly appreciated. Thank you.
I already made a project using pure C (WinAPI) on github that can pack HTML files into single EXE using resources.
http://github.com/dns/WinAPI-Embed-Browser/releases
Use: res://programname.exe/test.html as path to access html files from your EXE file.
From here you also can hide the window border & just showing the content of your HTML app, or even running on fullscreen. This is very useful if you want to make interactive CD-ROM.
On Mac, you can use Delphi/Lazarus TWebBrowser control to load html files. However I don't know if mac program can access files from resource or not.
HTML 5 is a browser technology, so I think as long as the pc you are installing on has the latest browsers, installing your app should work fine.
Can you tell us why you want it as a CD-ROM based installation, where as you can easily host it online?
You may not need any .exe wrapping. Here is an approach.
Important: your autorun will be often disabled, [not so] quietly. Provide some instructions for running your application manually.
So:
Google for running a portable version of Firefox or Chrome from a CD. Have the browser prepared. Put it in a [sub]directory representing your CD.
Put your content there.
Create a .cmd file to invoke the browser with a command like,
FirefoxPortable.exe index.html
Create autorun.inf (details googlable) to call the above batch file.
Make a CD image from that directory. There are lots of CD burning applications that can do that.
Test.