nativescript

Upload File in Nativescript Webview with iframe

徘徊边缘 提交于 2019-12-02 04:10:01
My problem is I have one webview Containing Dynamic Form or form which is created dynamic with WP Builders and that is included in iframe and i want to select file from application in nativescript this will not allow me select file. So I want to try How to load files into webview in native script http://shripalsoni.com/blog/nativescript-webview-native-bi-directional-communication/ But problem is form is dynamic is there any script which will detect click event of file input inside frame and also put file path to it when file is selected if we can detect event for file input click. another

NativeScript WebView loading local resources in src document

我的梦境 提交于 2019-12-02 03:45:56
I am loading a local html file as the src for a NativeScript WebView component. Contained within the html file are script tags which reference javascript files that are also local resources (bundled within the app). The html file loads into the WebView just fine, but the referenced script file (mylib.js) does not. I suspect a pathing problem but I have tried almost every variation I can think of to no avail. My project is actually a NativeScript-Vue project and is as follows: App.vue <template> <Page @loaded="onPageLoaded"> <ActionBar title="Welcome to WebView"/> <GridLayout> <WebView ref=

Wiring up Google Maps Nativescript plugin with Angular 2

余生颓废 提交于 2019-12-02 01:08:44
I'm trying to use the Google Maps plugin for Nativescript ( https://github.com/dapriett/nativescript-google-maps-sdk ) with Angular 2 and the {N}-Angular router. I have it working in just Nativescript but once I add in Angular 2 and the router I'm failing to get the map to show up in the UI. Since a <Page> tag doesn't go into an Angular2 {N} component template, I can't use the xmlns:maps="nativescript-google-maps-sdk" namespace on the <Page> to instantiate the <maps:mapView> The {N} component basics page gives some guidance but it doesn't work in the ways I've tried: https://docs.nativescript

Load Local HTML/JavaScript/CSS Inside NativeScript App

送分小仙女□ 提交于 2019-12-02 00:41:25
With a NativeScript iOS and Android app using Angular, how do I load, inside of a WebView, a locally stored html file that has JS and CSS references? I am able to display the WebView but I get the error that the file is not found because I do not know where to point the src from my component. Currently I have the files inside src/assets and in there is the index.html Is there a more appropriate place to store these files within the app? Is there a better way to display this than a WebView? How do I reference this file as the source of a WebView? I will also be needing to know how to reference

Angular 2 do not refresh view after array push in ngOnInit promise

坚强是说给别人听的谎言 提交于 2019-12-01 15:14:10
I created a NativeScript app with angular 2, i have an array of objects that i expect to see in the frontend of the application. the behaviour is that if i push an object into the array directly inside the ngOnInit() it works, but if i create a promise in the ngOnInit() it doesn't work. here is the code: export class DashboardComponent { stories: Story[] = []; pushArray() { let story:Story = new Story(1,1,"ASD", "pushed"); this.stories.push(story); } ngOnInit() { this.pushArray(); //this is shown var promise = new Promise((resolve)=>{ resolve(42); console.log("promise hit"); }); promise.then(x

Integrate javascript module with native SDK

可紊 提交于 2019-12-01 14:04:49
I have a React Web Application running inside a WebView using Cordova. I need to integrate the javascript context with a third party native SDK. I have used JNI in the past that allowed communication from JAVA to C code. Is there something similar for Javascript to JAVA (Android) and to Objective-C / Swift (iOS)? My understanding is that we cannot simply develop a Cordova plugin since the "JNI-like" communication has to be in plain Javascript. That's because the integration with the native SDK is done by a third party script that we inject in our Cordova App. So now the QUESTION is: how can

Integrate javascript module with native SDK

左心房为你撑大大i 提交于 2019-12-01 12:31:34
问题 I have a React Web Application running inside a WebView using Cordova. I need to integrate the javascript context with a third party native SDK. I have used JNI in the past that allowed communication from JAVA to C code. Is there something similar for Javascript to JAVA (Android) and to Objective-C / Swift (iOS)? My understanding is that we cannot simply develop a Cordova plugin since the "JNI-like" communication has to be in plain Javascript. That's because the integration with the native

How to load files into webview in native script

谁说胖子不能爱 提交于 2019-12-01 12:30:46
I've been trying to figure out a way to get a local webpage content to load and set the webview html content in native script. I've successfully got it working on the simulator but it doesn't seem to work on the device. I've googled around and most people are saying that I need to locate my html files in the 'Documents' dir of my app, but as far as I can see there is no way to get the files I need there when I deploy the app. Can anyone else shed some light on the ways to get files located in the documents folder of the app on deploy or copying them there at runtime. Thank you var

How to load files into webview in native script

对着背影说爱祢 提交于 2019-12-01 10:17:26
问题 I've been trying to figure out a way to get a local webpage content to load and set the webview html content in native script. I've successfully got it working on the simulator but it doesn't seem to work on the device. I've googled around and most people are saying that I need to locate my html files in the 'Documents' dir of my app, but as far as I can see there is no way to get the files I need there when I deploy the app. Can anyone else shed some light on the ways to get files located in

How to use nativescript's WebView in angular2?

若如初见. 提交于 2019-12-01 09:40:44
I'm trying to insert a web-view on my page and listen the 'loadFinishedEvent'... But for do this, i need to find the webview in my component (ts file), through nativescript way i need to wrap my xml (UI) with a tag: <Page xmlns="http://schemas.nativescript.org/tns.xsd But doing this i got this error: " TypeError: this.page.frame._getNavBarVisible is not a function ", and without the Page tag i've already tried with some ways but with unsuccessful... I do not found any sample of this too, can anyone help me? Dlucidone Your .ts file containing class implementation import { Component } from "