emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* MobileOrg and Voice Capturing (Android)
@ 2010-11-28 19:10 Sven Bretfeld
  2010-11-29  2:58 ` Matthew Jones
  2010-11-30  3:10 ` Mark Elston
  0 siblings, 2 replies; 19+ messages in thread
From: Sven Bretfeld @ 2010-11-28 19:10 UTC (permalink / raw)
  To: emacs-org

Hi together

TextToSpeech has made our lives easier, especially for car-drivers like
me. I have tried to capture tasks by voice on my Android device and
implement them automatically to my org-files at home. The results are
practicable but far from optimal by now. Maybe there are some Android
users on this list who like to get involved in trying to find an optimal
solution. 

*My method at the moment:*

I use "tasker," the Android killer-app for automatizing almost every
thinkable task. Created a new task called "org-voice" with tasker.
Pressing the associated icon does the following:

1. Plays Darth Vader's voice saying "What is thy bidding, my master?"

2. Loads app Voice2Clipboard

3. Waits for 30 seconds (to get Voice2Clipboard ready for recording and
   for me to finish speaking the note)

4. Write File: Writes the clipboard content to a file
   /sdcard/dropbox/org/org-voice.org

After uploading the file with Dropbox, a cronjob on my PC (which is
always switched on) takes care of the file. Its lines (each is a capture
item) are transformed by a series of sed operations and put into a
different file from-org-voice.org together with some TAGS and a TODO
keyword; after that the original file is emptied. That's it.

The problem with this approach is that you still have to manually
download the (empty) capture-file (org-voice.org)[¹] and to manually upload
it again, because Dropbox for Android doesn't sync changed files on the
sdcard automatically. And especially to upload process needs quite a
view clicks.

*What would be better:*

Use MobileOrg and have the clipboard contents written into the file used
by MobileOrg for written captures. This is
/sdcard/mobileorg/mobileorg.org if you use sdcard-storage. This way, you
could use MobileOrg's own syncing process and no cronjob would be
necessary.

This could be done in two ways:

1. Use the same procedure and let tasker write the contents into the
   file directly. This is not possible for me since I have to use
   internal-storage for reasons of performance[²] and the files in
   /data/data/com.matburt.mobileorg/files/ are not writable for other
   programs without root.

2. Use tasker to start MobileOrg, enter the capture dialog and have a
   voice recognition app started. I simply don't know how to do that.

Maybe tasker can even be programmed to automatically start MobileOrg's
syncing process from time to time. But I don't know if and how this is
possible. 

Does anybody have a better solution? Or a better idea?

Greetings,

Sven

[¹]  If you don't, the next sync with dropbox would replace the file
with your notes by the empty file hosted on the Dropbox server.
[²]  On HTC Magic (Android 1.6) sdcard-storage makes MobileOrg
incredibly slow. It takes more than a minute after starting MobileOrg
until the files are displayed.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-11-28 19:10 MobileOrg and Voice Capturing (Android) Sven Bretfeld
@ 2010-11-29  2:58 ` Matthew Jones
  2010-11-30 22:06   ` Sven Bretfeld
  2010-11-30  3:10 ` Mark Elston
  1 sibling, 1 reply; 19+ messages in thread
From: Matthew Jones @ 2010-11-29  2:58 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org


[-- Attachment #1.1: Type: text/plain, Size: 4089 bytes --]

Hey Sven, here's some thoughts:

MobileOrg Android already supports speech to text in that, you can go to
capture a new note and click the mic button on the soft keyboard and start
speaking.  I don't see that it would be particularly difficult to integrate
this in a larger fashion.  There could be a button on the capture interface
that would let you start it automatically.

You could also create (or extend the existing) Desktop Widget to include a
button for capturing a note and/or capturing a note via spoken word.

Also... given that you had a button to activate the speech to text without
having to pull up the soft keyboard... you could write another application
that calls MobileOrg's Capture activity with that mode enabled.

http://matburt.net


On Sun, Nov 28, 2010 at 2:10 PM, Sven Bretfeld <sven.bretfeld@gmx.ch> wrote:

> Hi together
>
> TextToSpeech has made our lives easier, especially for car-drivers like
> me. I have tried to capture tasks by voice on my Android device and
> implement them automatically to my org-files at home. The results are
> practicable but far from optimal by now. Maybe there are some Android
> users on this list who like to get involved in trying to find an optimal
> solution.
>
> *My method at the moment:*
>
> I use "tasker," the Android killer-app for automatizing almost every
> thinkable task. Created a new task called "org-voice" with tasker.
> Pressing the associated icon does the following:
>
> 1. Plays Darth Vader's voice saying "What is thy bidding, my master?"
>
> 2. Loads app Voice2Clipboard
>
> 3. Waits for 30 seconds (to get Voice2Clipboard ready for recording and
>   for me to finish speaking the note)
>
> 4. Write File: Writes the clipboard content to a file
>   /sdcard/dropbox/org/org-voice.org
>
> After uploading the file with Dropbox, a cronjob on my PC (which is
> always switched on) takes care of the file. Its lines (each is a capture
> item) are transformed by a series of sed operations and put into a
> different file from-org-voice.org together with some TAGS and a TODO
> keyword; after that the original file is emptied. That's it.
>
> The problem with this approach is that you still have to manually
> download the (empty) capture-file (org-voice.org)[¹] and to manually
> upload
> it again, because Dropbox for Android doesn't sync changed files on the
> sdcard automatically. And especially to upload process needs quite a
> view clicks.
>
> *What would be better:*
>
> Use MobileOrg and have the clipboard contents written into the file used
> by MobileOrg for written captures. This is
> /sdcard/mobileorg/mobileorg.org if you use sdcard-storage. This way, you
> could use MobileOrg's own syncing process and no cronjob would be
> necessary.
>
> This could be done in two ways:
>
> 1. Use the same procedure and let tasker write the contents into the
>   file directly. This is not possible for me since I have to use
>   internal-storage for reasons of performance[²] and the files in
>   /data/data/com.matburt.mobileorg/files/ are not writable for other
>   programs without root.
>
> 2. Use tasker to start MobileOrg, enter the capture dialog and have a
>   voice recognition app started. I simply don't know how to do that.
>
> Maybe tasker can even be programmed to automatically start MobileOrg's
> syncing process from time to time. But I don't know if and how this is
> possible.
>
> Does anybody have a better solution? Or a better idea?
>
> Greetings,
>
> Sven
>
> [¹]  If you don't, the next sync with dropbox would replace the file
> with your notes by the empty file hosted on the Dropbox server.
> [²]  On HTC Magic (Android 1.6) sdcard-storage makes MobileOrg
> incredibly slow. It takes more than a minute after starting MobileOrg
> until the files are displayed.
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 5109 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-11-28 19:10 MobileOrg and Voice Capturing (Android) Sven Bretfeld
  2010-11-29  2:58 ` Matthew Jones
@ 2010-11-30  3:10 ` Mark Elston
  2010-12-01  3:04   ` Matthew Jones
  2010-12-02  1:25   ` Sven Bretfeld
  1 sibling, 2 replies; 19+ messages in thread
From: Mark Elston @ 2010-11-30  3:10 UTC (permalink / raw)
  To: emacs-orgmode

Have you looked at sl4a (formerly ase)?  With it you can
start Intents and perform clipboard operations plus file
manipulations using a standard scripting language like
perl, python, or ruby (among others).  This might be
very useful.

Mark

On 11/28/2010 11:10 AM, Sven Bretfeld wrote:
> Hi together
>
> TextToSpeech has made our lives easier, especially for car-drivers like
> me. I have tried to capture tasks by voice on my Android device and
> implement them automatically to my org-files at home. The results are
> practicable but far from optimal by now. Maybe there are some Android
> users on this list who like to get involved in trying to find an optimal
> solution.
>
> *My method at the moment:*
>
> I use "tasker," the Android killer-app for automatizing almost every
> thinkable task. Created a new task called "org-voice" with tasker.
> Pressing the associated icon does the following:
>
> 1. Plays Darth Vader's voice saying "What is thy bidding, my master?"
>
> 2. Loads app Voice2Clipboard
>
> 3. Waits for 30 seconds (to get Voice2Clipboard ready for recording and
>     for me to finish speaking the note)
>
> 4. Write File: Writes the clipboard content to a file
>     /sdcard/dropbox/org/org-voice.org
>
> After uploading the file with Dropbox, a cronjob on my PC (which is
> always switched on) takes care of the file. Its lines (each is a capture
> item) are transformed by a series of sed operations and put into a
> different file from-org-voice.org together with some TAGS and a TODO
> keyword; after that the original file is emptied. That's it.
>
> The problem with this approach is that you still have to manually
> download the (empty) capture-file (org-voice.org)[¹] and to manually upload
> it again, because Dropbox for Android doesn't sync changed files on the
> sdcard automatically. And especially to upload process needs quite a
> view clicks.
>
> *What would be better:*
>
> Use MobileOrg and have the clipboard contents written into the file used
> by MobileOrg for written captures. This is
> /sdcard/mobileorg/mobileorg.org if you use sdcard-storage. This way, you
> could use MobileOrg's own syncing process and no cronjob would be
> necessary.
>
> This could be done in two ways:
>
> 1. Use the same procedure and let tasker write the contents into the
>     file directly. This is not possible for me since I have to use
>     internal-storage for reasons of performance[²] and the files in
>     /data/data/com.matburt.mobileorg/files/ are not writable for other
>     programs without root.
>
> 2. Use tasker to start MobileOrg, enter the capture dialog and have a
>     voice recognition app started. I simply don't know how to do that.
>
> Maybe tasker can even be programmed to automatically start MobileOrg's
> syncing process from time to time. But I don't know if and how this is
> possible.
>
> Does anybody have a better solution? Or a better idea?
>
> Greetings,
>
> Sven
>
> [¹]  If you don't, the next sync with dropbox would replace the file
> with your notes by the empty file hosted on the Dropbox server.
> [²]  On HTC Magic (Android 1.6) sdcard-storage makes MobileOrg
> incredibly slow. It takes more than a minute after starting MobileOrg
> until the files are displayed.
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-11-29  2:58 ` Matthew Jones
@ 2010-11-30 22:06   ` Sven Bretfeld
  0 siblings, 0 replies; 19+ messages in thread
From: Sven Bretfeld @ 2010-11-30 22:06 UTC (permalink / raw)
  To: Matthew Jones; +Cc: emacs-org

Hi Matthew

Matthew Jones <bsdmatburt@gmail.com> writes:

> MobileOrg Android already supports speech to text in that, you can go to
> capture a new note and click the mic button on the soft keyboard and start
> speaking.  I don't see that it would be particularly difficult to integrate
> this in a larger fashion.  There could be a button on the capture interface
> that would let you start it automatically.   

Thanks for your ideas. Using MobileOrg's ability to process spoken texts
is fine. In the car, however, it would be necessary to reduce clicks to
one or two. Switching on speech input on the soft-keyboard would be
difficult, because the respective key is much too tiny. At the moment
I'm using "Voice Command" which starts recording when pressing the
"search" key (hardware). This is fine. But still one has to manually
start MobileOrg, switch to the capture screen and paste the text. That
could be easier with the help of Tasker.

> Also... given that you had a button to activate the speech to text without
> having to pull up the soft keyboard... you could write another application
> that calls MobileOrg's Capture activity with that mode enabled.

I have tried to teach Tasker how to call the Capture activity. Without
success so far. Am I right that the activity is called by the command
"com.matburt.mobileorg.Capture"? To my regret, Tasker's "Action Intent"
task doesn't seem to understand that command. If I could get that
working, it would be easy to create an icon to capture a spoken note and
save it with only one click.

Greetings,

Sven

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-11-30  3:10 ` Mark Elston
@ 2010-12-01  3:04   ` Matthew Jones
  2010-12-02  1:25   ` Sven Bretfeld
  1 sibling, 0 replies; 19+ messages in thread
From: Matthew Jones @ 2010-12-01  3:04 UTC (permalink / raw)
  To: Mark Elston; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3895 bytes --]

I have this grand plan to implement support for this in MobileOrg, I didn't
realize the project had changed, thanks for piquing my interest in it again.

http://matburt.net


On Mon, Nov 29, 2010 at 10:10 PM, Mark Elston <m_elston@comcast.net> wrote:

> Have you looked at sl4a (formerly ase)?  With it you can
> start Intents and perform clipboard operations plus file
> manipulations using a standard scripting language like
> perl, python, or ruby (among others).  This might be
> very useful.
>
> Mark
>
>
> On 11/28/2010 11:10 AM, Sven Bretfeld wrote:
>
>> Hi together
>>
>> TextToSpeech has made our lives easier, especially for car-drivers like
>> me. I have tried to capture tasks by voice on my Android device and
>> implement them automatically to my org-files at home. The results are
>> practicable but far from optimal by now. Maybe there are some Android
>> users on this list who like to get involved in trying to find an optimal
>> solution.
>>
>> *My method at the moment:*
>>
>> I use "tasker," the Android killer-app for automatizing almost every
>> thinkable task. Created a new task called "org-voice" with tasker.
>> Pressing the associated icon does the following:
>>
>> 1. Plays Darth Vader's voice saying "What is thy bidding, my master?"
>>
>> 2. Loads app Voice2Clipboard
>>
>> 3. Waits for 30 seconds (to get Voice2Clipboard ready for recording and
>>    for me to finish speaking the note)
>>
>> 4. Write File: Writes the clipboard content to a file
>>    /sdcard/dropbox/org/org-voice.org
>>
>> After uploading the file with Dropbox, a cronjob on my PC (which is
>> always switched on) takes care of the file. Its lines (each is a capture
>> item) are transformed by a series of sed operations and put into a
>> different file from-org-voice.org together with some TAGS and a TODO
>> keyword; after that the original file is emptied. That's it.
>>
>> The problem with this approach is that you still have to manually
>> download the (empty) capture-file (org-voice.org)[¹] and to manually
>> upload
>> it again, because Dropbox for Android doesn't sync changed files on the
>> sdcard automatically. And especially to upload process needs quite a
>> view clicks.
>>
>> *What would be better:*
>>
>> Use MobileOrg and have the clipboard contents written into the file used
>> by MobileOrg for written captures. This is
>> /sdcard/mobileorg/mobileorg.org if you use sdcard-storage. This way, you
>> could use MobileOrg's own syncing process and no cronjob would be
>> necessary.
>>
>> This could be done in two ways:
>>
>> 1. Use the same procedure and let tasker write the contents into the
>>    file directly. This is not possible for me since I have to use
>>    internal-storage for reasons of performance[²] and the files in
>>    /data/data/com.matburt.mobileorg/files/ are not writable for other
>>    programs without root.
>>
>> 2. Use tasker to start MobileOrg, enter the capture dialog and have a
>>    voice recognition app started. I simply don't know how to do that.
>>
>> Maybe tasker can even be programmed to automatically start MobileOrg's
>> syncing process from time to time. But I don't know if and how this is
>> possible.
>>
>> Does anybody have a better solution? Or a better idea?
>>
>> Greetings,
>>
>> Sven
>>
>> [¹]  If you don't, the next sync with dropbox would replace the file
>> with your notes by the empty file hosted on the Dropbox server.
>> [²]  On HTC Magic (Android 1.6) sdcard-storage makes MobileOrg
>> incredibly slow. It takes more than a minute after starting MobileOrg
>> until the files are displayed.
>>
>>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 4936 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-11-30  3:10 ` Mark Elston
  2010-12-01  3:04   ` Matthew Jones
@ 2010-12-02  1:25   ` Sven Bretfeld
  2010-12-02  1:52     ` Mark Elston
  1 sibling, 1 reply; 19+ messages in thread
From: Sven Bretfeld @ 2010-12-02  1:25 UTC (permalink / raw)
  To: Mark Elston; +Cc: emacs-orgmode

Hi Mark

Mark Elston <m_elston@comcast.net> writes:

> Have you looked at sl4a (formerly ase)?  With it you can
> start Intents and perform clipboard operations plus file
> manipulations using a standard scripting language like
> perl, python, or ruby (among others).  This might be
> very useful.

That's really useful. I have created a simple python script to call
voice input:

,----SpeechToClip.py
| 
| import android
| droid = android.Android()
| droid.setClipboard(droid.recognizeSpeech()[1])
| 
`----

Now, I couldn't figure out how to extend the script to call MobileOrg's
Capture activity. Is that possible? Maybe even with an automatic
insertion of the clipboard content?

Thanks for help

Sven

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-02  1:25   ` Sven Bretfeld
@ 2010-12-02  1:52     ` Mark Elston
  2010-12-02  3:13       ` Matthew Jones
  2010-12-02  8:02       ` Sven Bretfeld
  0 siblings, 2 replies; 19+ messages in thread
From: Mark Elston @ 2010-12-02  1:52 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-orgmode

I don't know about the current state of MobileOrg and its
implementation details but I would look at the two sl4a
methods:

   startActivity, and
   startActivityForResult.

Playing with these two methods should get you most of the
way there, I would think.

Mark


2010 5:25 PM, Sven Bretfeld wrote:
> Hi Mark
>
> Mark Elston<m_elston@comcast.net>  writes:
>
>> Have you looked at sl4a (formerly ase)?  With it you can
>> start Intents and perform clipboard operations plus file
>> manipulations using a standard scripting language like
>> perl, python, or ruby (among others).  This might be
>> very useful.
>
> That's really useful. I have created a simple python script to call
> voice input:
>
> ,----SpeechToClip.py
> |
> | import android
> | droid = android.Android()
> | droid.setClipboard(droid.recognizeSpeech()[1])
> |
> `----
>
> Now, I couldn't figure out how to extend the script to call MobileOrg's
> Capture activity. Is that possible? Maybe even with an automatic
> insertion of the clipboard content?
>
> Thanks for help
>
> Sven
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-02  1:52     ` Mark Elston
@ 2010-12-02  3:13       ` Matthew Jones
  2010-12-02  8:02       ` Sven Bretfeld
  1 sibling, 0 replies; 19+ messages in thread
From: Matthew Jones @ 2010-12-02  3:13 UTC (permalink / raw)
  To: Mark Elston; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1543 bytes --]

I think I need to make a small change to the Capture activity to allow it to
be invoked... I'm looking into it right now.

http://matburt.net


On Wed, Dec 1, 2010 at 8:52 PM, Mark Elston <m_elston@comcast.net> wrote:

> I don't know about the current state of MobileOrg and its
> implementation details but I would look at the two sl4a
> methods:
>
>  startActivity, and
>  startActivityForResult.
>
> Playing with these two methods should get you most of the
> way there, I would think.
>
> Mark
>
>
>
> 2010 5:25 PM, Sven Bretfeld wrote:
>
>> Hi Mark
>>
>> Mark Elston<m_elston@comcast.net>  writes:
>>
>>  Have you looked at sl4a (formerly ase)?  With it you can
>>> start Intents and perform clipboard operations plus file
>>> manipulations using a standard scripting language like
>>> perl, python, or ruby (among others).  This might be
>>> very useful.
>>>
>>
>> That's really useful. I have created a simple python script to call
>> voice input:
>>
>> ,----SpeechToClip.py
>> |
>> | import android
>> | droid = android.Android()
>> | droid.setClipboard(droid.recognizeSpeech()[1])
>> |
>> `----
>>
>> Now, I couldn't figure out how to extend the script to call MobileOrg's
>> Capture activity. Is that possible? Maybe even with an automatic
>> insertion of the clipboard content?
>>
>> Thanks for help
>>
>> Sven
>>
>>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 2520 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-02  1:52     ` Mark Elston
  2010-12-02  3:13       ` Matthew Jones
@ 2010-12-02  8:02       ` Sven Bretfeld
  2010-12-02 19:14         ` Mark Elston
  1 sibling, 1 reply; 19+ messages in thread
From: Sven Bretfeld @ 2010-12-02  8:02 UTC (permalink / raw)
  To: emacs-orgmode

Mark Elston <m_elston@comcast.net> writes:

> I don't know about the current state of MobileOrg and its
> implementation details but I would look at the two sl4a
> methods:
>
>   startActivity, and
>   startActivityForResult.

Yea, I've tried that already. 

droid.startActivity(com.matburt.mobileorg.Capture);

looks right to me, as far as I understand the syntax but the script
starts and finishes without anything happening. :-(

Sven

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-02  8:02       ` Sven Bretfeld
@ 2010-12-02 19:14         ` Mark Elston
  2010-12-02 20:41           ` Matthew Jones
  0 siblings, 1 reply; 19+ messages in thread
From: Mark Elston @ 2010-12-02 19:14 UTC (permalink / raw)
  To: emacs-orgmode

On 12/2/2010 12:02 AM, Sven Bretfeld wrote:
> Mark Elston<m_elston@comcast.net>  writes:
>
>> I don't know about the current state of MobileOrg and its
>> implementation details but I would look at the two sl4a
>> methods:
>>
>>    startActivity, and
>>    startActivityForResult.
>
> Yea, I've tried that already.
>
> droid.startActivity(com.matburt.mobileorg.Capture);
>
> looks right to me, as far as I understand the syntax but the script
> starts and finishes without anything happening. :-(
>
> Sven
>

Sven,

Matthew said in an earlier email that he has some work to do
on the Capture activity to make this work.  I am not sure what
that work is - it *could* be that there is no Intent filter
for that Activity in the manifest for it to respond to.  That
would have the effect you noticed as (I think) both of the
above methods create Intents and send them to the app to start
the Activity.

But whatever it is you will likely have to wait for him to finish
before this will work.

Mark

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-02 19:14         ` Mark Elston
@ 2010-12-02 20:41           ` Matthew Jones
  2010-12-02 22:43             ` Mark Elston
  0 siblings, 1 reply; 19+ messages in thread
From: Matthew Jones @ 2010-12-02 20:41 UTC (permalink / raw)
  To: Mark Elston; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1618 bytes --]

Mark, you are exactly right about this... I made some good progress on it
last night, I will reply to this thread once I have something concrete.
Would love to get you guys to test and earlier version of it before I
release it to the market with that change.

http://matburt.net


On Thu, Dec 2, 2010 at 2:14 PM, Mark Elston <m_elston@comcast.net> wrote:

> On 12/2/2010 12:02 AM, Sven Bretfeld wrote:
>
>> Mark Elston<m_elston@comcast.net>  writes:
>>
>>  I don't know about the current state of MobileOrg and its
>>> implementation details but I would look at the two sl4a
>>> methods:
>>>
>>>   startActivity, and
>>>   startActivityForResult.
>>>
>>
>> Yea, I've tried that already.
>>
>> droid.startActivity(com.matburt.mobileorg.Capture);
>>
>> looks right to me, as far as I understand the syntax but the script
>> starts and finishes without anything happening. :-(
>>
>> Sven
>>
>>
> Sven,
>
> Matthew said in an earlier email that he has some work to do
> on the Capture activity to make this work.  I am not sure what
> that work is - it *could* be that there is no Intent filter
> for that Activity in the manifest for it to respond to.  That
> would have the effect you noticed as (I think) both of the
> above methods create Intents and send them to the app to start
> the Activity.
>
> But whatever it is you will likely have to wait for him to finish
> before this will work.
>
> Mark
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 2588 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-02 20:41           ` Matthew Jones
@ 2010-12-02 22:43             ` Mark Elston
  2010-12-03  5:02               ` Matthew Jones
  0 siblings, 1 reply; 19+ messages in thread
From: Mark Elston @ 2010-12-02 22:43 UTC (permalink / raw)
  To: Matthew Jones; +Cc: emacs-orgmode

Looking forward to it Matthew.  Thanks for the hard work.

Mark

On 12/2/2010 12:41 PM, Matthew Jones wrote:
> Mark, you are exactly right about this... I made some good progress on
> it last night, I will reply to this thread once I have something
> concrete.   Would love to get you guys to test and earlier version of it
> before I release it to the market with that change.
>
> http://matburt.net
>
>
> On Thu, Dec 2, 2010 at 2:14 PM, Mark Elston <m_elston@comcast.net
> <mailto:m_elston@comcast.net>> wrote:
>...
>     Sven,
>
>     Matthew said in an earlier email that he has some work to do
>     on the Capture activity to make this work.  I am not sure what
>     that work is - it *could* be that there is no Intent filter
>     for that Activity in the manifest for it to respond to.  That
>     would have the effect you noticed as (I think) both of the
>     above methods create Intents and send them to the app to start
>     the Activity.
>
>     But whatever it is you will likely have to wait for him to finish
>     before this will work.
>
>     Mark

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-02 22:43             ` Mark Elston
@ 2010-12-03  5:02               ` Matthew Jones
  2010-12-03 13:45                 ` Sven Bretfeld
  2010-12-07 10:05                 ` Sven Bretfeld
  0 siblings, 2 replies; 19+ messages in thread
From: Matthew Jones @ 2010-12-03  5:02 UTC (permalink / raw)
  To: Mark Elston, Sven Bretfeld; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2188 bytes --]

Alright guys, I've gotten this to work.... I've posted an early build of
MobileOrg that supports this here:

http://matburt.net/files/mobileorg-debug.apk

basically, you need to emit the action: com.matburt.mobileorg.CAPTURE

it takes an "extra" intent value called "txtValue" which will pre-populate
the text display.

This will be included in the next release of MobileOrg, but if you guys
could give it a try with that debug build and make sure there aren't any
glaring issues that would be much appreciated (there are some other cool new
features in there too, like colored todo tags).   I plan on providing a way
of launching this speech recognition capture interface if I can find a good
way to do it but in the meantime here's an example Python script that works
with SL4A/ASE:

import android
droid = android.Android()
message = droid.recognizeSpeech("Capture New Note").result
a = droid.startActivity("com.matburt.mobileorg.CAPTURE", None, None,
{'txtValue':message}, False)

http://matburt.net


On Thu, Dec 2, 2010 at 5:43 PM, Mark Elston <m_elston@comcast.net> wrote:

> Looking forward to it Matthew.  Thanks for the hard work.
>
> Mark
>
>
> On 12/2/2010 12:41 PM, Matthew Jones wrote:
>
>> Mark, you are exactly right about this... I made some good progress on
>> it last night, I will reply to this thread once I have something
>> concrete.   Would love to get you guys to test and earlier version of it
>> before I release it to the market with that change.
>>
>> http://matburt.net
>>
>>
>> On Thu, Dec 2, 2010 at 2:14 PM, Mark Elston <m_elston@comcast.net
>> <mailto:m_elston@comcast.net>> wrote:
>> ...
>>
>>    Sven,
>>
>>    Matthew said in an earlier email that he has some work to do
>>    on the Capture activity to make this work.  I am not sure what
>>    that work is - it *could* be that there is no Intent filter
>>    for that Activity in the manifest for it to respond to.  That
>>    would have the effect you noticed as (I think) both of the
>>    above methods create Intents and send them to the app to start
>>    the Activity.
>>
>>    But whatever it is you will likely have to wait for him to finish
>>    before this will work.
>>
>>    Mark
>>
>

[-- Attachment #1.2: Type: text/html, Size: 3226 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-03  5:02               ` Matthew Jones
@ 2010-12-03 13:45                 ` Sven Bretfeld
  2010-12-03 20:51                   ` Mark Elston
  2010-12-07 10:05                 ` Sven Bretfeld
  1 sibling, 1 reply; 19+ messages in thread
From: Sven Bretfeld @ 2010-12-03 13:45 UTC (permalink / raw)
  To: Matthew Jones; +Cc: emacs-orgmode

Hi Matthew

Matthew Jones <bsdmatburt@gmail.com> writes:

> Alright guys, I've gotten this to work.... I've posted an early build of
> MobileOrg that supports this here:
>
> http://matburt.net/files/mobileorg-debug.apk

Thank you very much for your wonderful work. It works like a charm. I
have tested it over ten times now, and it seems to be completely stable.
I will do some further testing during the weekend and also try to create
some tasker profiles with it. My ten year old son sits next to me and
suggests some ideas for you to become a millionaire :-)

Thanks again and have a nice weekend

Sven

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-03 13:45                 ` Sven Bretfeld
@ 2010-12-03 20:51                   ` Mark Elston
  2010-12-03 21:18                     ` Mark Elston
  0 siblings, 1 reply; 19+ messages in thread
From: Mark Elston @ 2010-12-03 20:51 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-orgmode

Sven,

I have tried this according to what you suggested earlier
but haven't had any luck yet.  My script is:

# Capture.py
import android
droid = android.Android()
droid.setClipboard(droid.recoggnizeSpeech().result)
droid.startActivity("com.matburt.mobileorg.Capture")

When I run this the voice capture dialog comes up and
the script exits without an exception but the Capture
activity doesn't come up and nothing is added to the
MobileOrg data.  What do you have that is different?

Mark

On 12/3/2010 5:45 AM, Sven Bretfeld wrote:
> Hi Matthew
>
> Matthew Jones<bsdmatburt@gmail.com>  writes:
>
>> Alright guys, I've gotten this to work.... I've posted an early build of
>> MobileOrg that supports this here:
>>
>> http://matburt.net/files/mobileorg-debug.apk
>
> Thank you very much for your wonderful work. It works like a charm. I
> have tested it over ten times now, and it seems to be completely stable.
> I will do some further testing during the weekend and also try to create
> some tasker profiles with it. My ten year old son sits next to me and
> suggests some ideas for you to become a millionaire :-)
>
> Thanks again and have a nice weekend
>
> Sven
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-03 20:51                   ` Mark Elston
@ 2010-12-03 21:18                     ` Mark Elston
  0 siblings, 0 replies; 19+ messages in thread
From: Mark Elston @ 2010-12-03 21:18 UTC (permalink / raw)
  To: emacs-orgmode

Arghh!

Never mind.  I didn't read Matthew's announcement well enough.

If anyone is interested a script to do this is:

--------------------------------------------------------
# Capture.py
import android
droid = android.Android()

resStr = droid.recoggnizeSpeech().result

droid.startActivity("com.matburt.mobileorg.CAPTURE",
                     None,
                     None,
                     {'txtValue' : resStr})

--------------------------------------------------------

Of course, it could be made fancier by not bringing up
the Activity if the string is empty, etc....

Thanks again, Matt.  Great work.

Mark

On 12/3/2010 12:51 PM, Mark Elston wrote:
> Sven,
>
> I have tried this according to what you suggested earlier
> but haven't had any luck yet. My script is:
>
> # Capture.py
> import android
> droid = android.Android()
> droid.setClipboard(droid.recoggnizeSpeech().result)
> droid.startActivity("com.matburt.mobileorg.Capture")
>
> When I run this the voice capture dialog comes up and
> the script exits without an exception but the Capture
> activity doesn't come up and nothing is added to the
> MobileOrg data. What do you have that is different?
>
> Mark
>
> On 12/3/2010 5:45 AM, Sven Bretfeld wrote:
>> Hi Matthew
>>
>> Matthew Jones<bsdmatburt@gmail.com> writes:
>>
>>> Alright guys, I've gotten this to work.... I've posted an early build of
>>> MobileOrg that supports this here:
>>>
>>> http://matburt.net/files/mobileorg-debug.apk
>>
>> Thank you very much for your wonderful work. It works like a charm. I
>> have tested it over ten times now, and it seems to be completely stable.
>> I will do some further testing during the weekend and also try to create
>> some tasker profiles with it. My ten year old son sits next to me and
>> suggests some ideas for you to become a millionaire :-)
>>
>> Thanks again and have a nice weekend
>>
>> Sven
>>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-03  5:02               ` Matthew Jones
  2010-12-03 13:45                 ` Sven Bretfeld
@ 2010-12-07 10:05                 ` Sven Bretfeld
  2010-12-07 16:34                   ` Matthew Jones
  1 sibling, 1 reply; 19+ messages in thread
From: Sven Bretfeld @ 2010-12-07 10:05 UTC (permalink / raw)
  To: Matthew Jones; +Cc: emacs-orgmode

Hi Matthew

Matthew Jones <bsdmatburt@gmail.com> writes:

> Alright guys, I've gotten this to work.... I've posted an early build of
> MobileOrg that supports this here:
>
> http://matburt.net/files/mobileorg-debug.apk
>
> basically, you need to emit the action: com.matburt.mobileorg.CAPTURE
>
> it takes an "extra" intent value called "txtValue" which will pre-populate the
> text display.

I was using the script for some days now and did all my capturing this
way. It is completely stable and reliable on my HTC Magic with Android
1.6. I see no hindrance for a release. 

> import android
> droid = android.Android()
> message = droid.recognizeSpeech("Capture New Note").result
> a = droid.startActivity("com.matburt.mobileorg.CAPTURE", None, None,
> {'txtValue':message}, False)

Is there a way to enlarge the 'extra' intent with some standard string?
It would be nice to have a TODO keyword and a TAG inserted
automatically. If you are like me, you tend to forget refiling the items
of from-mobile.org regularly. An automatic TAG insertion could help to
remind yourself that there is something new that needs to be cared
about. I use to give a TAG :MIT: (Most Important Things [of the day])
and have a respective Agenda View that I review several times a day. If
newly captured items could appear in this list, I would never forget
about the newly captured tasks. To my regret, I don't know anything
about Python and its syntax, but I'm sure that the 'message' variable
can be extended easily (what I have tried did never work).

As a workaround I have written a simple shellscript for a Cronjob that
starts Conky whenever there is something new in from-mobile.org. So my
desktop reminds me to refile the new items. Maybe it is of some interest
for anybody, so I give it below.

Thanks again for your nice work.

Greetings,

Sven


Here is the Script. Some values and paths have to be replaced to fit
your needs:

--8<---------------cut here---------------start------------->8---
#!/bin/bash
 
KILLNR="$(ps ax | grep "conky -c .*conkyrc-mobile" | grep -v grep | sed 's/ pts.*//g')"
NEWTASK="$(cat /home/sven/Dropbox/myconf/from-mobile.org | grep -v auto-revert | grep -v ^$ | grep -v 20[0-9][0-9])"

if [ -n "$NEWTASK" ];
then
    if [ -n "$KILLNR" ];
    then
	exit
#	echo "file is full, conky is running"
    else
	conky -c ~/.conkyrc-mobile &
#	echo "file is full, conky is not running"
    fi
else
    if [ -n "$KILLNR" ];
    then
	kill $KILLNR
#	echo "file is empty, conky is running"
    else
	exit
#	echo "file is empty, conky is not running"
    fi
fi
--8<---------------cut here---------------end--------------->8---

This script needs a special configuration file .conkyrc-mobile to be
placed in the home folder:

--8<---------------cut here---------------start------------->8---
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

use_spacer right

use_xft yes
xftfont DejaVu Sans:size=18
xftalpha 0.8
text_buffer_size 2048
 
update_interval 3.0
 
draw_shades no
 
draw_outline no
draw_borders no
uppercase no
 
stippled_borders 3
 
border_margin 9
 
border_width 10
 
default_color grey
 
own_window_colour brown
own_window_transparent yes
 
alignment top_right
 
gap_x 10
gap_y 10
 
TEXT
$color

${Color green}NEW TASKS
${execi 10 cat /home/sven/Dropbox/myconf/from-mobile.org | grep -v auto-revert | grep -v ^$ | grep -v 20[0-9][0-9]}$color
--8<---------------cut here---------------end--------------->8---

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-07 10:05                 ` Sven Bretfeld
@ 2010-12-07 16:34                   ` Matthew Jones
  2010-12-07 23:24                     ` Sven Bretfeld
  0 siblings, 1 reply; 19+ messages in thread
From: Matthew Jones @ 2010-12-07 16:34 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 4181 bytes --]

Hi Sven... that's a nice one, you might could add that to the scripts
section of the MobileOrg wiki.

Pretty soon the Capture interface will be extended to allow settings tags
and other things on captured notes... once these are in place I will extend
the CAPTURE action to also take these values as intent params.

http://matburt.net


On Tue, Dec 7, 2010 at 5:05 AM, Sven Bretfeld <sven.bretfeld@gmx.ch> wrote:

> Hi Matthew
>
> Matthew Jones <bsdmatburt@gmail.com> writes:
>
> > Alright guys, I've gotten this to work.... I've posted an early build of
> > MobileOrg that supports this here:
> >
> > http://matburt.net/files/mobileorg-debug.apk
> >
> > basically, you need to emit the action: com.matburt.mobileorg.CAPTURE
> >
> > it takes an "extra" intent value called "txtValue" which will
> pre-populate the
> > text display.
>
> I was using the script for some days now and did all my capturing this
> way. It is completely stable and reliable on my HTC Magic with Android
> 1.6. I see no hindrance for a release.
>
> > import android
> > droid = android.Android()
> > message = droid.recognizeSpeech("Capture New Note").result
> > a = droid.startActivity("com.matburt.mobileorg.CAPTURE", None, None,
> > {'txtValue':message}, False)
>
> Is there a way to enlarge the 'extra' intent with some standard string?
> It would be nice to have a TODO keyword and a TAG inserted
> automatically. If you are like me, you tend to forget refiling the items
> of from-mobile.org regularly. An automatic TAG insertion could help to
> remind yourself that there is something new that needs to be cared
> about. I use to give a TAG :MIT: (Most Important Things [of the day])
> and have a respective Agenda View that I review several times a day. If
> newly captured items could appear in this list, I would never forget
> about the newly captured tasks. To my regret, I don't know anything
> about Python and its syntax, but I'm sure that the 'message' variable
> can be extended easily (what I have tried did never work).
>
> As a workaround I have written a simple shellscript for a Cronjob that
> starts Conky whenever there is something new in from-mobile.org. So my
> desktop reminds me to refile the new items. Maybe it is of some interest
> for anybody, so I give it below.
>
> Thanks again for your nice work.
>
> Greetings,
>
> Sven
>
>
> Here is the Script. Some values and paths have to be replaced to fit
> your needs:
>
> --8<---------------cut here---------------start------------->8---
> #!/bin/bash
>
> KILLNR="$(ps ax | grep "conky -c .*conkyrc-mobile" | grep -v grep | sed 's/
> pts.*//g')"
> NEWTASK="$(cat /home/sven/Dropbox/myconf/from-mobile.org | grep -v
> auto-revert | grep -v ^$ | grep -v 20[0-9][0-9])"
>
> if [ -n "$NEWTASK" ];
> then
>    if [ -n "$KILLNR" ];
>    then
>        exit
> #       echo "file is full, conky is running"
>    else
>        conky -c ~/.conkyrc-mobile &
> #       echo "file is full, conky is not running"
>    fi
> else
>    if [ -n "$KILLNR" ];
>    then
>        kill $KILLNR
> #       echo "file is empty, conky is running"
>    else
>        exit
> #       echo "file is empty, conky is not running"
>    fi
> fi
> --8<---------------cut here---------------end--------------->8---
>
> This script needs a special configuration file .conkyrc-mobile to be
> placed in the home folder:
>
> --8<---------------cut here---------------start------------->8---
> own_window yes
> own_window_type override
> own_window_transparent yes
> own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
>
> use_spacer right
>
> use_xft yes
> xftfont DejaVu Sans:size=18
> xftalpha 0.8
> text_buffer_size 2048
>
> update_interval 3.0
>
> draw_shades no
>
> draw_outline no
> draw_borders no
> uppercase no
>
> stippled_borders 3
>
> border_margin 9
>
> border_width 10
>
> default_color grey
>
> own_window_colour brown
> own_window_transparent yes
>
> alignment top_right
>
> gap_x 10
> gap_y 10
>
> TEXT
> $color
>
> ${Color green}NEW TASKS
> ${execi 10 cat /home/sven/Dropbox/myconf/from-mobile.org | grep -v
> auto-revert | grep -v ^$ | grep -v 20[0-9][0-9]}$color
> --8<---------------cut here---------------end--------------->8---
>

[-- Attachment #1.2: Type: text/html, Size: 5594 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: MobileOrg and Voice Capturing (Android)
  2010-12-07 16:34                   ` Matthew Jones
@ 2010-12-07 23:24                     ` Sven Bretfeld
  0 siblings, 0 replies; 19+ messages in thread
From: Sven Bretfeld @ 2010-12-07 23:24 UTC (permalink / raw)
  To: Matthew Jones; +Cc: emacs-orgmode

Hi Matthew

Matthew Jones <bsdmatburt@gmail.com> writes:

> Hi Sven... that's a nice one, you might could add that to the scripts section of
> the MobileOrg wiki.

Did it.

> Pretty soon the Capture interface will be extended to allow settings tags and
> other things on captured notes... once these are in place I will extend the
> CAPTURE action to also take these values as intent params.

This is really nice.

Greetings,

Sven

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-12-07 23:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-28 19:10 MobileOrg and Voice Capturing (Android) Sven Bretfeld
2010-11-29  2:58 ` Matthew Jones
2010-11-30 22:06   ` Sven Bretfeld
2010-11-30  3:10 ` Mark Elston
2010-12-01  3:04   ` Matthew Jones
2010-12-02  1:25   ` Sven Bretfeld
2010-12-02  1:52     ` Mark Elston
2010-12-02  3:13       ` Matthew Jones
2010-12-02  8:02       ` Sven Bretfeld
2010-12-02 19:14         ` Mark Elston
2010-12-02 20:41           ` Matthew Jones
2010-12-02 22:43             ` Mark Elston
2010-12-03  5:02               ` Matthew Jones
2010-12-03 13:45                 ` Sven Bretfeld
2010-12-03 20:51                   ` Mark Elston
2010-12-03 21:18                     ` Mark Elston
2010-12-07 10:05                 ` Sven Bretfeld
2010-12-07 16:34                   ` Matthew Jones
2010-12-07 23:24                     ` Sven Bretfeld

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).