Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I share to my NativeScript app?

Is it possible in current state of NativeScript to create an app which listens for share intents on Android?

What I would like to achieve is for example having a website opened in my web browser on Android, tap on share and see my NativeScript app on the list of share targets.

I did accomplish this on a native Android app but can't get it to work in a NativeScript app. I've messed with the AndroidManifest.xml to add

<action android:name="android.intent.action.SEND"></action>
<category android:name="android.intent.category.DEFAULT"></category>

into intent-filter but this did not help. My app does not show up in the list of share targets.

like image 931
Najki Avatar asked May 29 '16 21:05

Najki


People also ask

Is NativeScript good for app development?

It's an extremely powerful tool. NativeScript provides abstracted UI and component APIs to access native iOS and Android hardware and UI components. This accelerates development because you can write a singular UI and business logic code for both iOS and Android, thus saving time.

Which is better NativeScript vs React Native?

React Native is by far the most popular cross-platform mobile development framework, winning over other similar frameworks, e.g., Xamarin, Flutter, Ionic, or NativeScript. But popularity isn't always a fair comparison metric.

Is NativeScript worth learning?

It's worth considering NativeScript when:You want to use Angular for web components. You need custom native UI and you don't know Objective C or Java. You're about to transition and Angular or Vue web application to mobile.

Is NativeScript really Native?

NativeScript is an open-source framework used to build native mobile applications on iOS and Android platforms. Under a rule, it implements CSS and JavaScript to render the UIs to ensure a native-like experience. NativeScript generally attracts users with its personalized tech stack.


1 Answers

I've been searching for a solution to this question myself and found all of the others answers here very helpful.

Yet, I'm a noob (only two days in) for NativeScript and couldn't actually get where and how to implement all the code bits together to work.

By using the answers here I could continue my search and found a finished GITHUB EXAMPLE: NickIliev/nativescript-receiving-shared-content

For other freshmen (or freshwoman) looking for a finished example go to the repo and explore the code in /demo/app/ directory. It was helpful for me and I'll hope it will help you too.

like image 167
Darvydas Šilkus Avatar answered Sep 30 '22 02:09

Darvydas Šilkus