What this answer would achieve?
- A solution for How to put a shortcut on the home screen that will open a new note in Simplenote?
- Three more solutions for something much better than Simplenote but meeting the criteria of the question.
Notes
- Solutions tested on device with Android 4.2.1 but would work on all Android 4+ and 5+ devices.
- Only Method #1 requires root access.
Simplenote has this AndroidManifest.xml and the relevant activity which opens the editor in the app is:
<activity android:name="com.automattic.simplenote.NoteEditorActivity" android:configChanges="1184" android:windowSoftInputMode="2"/>
It is easy to launch an activity using am start <params>
but their seems to be no intent registered with this activity, neither it has any export parameter. It's precisely the reason why you ended up writing:
Running this activity on ADB with normal privileges with following command results in permission denial error.
am start -n com.automattic.simplenote/.NoteEditorActivity
Launching it with root privileges simply crashes the app without throwing any error. I couldn't understand any reasoning behind crashing in logcat's output.
Method #1
However, there is an indirect way to launch into Simplenote's editor by using Tasker. Note again that this method will require ROOT access.
See this answer to become familiar with Tasker's normal usage. (The default way of saving things in Tasker is to press back key once you're done with something.)
We'll be creating a task with two actions involving launching Simplenote and executing automatic touch input on the pen icon.
Instructions
Go to Settings → Developer options(see how to enable it) → check Pointer location.
You'll start to see some lines when touching anything on screen, and numbers on the top. Don't panic since it's the feature we just enabled.
Launch Simplenote → touch and hold the pen icon and note down (visible over Notification bar) X:xxx
and Y:yyy
coordinates.
E.g. In the following image the coordinates are X:457.0
and Y:55.9
:
(Click on the image to see larger variant.)
You can now disable the Pointer location.
Install and launch Tasker → tap Menu key → Enable.
- Create a task under Task and an action under it through
+
→ App → Launch App → Simplenote and leave the rest fields untouched.
- Create an another action in the same task through
+
→ Code →Run Shell. Enter following details and leave the rest fields untouched.
- Command:
input touchscreen tap xxx yyy
-- fill xxx
and yyy
from what you noted down.
- Check Use Root.
- Try executing these actions by tapping play icon (at bottom).
- Go to your Home Launcher → App drawer → Widgets. Otherwise, go to similar "add widget" option available in your launcher/device.
- Choose the widget Task Shortcut → select your task → tap the the square icon (made of 3x3 small boxes) at the bottom → choose an icon, and a shortcut will be created on your home screen with the name of the task. You may have to follow +- few steps to get this done in your launcher.
Tap the shortcut and you will see the editor of Simplenote. :)
Note: On my device executing the shortcut first time only launched SimpleNote since auto-input executed before the pen icon was visible on the screen, and Time-out parameter in Tasker seems to have no effect. However, once SimpleNote shows up in recent list the solution works flawlessly. It is also possible that my device being old is slow in executing Simplenote swiftly.
Method #2
I found an alternative to Simplenote named Notes which has similar features and interface. It also easily allows to create the desired shortcut.
Solution 2.1
Notes app has a widget available to get the job done. We'll use it here.
Instructions
- Go to your Home Launcher → App drawer → Widgets. Otherwise, go to similar "add widget" option available in your launcher/device.
- Choose the widget New note and a shortcut would be created on your home screen with the name of the task. You may have to follow +- few steps to get this done in your launcher.
Here we go, simple and easy new shortcut to open a new note every time it is executed.
Solution 2.2
We'll be using a very handy shortcut creator app for launching editor of Notes.
Note that there may already be an icon of the Notes app on your Home Screen if you have default settings in Play Store. It is optional but better to delete that shortcut before proceeding for any step in this solution to avoid confusion with the new shortcut having the same name and icon.
Instructions
- Install and launch QuickShortcutMaker.
Under Activities scroll to Notes → tap it and select the entry listing:
Notes
Edit note
nl.jacobras.notes/
nl.jacobras.notes.activities.EditNoteActivity
- You may tweak it such as changing the icon if you ignored Note before these instructions, then select Create at the bottom. You'll be taken back to home screen which would be having a new shortcut with name
Notes
and icon of the same app.
Now every time you launch this shortcut you'll find the editor window for a new note. Good work!
Solution 2.3
If QuickShortcutMaker doesn't work on your device as intended (not updated since 2014) then we'll use the Tasker.
See this answer to become familiar with Tasker's normal usage. (The default way of saving things in Tasker is to press back key once you're done with something.)
The goal is to create a shortcut through a task which will be launched by a shortcut available as a Tasker Widget.
Instructions
- Install and launch Tasker → tap Menu key → Enable.
- Create a task under Task and an action under it through
+
→ System → Send intent. Edit only the following fields only (taken from its AndroidManifest.xml):
- Cat:
None
- Mime Type:
text/plain
- Package:
nl.jacobras.notes
- Target:
Activity
- Try executing the action by tapping play icon (at bottom).
- Go to your Home Launcher → App drawer → Widgets. Otherwise, go to similar "add widget" option available in your launcher/device.
- Choose the widget Task Shortcut → select your task → tap the the square icon (made of 3x3 small boxes) at the bottom → choose an icon, press back key and a shortcut would be created on your home screen with the name of the task. You may have to follow +- few steps to get this done in your launcher.
Now every time you launch this shortcut you'll find the editor window for a new note. Happy editing!
Status: Objective Completed!