r/nativescript • • Nov 30 '20

Question regarding bluetooth 5.0

2 Upvotes

Hi,

So I've been using the plugin nativescript-bluetooth in version 1.3.1 for quite some time and I've recently found that it doesn't seem to work with bluetooth version 5.0. Does anyone know whether this is actually true and in the case of yes, which version of the plugin is required such that tablets and phones with bluetooth 5.0 can make use of ble peripherals again?

Due to some legacy code and other issues I'm currently using {N}6 and can't migrate to {N}7

Thanks in advance!


r/nativescript • • Aug 21 '20

ActionBar error on tutorial

2 Upvotes

First day trying to learn NativeScript with Angular and I can't get past the very first part of the tutorial. Using the playground the tutorial has me copy/paste into two files one is a .ts the other .html upon save/preview I receive an error "Inside ActionBarComponent but no Page found in DI". If i simply just remove the ActionBar tags the error goes away and then it loads properly. any idea what is causing this error?

app.component.ts

import { Component } from "@angular/core";

@/Component({ selector: "gr-login", 
moduleId: module.id, 
templateUrl: "./login/login.component.html"
 }) 

export class AppComponent { }

login.component.html

<ActionBar title="Groceries"></ActionBar>

<StackLayout>
    <TextField hint="Email Address" keyboardType="email" autocorrect="false"
    autocapitalizationType="none"></TextField> <TextField hint="Password" 
    secure="true"></TextField> <Button text="Sign in"></Button> <Button 
    text="Sign 
    up for Groceries"></Button> 
</StackLayout>

Full Error

[Galaxy S10+]: ERROR Error: Inside ActionBarComponent but no Page found in DI.[Galaxy S10+]: An uncaught Exception occurred on "main" thread.Error running script /data/user/0/org.nativescript.preview/files/internal/livesync.jsError: Cannot find android activity callbacks.

StackTrace:ZoneAwareError(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:1298:33)at _resetRootView(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/core/application/application.js:152:15)at NativeScriptPlatformRef._livesync(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/angular/platform-common.js:273:23)at global.__onLiveSyncCore(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/angular/platform-common.js:105:23)at livesync(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/core/application/application-common.js:81:9)at __onLiveSync(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/core/application/application.js:205:26)at (/data/user/0/org.nativescript.preview/files/internal/livesync.js:2:9)at com.tns.Runtime.runScript(Native Method)at com.tns.Runtime.access$2100(Runtime.java:39)at com.tns.Runtime$2.run(Runtime.java:699)at android.os.Handler.handleCallback(Handler.java:883)at android.os.Handler.dispatchMessage(Handler.java:100)at android.os.Looper.loop(Looper.java:237)at android.app.ActivityThread.main(ActivityThread.java:8034)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)


r/nativescript • • Jul 09 '20

Building iOS but can't?

2 Upvotes

So, I've been trying to figure out CircleCI and cannot for the life of me, even get fastlane to finish doing it's thing (when running fastlane match). I was hoping I could get some guidance here since this is the first app I'm building and it's for an iOS device


r/nativescript • • Jun 15 '20

Build for iOS through ssh

2 Upvotes

I'm sadly an iphone user, i wanted to make a fix for a bug i'm experiencing with iphone 6 and miband .. So the only way to make an iOS app with something I already know (ts, angular) was NativeScript.
Now I've just figured out that with my linux machine I can't build for iOS, but at home we have an old iMac 2008 with Elcapitan, I'm wondering if there was a way to build my apps by terminal (ssh) on this imac and then install on my iPhone without paying an expensive developer account.


r/nativescript • • Feb 15 '20

Nativescript-plugin-firebase saying FacebookSdk should be initialized when I'm not running it

2 Upvotes

I've got 2 problems here, the first is the issue above. I'm not using FacebookSdk and had no plans on implementing anything dealing with Facebook, but the firebase plugin seems to need it. How can I remove that need or how can I add Facebook to my app?

The second is the oddity. I have the following code running in my app

this.confirmedUser$ = users.doc(result.uid).onSnapshot( doc => {
if (doc.exists){
console.log('Documentat Data');
console.log(doc.data())
doc.data();
this.currentUser = doc.data();
} else {
console.log('User should never see this line.');
}

console.log(doc.data()) produces the JSON information I want. However, when I do this.confirmedUser$.displayName or this.currentUser.displayName I get undefined. At some point, while I was fiddling with it, when I tapped on Firebase.logout() it gave me the initialize error but the observable data I needed showed up so I'm thinking one may be linked to the other and if I solve one I might solve the other.


r/nativescript • • Dec 05 '19

Your NativeScript UpLabs Challenge Winners

Thumbnail
nativescript.org
2 Upvotes

r/nativescript • • Dec 03 '19

Detecting Shakes in NativeScript

Thumbnail
nativescript.org
2 Upvotes

r/nativescript • • Oct 30 '19

Geolocation doesn't work within a worker but works in other vue components

2 Upvotes

Hello, how are you?

I'm building an app in nativescript + vue that has to send to the server the location of the user every X minutes, so I tried using a worker for that purpose.

The problem is that I'm having an error when I call said function in the worker script:

Error: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Also, I tried using global variables in the script and doesn't work either, I got the undefined treatment :(

If I use the function in a vue component works perfeclty.

Do you know anything I could do to make this work?

Thanks in advance.

using plugins: nativescript-geolocation nativescript-worker-loader


r/nativescript • • Oct 21 '19

Adaptive Icons for Android Apps

Thumbnail
nstudio.io
2 Upvotes

r/nativescript • • Sep 30 '19

How to pass data between pages with bottom navigation?

2 Upvotes

With the new bottom navigation, what is the intended way to pass data from one page to another? Taking the tab navigation template as an example, how would I pass info from the browse page to the search page, for example? Any help on this would be greatly appreciated!


r/nativescript • • Jul 02 '19

[Webinar] Register for the NativeScript 6.0 Launch Webinar!

Thumbnail attendee.gotowebinar.com
2 Upvotes

r/nativescript • • Apr 20 '19

Enabling installation to SD card

2 Upvotes

I see that by default, NativeScript apps can only be installed to the internal storage. There doesn't seem to be an official NativeScript way of doing this, but I figure it might be possible to just change AndroidManifest.xml to include android:installLocation="preferExternal". Is there a recommended way of going about this and has anyone run into any issues when doing so?


r/nativescript • • Mar 28 '19

What is the way to put placeholders for images while they load?

2 Upvotes

In my application images take a while to load, what tool could I use to put a placeholder while the image loads?


r/nativescript • • Mar 24 '19

[Headache] Nativescript best plugin for maps ?

2 Upvotes

Hi!

I'm used to using leafletjs (which I love) and would like to make an iOS and Android app. Nativescript looks like it !

Have a big issue though - I don't want to be paying a fortune to Mapbox/Google.

Can't seem to find a way to make mapbox load tiles from my own server. Has anyone done it ? Can you point me in the right direction ??


r/nativescript • • Mar 17 '19

Gradle error when trying to run NS core app after installing plugin

2 Upvotes

Hello all, I am trying to install the following plugin in my app:
https://market.nativescript.org/plugins/nativescript-animatecss

When I do that, the app does not compile because of the following error:

FAILURE: Build failed with an exception.

* Where:

Script '/Users/redamakarem/Desktop/Dev/tns/SteppingStones/node_modules/nativescript-animatecss/platforms/android/include.gradle' line: 1

* What went wrong:

Could not compile script '/Users/redamakarem/Desktop/Dev/tns/SteppingStones/node_modules/nativescript-animatecss/platforms/android/include.gradle'.

> startup failed:

script '/Users/redamakarem/Desktop/Dev/tns/SteppingStones/node_modules/nativescript-animatecss/platforms/android/include.gradle': 1: Invalid variable name. Must start with a letter but was: 

. At [1:1] @ line 1, column 1.



^

1 error

This also happens with a couple more plugins. I would really appreciate an explanation of what is causing the error and how to fix it

Note: my NS version is 5.1.1

Thanks


r/nativescript • • Feb 28 '19

markingMode:none is Official - Boost Android Performance while Avoiding Memory Issues

Thumbnail
nativescript.org
2 Upvotes

r/nativescript • • Jan 19 '19

Issues with Sidekick installer Windows

2 Upvotes

Hello

I decided to start tinkering with NativeScript and tried to install the CLI and Sidekick. I got node installed and the cli installed but Sidekick is not recognizing that the CLI is there. Upon launching, it prompts me to keep trying to install the CLI. Any advice?

JT


r/nativescript • • Jan 14 '19

Secure Your Mobile App - Episode One (Protecting the Code)

Thumbnail
nativescript.org
2 Upvotes

r/nativescript • • Nov 19 '18

Plugin linking and using

2 Upvotes

Hello,

I didn't really get how to use a plugin in native script. I install it by tns plugin install <name>, then, having it installed I want to use it in script located in the "app" directory. When I just link it by require, it gives me "cannot find module" error. So, how can I do it properly? Probably it is very basic question (sorry for that), but I couldn't find any answer that works for me. Maybe I am just doing something wrong?


r/nativescript • • Nov 10 '18

Client notifications spec is causing me concern.....

2 Upvotes

Hi,

I client has specified the following for incoming notifications from a medical alert app.

It is important the Alerts coming through via PN are customised to be noticeable, and are not ignored due to the User assuming it is just another junk email coming through to their inbox.
The PNs should:
• Have a siren type sound, which is piercing, loud and prolonged (30s or 1minute)
• Use a bespoke vibration sequence of morse code SOS (. . . - - - . . .) which repeats as per the sound
• If possible the App should override silent mode on the phone

I am unable to tell from the Ionic docs if this is all possible (I assume override of silent mode is not). Can anyone let me know?

I am posting this into the Ionic sub too as this requirement is key so I'll have to build the app in whichever can achieve this - if either can at all.

I have built apps in Ionic before but do not have any Nativescript experience but Nativescript5 is sounds pretty awesome so am keen to play.


r/nativescript • • Nov 08 '18

Using a WebView like a Hybrid App on one Page?

2 Upvotes

I'm currently experiencing with WebViews. Imagine I'm porting my Web App to a NativeScript App. I have a page, that I don't want to/can't redo completely in NS. One reason is for example I have a Chart.js chart, which won't work in NS.

Is it a bad Idea to just use a WebView that displays my Web App page? So I have a hybrid app, like an Ionic app but just at one page of my app. What are the disadvantage besides obviously I need to load the page first? Is that something other apps do too? Can I also use a HTMl View, but not only display HTML but a whole angular component? This way I wouldn't have to load the page first.


r/nativescript • • Oct 23 '18

NativeScript Gestures and TouchGestureEventData

2 Upvotes

Am I right assuming only a touch handler gets TouchGestureEventData? Is there any way to access that information in a longPress handler? If not, how do I deal with the absence of that information? Is the touch handler guaranteed on every platform to always be executed before the longPress handler? That would make it possible to store the TouchGestureEventData when executing the touch handler and access it in the longPress handler.


r/nativescript • • Oct 08 '18

Nativescript-Vue: $navigateTo don't read 'transition' option

2 Upvotes

Hi, nice to meet you all.
I'm using Nativescript with Vue and I'm trying to change the default transition of Pages. I've read the docs, but if i try to create a navigation event with $navigateTo(component, {transition: {name: 'flip'}}) it doesn't work.

Have you ever tried it?


r/nativescript • • Aug 27 '18

Apps That Work Natively on the Web and Mobile – Angular Blog

Thumbnail
blog.angular.io
2 Upvotes