nativescript

Create NativeScript Plugin using IOS Static Library issue

a 夏天 提交于 2019-12-24 22:32:16
问题 I have created .a static library (tested in Xcode for native ios project and Its working fine) Now I am following this https://github.com/NativeScript/nativescript-plugin-seed to create nativescript plugin using .a static framework. Plugin structure module.modulemap file is created by me and it's look like this module libstaticlibrary { umbrella header "staticlibrary.h" export * } staticlibrary.h #import <Foundation/Foundation.h> @interface staticlibrary : NSObject + (NSString *)sayHello;

How to access android's R object in NativeScript?

拥有回忆 提交于 2019-12-24 21:34:25
问题 I am trying to access android's R object in NativeScript with Angular but I haven't had any success. The instructions here say to do it like this: android.R.color.holo_purple But when I try to import the android variable from the application module or the tns-core-modules/platform module I get an error that the R property on the android object is undefined. How do I get access to R ? 回答1: you don't need to import android variable from application module. it is automatically available by

cannot get nativescript-plugin-firebase demo-push app to work

对着背影说爱祢 提交于 2019-12-24 20:53:45
问题 Can anyone help me install the nativescript-plugin-firebase Push-demo application. I could not manage to install and make it work. So please is there a guidance step by step for beginners? This is the demo link: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/master/demo-push @Eddy Verbruggen: Your help will be appraciated Regards 来源: https://stackoverflow.com/questions/52890502/cannot-get-nativescript-plugin-firebase-demo-push-app-to-work

JS: ERROR Response with status: 200 for URL: null

ぐ巨炮叔叔 提交于 2019-12-24 20:09:55
问题 I have the problem when using https. I tried this code: public output(): Observable<Item> { let headers = new Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded'); return this.http.get("https://xx.xxx.xx.xx:4433/login", { headers: headers }) .pipe(map((response: Response) => { console.log('response', response) let res = response.json(); if (res.StatusCode === 1) { } else { return new Item(''); } })); } This code show in her part console.log('response', response) this

Different release & debug config in a nativescript app

蓝咒 提交于 2019-12-24 19:14:25
问题 I've created 2 files: "config.debug.ts" & "config.release.ts". My understanding is that NativeScript's build script should copy the appropriate file to "config.ts" during the build. And then I should be able to do something like "import { config } from './config'" from my other *.ts files. That however does not happen and I'm getting a compilation error when doing "tns run". Now, I'm in doubt if I'm doing this properly at all.. What is the "true NS" way to have different configs for debug &

Nativescript: How to get photo list from gallery

六月ゝ 毕业季﹏ 提交于 2019-12-24 18:12:53
问题 The thing is I need to get photos from gallery automatically. I've read that ImagePicked is used to pick up photo from image store but it provides just in manual way (user does it by self). Are there any opportunity get access to gallery, take list of photos and used them in an application? Of course if are is it possible to filter them by criteria (get photos by date range)? 回答1: GingerComa, on Android you could try this: import * from "file-system"; var tempPicturePath = android.os

NativeScript: Camera takePicture and upload with nativescript-background-http

岁酱吖の 提交于 2019-12-24 15:21:39
问题 I'm trying to take a picture with NativeScript Camera module and then upload it with nativescript-background-http (since as I understand this is the only way of uploading in NS at this moment). I'm using iOS simulator, but get an error on Android emulator too. Camera plugin works fine, takes and saves a picture to a file. However I have a problem to upload the picture from the path after that. Here is my code: import cameraModule = require('camera') import imageModule = require('ui/image')

Get Subscribe Data out of .subscribe in Angular

喜夏-厌秋 提交于 2019-12-24 14:09:51
问题 I want to return the events after the subscriber is called. getCalendarData(){ var body = JSON.stringify({"cid": "etNG3V61LWS6Pzkeb_omuZGMVAOLd1_70tRQblVizWQ~", "seldt":"2018-09-18"}); var headers = new HttpHeaders(); headers.append('Content-Type', 'application/json'); return this.httpClient.post(this.apiUrl, body, { headers: headers }) } The above code works perfectly. It also returns the JSON. Now the problem is, when I call this method inside the getCalendarEvents(), I failed to return the

Using Firebase in Native Script

别等时光非礼了梦想. 提交于 2019-12-24 13:23:10
问题 I went through the documentation at Native Script but could find a way to use Firebase in Native Script apps. Does any one know how to use Firebase in Native Script apps? 回答1: Note: This is just a copy and paste of my other answer here. I've just built nativescript-firebase, which is loads the Firebase Node.js SDK in a way that's compatible with NativeScript. Also, Eddy Verbruggen has written nativescript-plugin-firebase which uses Firebase's corresponding Android and iOS SDKs. 回答2: Take a

NativeScript tns build failed after adding nativescript-ui-dataform plugin

我只是一个虾纸丫 提交于 2019-12-24 11:08:42
问题 I added plugin nativescript-ui-dataform to my project with command, tns plugin add nativescript-ui-dataform I checked package.json after install and noticed "nativescript-ui-dataform": "^3.10.0" was added to the project. When I build project with tns build android , I get following exception, Exception in thread "main" java.lang.ClassNotFoundException: Class: com.telerik.widget.autocomplete.ShowSuggestionListListener at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java