A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
add support to open intent from context menu
ammarahm-ed7e7aab14f266
diff --git a/apps/mobile/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xmlindex 009b6f3d8..1d51005b2 100644--- a/apps/mobile/android/app/src/main/AndroidManifest.xml+++ b/apps/mobile/android/app/src/main/AndroidManifest.xml@@ -1,51 +1,71 @@+<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"- package="com.streetwriters.notesnook">+ package="com.streetwriters.notesnook"><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="com.android.vending.BILLING" />- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />+<application- android:name=".MainApplication"- android:label="@string/app_name"- android:icon="@mipmap/ic_launcher"- android:usesCleartextTraffic="true"- android:roundIcon="@mipmap/ic_launcher_round"- android:requestLegacyExternalStorage="true"- android:networkSecurityConfig="@xml/network_security_config"- android:allowBackup="false"- android:theme="@style/AppTheme">- <activity- android:name=".MainActivity"+ android:name=".MainApplication"+ android:allowBackup="false"+ android:icon="@mipmap/ic_launcher"android:label="@string/app_name"- android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"- android:launchMode="singleTask"- android:windowSoftInputMode="adjustResize">-- <intent-filter>- <action android:name="android.intent.action.SEND" />- <category android:name="android.intent.category.DEFAULT" />- <data android:mimeType="text/*" />- </intent-filter>-- <intent-filter>- <action android:name="android.intent.action.MAIN" />- <category android:name="android.intent.category.LAUNCHER" />- </intent-filter>- </activity>- <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />-- <provider- android:name="com.vinzscam.reactnativefileviewer.FileProvider"- android:authorities="${applicationId}.provider"- android:exported="false"- android:grantUriPermissions="true">- <meta-data- android:name="android.support.FILE_PROVIDER_PATHS"- android:resource="@xml/file_viewer_provider_paths"- />- </provider>+ android:networkSecurityConfig="@xml/network_security_config"+ android:requestLegacyExternalStorage="true"+ android:roundIcon="@mipmap/ic_launcher_round"+ android:theme="@style/AppTheme"+ android:usesCleartextTraffic="true">+ <activity+ android:name=".MainActivity"+ android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"+ android:label="@string/app_name"+ android:launchMode="singleTask"+ android:windowSoftInputMode="adjustResize">++ <intent-filter>+ <action android:name="android.intent.action.MAIN" />++ <category android:name="android.intent.category.LAUNCHER" />+ </intent-filter>+ </activity>++ <activity+ android:name=".IntentActivity"+ android:label="Make to Note"+ android:noHistory="true"+ android:launchMode="singleTask">++ <intent-filter>+ <action android:name="android.intent.action.SEND" />++ <category android:name="android.intent.category.DEFAULT" />++ <data android:mimeType="text/*" />+ </intent-filter>+ <intent-filter>+ <action android:name="android.intent.action.PROCESS_TEXT" />++ <category android:name="android.intent.category.DEFAULT" />++ <data android:mimeType="text/*" />+ </intent-filter>+ </activity>+++ <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />++ <provider+ android:name="com.vinzscam.reactnativefileviewer.FileProvider"+ android:authorities="${applicationId}.provider"+ android:exported="false"+ android:grantUriPermissions="true">+ <meta-data+ android:name="android.support.FILE_PROVIDER_PATHS"+ android:resource="@xml/file_viewer_provider_paths" />+ </provider></application>-</manifest>+</manifest>\ No newline at end of filediff --git a/apps/mobile/android/app/src/main/assets/listeners.js b/apps/mobile/android/app/src/main/assets/listeners.jsindex 512d29527..367069634 100644--- a/apps/mobile/android/app/src/main/assets/listeners.js+++ b/apps/mobile/android/app/src/main/assets/listeners.js@@ -22,13 +22,13 @@ function onTitleChange() {};if (titleMessage && typeof titleMessage.value === 'string') {- window.ReactNativeWebView.postMessage(JSON.stringify(titleMessage));+ //window.ReactNativeWebView.postMessage(JSON.stringify(titleMessage));}}function attachEditorListeners() {editor.once('text-change', function () {- window.ReactNativeWebView.postMessage('loaded');+ //window.ReactNativeWebView.postMessage('loaded');let text = editor.getText();document.getElementById('infowords').innerText =text.split(' ').length + ' words';@@ -203,6 +203,6 @@ function attachEditorListeners() {m.text.split(' ').length + ' words';m.html = editor.root.innerHTML;m.type = 'content';- window.ReactNativeWebView.postMessage(JSON.stringify(m));+ //window.ReactNativeWebView.postMessage(JSON.stringify(m));});}diff --git a/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/IntentActivity.java b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/IntentActivity.javanew file mode 100644index 000000000..a404dcc00--- /dev/null+++ b/apps/mobile/android/app/src/main/java/com/streetwriters/notesnook/IntentActivity.java@@ -0,0 +1,19 @@+package com.streetwriters.notesnook;++import androidx.appcompat.app.AppCompatActivity;++import android.content.Intent;+import android.os.Bundle;++public class IntentActivity extends AppCompatActivity {++ @Override+ protected void onCreate(Bundle savedInstanceState) {+ super.onCreate(savedInstanceState);++ Intent intent = this.getIntent();+ intent.setClass(getBaseContext(),MainActivity.class);+ startActivity(intent);+ finish();+ }+}diff --git a/apps/mobile/html/Web.bundle/site/styles.css b/apps/mobile/html/Web.bundle/site/styles.cssindex af6810e04..045371adf 100644--- a/apps/mobile/html/Web.bundle/site/styles.css+++ b/apps/mobile/html/Web.bundle/site/styles.css@@ -1086,4 +1086,5 @@}.app-main {overflow: auto;+ height: calc(100% - 65px);}\ No newline at end of file