JosephMillsAtWork / voicetogoog

Automatically exported from code.google.com/p/voicetogoog
1 stars 0 forks source link

Send Voice Note attachment(s) along with Voice-To-Text "body" in e-mail/SMS message composition #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps come close to solving your problem?

1. Select desired voice notes.
2. Activate menu command to email/SMS selected notes.
3. Send the SMS/email via platform messaging application.

What additional functionality is needed to satisfy your needs?

 (from http://my-meego.com/software/applications.php?fldAuto=527&faq=1#comments )
 Anonymous
 from SWITZERLAND
 on 2011-11-06 11:09 CET    
 Cool! It would be nice if what we record can be directly sent by sms! [Rate: 8/10]

The above is for VoiceToGoog version 0.1.0 on Harmattan.

...............
Public response to above ( 
http://my-meego.com/software/applications.php?fldAuto=527&faq=1#comments ):

 @Anonymous_from_SWITZERLAND -- I really wanted to be able to send the selected audio clips as attachments along with their voice-to-text as mail-body, for both SMS and E-mail. However, the goal of 0.1.0 was to "release early" and hopefully the refinements will come through the "release often" part of my development process. In the first release, 0.1.0, I just used simple API's documented in http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Launching_another_application_from_your_application.html ... for the future I'll use http://doc.qt.nokia.com/qtmobility-1.2/serviceactions.html and http://doc.qt.nokia.com/qtmobility-1.2/serviceactions.html to setup more elaborate mail drafts, with HTML body representing the voice-to-text of each selected voice note, along w/ attachment. From there you run the platform SMS/email application, fill out the address, and send. 

 If you think this is a good way of implementing this feature, please comment/vote on the feature request I've entered for this issue: http://code.google.com/p/voicetogoog/issues/detail?id=1

See also http://developer.qt.nokia.com/forums/viewthread/7759 for example code 
for sending HTML message body. Use paragraphs, list-items, table, etc to 
separate or delineate each separate voice message. (and if possible, give link 
to the  associated attachment# contained in the message?)

Original issue reported on code.google.com by NielsMa...@gmail.com on 11 Nov 2011 at 3:49

GoogleCodeExporter commented 8 years ago
Some code examples to look at for QtMobility code for messaging:
http://doc.qt.nokia.com/qtmobility-1.2/serviceactions.html

 qt-mobility-opensource-src-1.2.0/demos/serviceactions
 qt-mobility-opensource-src-1.2.0/demos/serviceactions-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Release
 qt-mobility-opensource-src-1.2.0/demos/serviceactions-build-harmattan-Harmattan_Platform_API__Qt_SDK__Release
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/attachmentlistwidget.cpp
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/attachmentlistwidget.h
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/main.cpp
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/mainwindow.cpp
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/mainwindow.h
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/serviceactions.pro
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/serviceactions.pro.user
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan/README
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan/changelog
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan/compat
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan/control
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan/copyright
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan/manifest.aegis
 qt-mobility-opensource-src-1.2.0/demos/serviceactions/qtc_packaging/debian_harmattan/rules
 qt-mobility-opensource-src-1.2.0/doc/html/serviceactions-attachmentlistwidget-cpp.html
 qt-mobility-opensource-src-1.2.0/doc/html/serviceactions-attachmentlistwidget-h.html
 qt-mobility-opensource-src-1.2.0/doc/html/serviceactions-main-cpp.html
 qt-mobility-opensource-src-1.2.0/doc/html/serviceactions-mainwindow-cpp.html
 qt-mobility-opensource-src-1.2.0/doc/html/serviceactions-mainwindow-h.html
 qt-mobility-opensource-src-1.2.0/doc/html/serviceactions-serviceactions-pro.html
 qt-mobility-opensource-src-1.2.0/doc/html/serviceactions.html
 qt-mobility-opensource-src-1.2.0/doc/src/examples/serviceactions.qdoc

http://doc.qt.nokia.com/qtmobility-1.2/keepintouch.html

 qt-mobility-opensource-src-1.2.0/examples/keepintouch
 qt-mobility-opensource-src-1.2.0/examples/keepintouch/addressfinder.cpp
 qt-mobility-opensource-src-1.2.0/examples/keepintouch/addressfinder.h
 qt-mobility-opensource-src-1.2.0/examples/keepintouch/keepintouch.pro
 qt-mobility-opensource-src-1.2.0/examples/keepintouch/main.cpp
 qt-mobility-opensource-src-1.2.0/doc/html/keepintouch-addressfinder-cpp.html
 qt-mobility-opensource-src-1.2.0/doc/html/keepintouch-addressfinder-h.html
 qt-mobility-opensource-src-1.2.0/doc/html/keepintouch-keepintouch-pro.html
 qt-mobility-opensource-src-1.2.0/doc/html/keepintouch-main-cpp.html
 qt-mobility-opensource-src-1.2.0/doc/html/keepintouch.html
 qt-mobility-opensource-src-1.2.0/doc/html/images/keepintouch-example.png
 qt-mobility-opensource-src-1.2.0/doc/src/examples/keepintouch.qdoc
 qt-mobility-opensource-src-1.2.0/doc/src/images/keepintouch-example.png

Original comment by NielsMa...@gmail.com on 11 Nov 2011 at 4:58

GoogleCodeExporter commented 8 years ago
See also http://www.developer.nokia.com/Community/Wiki/QML_SMShelper_Plugin

Original comment by NielsMa...@gmail.com on 29 Nov 2011 at 6:42

GoogleCodeExporter commented 8 years ago

Original comment by NielsMa...@gmail.com on 16 Dec 2011 at 3:43

GoogleCodeExporter commented 8 years ago
Use dbus to send message w/ attachments...

For example code see "Using D-Bus to launch applications" in 
http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_De
veloping_for_Harmattan_Launching_another_application_from_your_application.html 

This appears to be the call that needs to be accessed, not sure how the 
attachment could be stored in "list of uri string" unless that means a direct 
link to the audio file??

http://gitorious.org/modest/modest/blobs/master/libmodest-dbus-client/src/libmod
est-dbus-client.c#line102

/**
 * libmodest_dbus_client_compose_mail:
 * @osso_context: a valid #osso_context_t object.
 * @to: The Recipients (From: line)
 * @cc: Recipients for carbon copies
 * @bcc: Recipients for blind carbon copies
 * @subject: Subject line
 * @body: The actual body of the mail to compose.
 * @attachments: Additional list of attachments. A list of URI strings.
 * 
 * This function will try to do a remote procedure call (rpc)
 * into modest (or start it if necessary) and open a composer
 * window with the supplied parameters prefilled.
 *
 * Return value: Whether or not the rpc call to modest
 * was successfull
 **/
gboolean
libmodest_dbus_client_compose_mail (osso_context_t *osso_context, const gchar 
*to, const gchar *cc, 
    const gchar *bcc, const gchar* subject, const gchar* body, GSList *attachments)
{
    osso_rpc_t retval = { 0 };

    gchar *attachments_str = get_attachments_string(attachments);

    const osso_return_t ret = osso_rpc_run_with_defaults(osso_context,
           MODEST_DBUS_NAME, 
           MODEST_DBUS_METHOD_COMPOSE_MAIL, &retval, 
           DBUS_TYPE_STRING, to, 
           DBUS_TYPE_STRING, cc, 
           DBUS_TYPE_STRING, bcc, 
           DBUS_TYPE_STRING, subject, 
           DBUS_TYPE_STRING, body,
           DBUS_TYPE_STRING, attachments_str,
           DBUS_TYPE_INVALID);

    g_free (attachments_str);

    if (ret != OSSO_OK) {
        printf("debug: %s: osso_rpc_run() failed.\n", __FUNCTION__);
        return FALSE;
    } else {
        printf("debug: %s: osso_rpc_run() succeeded.\n", __FUNCTION__);
    }

    osso_rpc_free_val(&retval);

    return TRUE;
}

Original comment by NielsMa...@gmail.com on 5 Feb 2012 at 11:05

GoogleCodeExporter commented 8 years ago
regarding above, http://gag.org.ua/category/calendarfeed/ has some good hints 
on using dbus on Harmattan.

Original comment by NielsMa...@gmail.com on 5 Feb 2012 at 11:30