Questions tagged [nativescript-plugin]

1

votes
1

answer
292

Views

How to call Java method (custom class) with an interface typed parameter in Nativescript

I'm creating a Nativescript plugin. It includes a custom Android Library (AAR) and I want to use it from the Typescript code. When I run a demo (in device or emulator) I get a TypeError: sender.registerListener is not a function error when calling this registerListener method, which is weird because...
artberri
1

votes
0

answer
226

Views

Nativescript : local notification, builder.setChannelId is not a function error

In my nativescript appllication, I use nativescript-local-notifications NPM to push the local notification and I have followed the instructions same as the readme file in the github. I face the error LocalNotifications.schedule: TypeError: builder.setChannelId is not a function I referred the GitHu...
1

votes
1

answer
159

Views

native modules are not working correctly in nativescript

I am trying to use this android package to make a blur effect in nativescript. https://github.com/wasabeef/Blurry so in nativescript included the compile in my app.gradle in the /app/App_Resources/Android/app.gradle then rebuild everything works good and builds great. but when I start to use the lib...
ElGenius
1

votes
1

answer
388

Views

Invoking Android .arr file using nativescript

We have created aar file which is basically an native Android application for reading the card and will return card details in json format asynchronously. This is working fine and imported that aar file in nativescript project. How to invoke methods and callback from the imported aar file.
ShaMoh
1

votes
1

answer
294

Views

Nativescript Plugin for Caching

Is there an actively maintained nativescript plugin for data caching? like nativescript-cache but sadly this plugin is now inactive.
Jannomeister
1

votes
0

answer
123

Views

nativescript-ui-listview throws ERROR TypeError: undefined is not an object (evaluating 'navBar.tintColor = color.ios')

I try to build a small iOS-App with Angular and Nativescript to display Data from an Webpage. I like to have the landingpage as an multiline ListView with Name and Teaser. After i installed the nativescript-ui-listview plugin i wrote following Code: ` ` and now i got that Error: file:///app/tns_modu...
Laurin Fritz
1

votes
1

answer
416

Views

JS: firebase.init error: TypeError: Cannot read property 'database' of undefined

Am getting this error after following the steps mentioned in the nativescript-plugin-firebase readme file. JS: firebase.init error: TypeError: Cannot read property 'database' of undefined https://github.com/EddyVerbruggen/nativescript-plugin-firebase but i dont really understand nor do i know how to...
Xsmael
1

votes
1

answer
234

Views

NativeScript - How to save/add an image to/into the phone's default gallery application

I followed NativeScript's ImageSource module tutorial on how to save an image to the phone, but it's still not showing up on the phone's default gallery app. Is there any way to tell the Image Module to save/add the picture to/into the phone's default gallery app?
Jannomeister
1

votes
1

answer
72

Views

Converting string to NSData and NSData back to string

I have the following code: const content: NSString = NSString.stringWithString(data); console.log('content#1: ' + content); const nsData: NSData = content.dataUsingEncoding(NSUTF8StringEncoding); console.log('nsData#1: ' + nsData); console.log('nsData#2: ' + nsData.base64EncodedStringWithOptions(nul...
Neigaard
1

votes
1

answer
44

Views

Alert is not visible in nativescript ios after autocomplete usage

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 box...
Narendra
1

votes
1

answer
188

Views

Get error after install nativescript-plugin-firebase when build for android using nativescript sidekick

I installed nativescript-plugin-firebase step by step according to the document, but every time when I use sidekick on MacOS to build or run the app for android. I always get the error, the log is below: [18-11-08 09:36:09.139] NativeScript Sidekick version: 1.13.0-v.2018.10.5.2 [18-11-08 09:36:09.4...
hui
1

votes
1

answer
47

Views

I am using cordova-plugin-facebook4 in my nativescript app. When I build the application, it is showing the variables APP_ID and APP_NAME are missing

enter image description hereI want to log the App Events of my application in Facebook analytics. My App is built on NativeScript. I could not find a plugin to log the events in facebook analytics. So, I am using cordova-plugin-facebook4 to log app events. But the project is not building.
1

votes
1

answer
25

Views

Ways to share data among NativeScript mobile applications

We have few different enterprise mobile applications being built with NativeScript. Are there any NativeScript plugins that can be used to share data among those apps. For example: 1) App1 might store some JSON 2) App2, App3 would be able to retrieve the stored JSON upon their open. Thank you, Ku...
jstorm
0

votes
0

answer
3

Views

Get Image name and date taken - nativescript-imagepicker

I am new to NativeScript-Vue. In my app I have a feature to upload images I'm using nativescript-imagepicker to do that. In iOS, How can I get the image name and when it was taken. Below is the code I'm using. context .authorize() .then(function() { return context.present(); }) .then(selection => {...
Lucifer
1

votes
1

answer
478

Views

NativeScript Static Library implementation how to generate TypeScript declarations

I struggling to implement a Captuvo static library as a plugin in NativeScript. Plugin structure: nativescript-captuvo-scan ├── package.json └── platforms └── ios └── include ├── captuvo │ ├── Captuvo.h │ └── module.modulemap │ └─...
Trevor
1

votes
1

answer
1.6k

Views

Nativescript radiobutton

I am developing a NativeScript application. I want to use radiobutton functionality in my application. I have tried to achieve this by using 'nativescript-radiobutton' plugin, but it doesn't support in iOS. Is there any solution through which it works for both Android and iOS platform? Thank you in...
Aanal Mehta
1

votes
1

answer
211

Views

Error while initializing firabase.init() from Nativescript firebase plugin

I'm trying to use native script firebase plugin for FCM in order to implement push notification in my native script app. But when I'm trying to initiate firebase by calling firebase init according to documentation. firebase.init({ onMessageReceivedCallback: function(message) { console.log('Title: '...
Saidul Amin Nobin
1

votes
1

answer
196

Views

NativeScript Passing UIViewController to native iOS method

I'm attempting to create a new plugin for Square Reader following the nativescript plugin seed (iOS instructions https://docs.connect.squareup.com/payments/readersdk/setup-ios). The last step is to pass in a UIViewController object so it can display the checkout page in your app. When trying to pass...
Frank
1

votes
1

answer
0

Views

Wrong map center in iOS using nativescript-google-maps-sdk

In iOS when I put marker and mapView location, the map does not display centered, but if I move the phone to landscape and rotate again to portrait the map center displays fine. In Adnroid works fine. You can get more information in this github issue: https://github.com/dapriett/nativescript-google-...
mneu
1

votes
1

answer
0

Views

Why doesn't couchbase plugin load?

I use the latest NativeScript Sidekick and Preview for developing (vanilla, pure JS) apps, recently I installed Couchbase Lite Plugin https://market.nativescript.org/plugins/nativescript-couchbase When I write var couchbaseModule = require('nativescript-couchbase'); in the JS file of a page and if I...
fisher
1

votes
1

answer
0

Views

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

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, Excepti...
Amit Gurbani
1

votes
1

answer
0

Views

Problem with using worker in nativescript plugin

I created my first plugin: https://www.npmjs.com/package/nativescript-ftp-client And it is working when in development mode (using seed project), But when I package it app says it cannot find a ftp-worker-android.js file which is included Problem is that I am using new Worker('./ftp-worker-android.j...
dfilkovi
1

votes
1

answer
263

Views

NativeScript : First call of getPlatformData without providing projectData

I've been seeing this for the last couple of days - Project successfully prepared (android) Executing after-prepare hook from C:\App\mobile-app\hooks\after-prepare\nativescript-dev-android-snapshot.js Executing after-prepare hook from C:\App\mobile-app\hooks\after-prepare\nativescript-dev-sass.js F...
Sid
1

votes
1

answer
141

Views

angular-native-seed, Live sync is not working in windows 10

In my native script project, I have used angular-native-seed. Everything does work except Live sync. The same was raised in git hub under the issue list, still it does not resolve by anyone. Whenever file change, gulp watch is called but failed to overwrite app folder from src folder (see the last...
1

votes
1

answer
120

Views

NativeScript Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion

I switched to {N} 5.0, now i have an issue with nativescript-google-map-sdk, same error as here: Android Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion The issue with Android API 28, there is a config that should be set manually in manifetst, http...
dev dev
1

votes
1

answer
156

Views

why declare method within square brackets wrapped around name in typescript?

I've been going through nativescript code base to see how to update some of my plugins for {N} 3.0.1, and i see a lot of class methods this way. [srcProperty.setNative](value: any) { this._createImageSourceFromSrc(value); } see the contents of image-common.ts and image.android.ts to see the full sou...
2

votes
1

answer
38

Views

Plugin nativescript-fancyalert not working on Android

TNSFancyAlert.showSuccess( 'Success!', 'Fancy alerts are nice.', 'Yes they are!', ) .then(() => { console.log('success') }).catch(err => { console.log(err) }) the err response is: [TypeError: cn.refactor.lib.colordialog.PromptDialog is not a constructor] From: https://github.com/NathanWalker/natives...
Wilson Lau
2

votes
1

answer
75

Views

Kiosk mode in NativeScript for Android App

From past few days, I am trying to implement kiosk mode (Locked app) in NativeScript with Angular for Android App. I have tried it directly but unable to handle all the buttons in Android like Home and Recent Apps buttons. I am able to handle Back and Volume up and down buttons. The other way, I tr...
Sanketh
3

votes
1

answer
39

Views

Import mobile specific nativescript plugin in NathaWalker angular-seed-advanced

I recently started working on Nativescript. I found NathanWalker's angular-seed-advanced quite interesting. I am facing one issue in that. How do I import mobile specific nativescript's plugin in my components as that component is being used for web app too. If I import directly nativescript plugin...
Hsm Sharique Hasan
2

votes
1

answer
454

Views

Nativescript contact permission on iOS

I'm having troubles in order to let my NativeScript app read contacts on iOS. I'm using the library nativescript-contacts in order to read all the entries of the address book and the one called nativescript-permission in order to ask the user the permission to read contacts. Unfortunately, the latte...
Luigi Russo
1

votes
1

answer
294

Views

NativeScript Hybrid Mobile App: Tracking/Capturing Crashes

I am building a NativeScript mobile app and among other things I am capturing for analytics purposes, I need to capture 'app crashes' possibly with errors/reasons it crashed. I came across this SO post but there it was in the response of a question on how not to let the app crash. Following was sugg...
Gauzy
1

votes
1

answer
818

Views

How to use Native code into NativeScript

Can I use the native JAVA/SWIFT code in NativeScript? I want to store the cookies into the cookie manager, but there is no plugin provided. So, is that possible to use the native code directly into NativeScript or I've to create a plugin myself for this task.n
2

votes
1

answer
131

Views

NativeScript - Get device local IP address

I'd like to get the local IP address of my device using NativeScript / JavaScript. I have done a search and found a way to do that on Android, but I'd like to have a cross-platform solution that works also on iOS. I'm currently using NSPlayground on an iPhone 6S running iOS 11.4.
LukeTheWalker
2

votes
0

answer
176

Views

Nativescript with Firebase : Works login in offline mode

I use nativescript-plugin-firebase to connect with Firebase. It does work when create new user / login / CRUD operations when app is online mode. When the app is offline mode, Login authentication / Create new user is not working rest of the above mentioned things are working. My code base: app.comp...
3

votes
1

answer
111

Views

nativescript-mapbox showing black Map Markers

I am having an issue in the android emulator where my svg/icon Layers are showing as black. This sometimes effects highway/road markers as well as my map markers. The plugin is currently using the default marker, but I have also provided my own png file and they both suffer from this problem. Someti...
Rohan
2

votes
0

answer
43

Views

Socket TCP in Nativescript

I create I wanted to create a plugin to create a tcp socket connection in Nativescript (there is not yet an online plugin that does this, only web sockets). Following this guide, I created a plugin and inserted the SwiftSocket library (in Swift) into the PodFile. Once imported and added to the proje...
and.orange.13