Languages

Menu
Sites
Language
Wake up phone request from gear devices
As the tittle, I want to wake up phone from an native app on Gear S3. How many ways to do it? I'm totally new with Tizen native app. Is there any one can help?
Edited by: tanze phan on 03 Feb, 2017
View Selected Answer

Responses

4 Replies
Kamil N

Hi,

you need to create communication between host app on phone and client on the Gear s3 more info: http://developer.samsung.com/gear/develop/samples/companion

when you create connection between these two devices, send any message from client (gear) and host app on the phone can wake up phone or do any action.

tanze phan

Thank Kamil! Actually, I have an companion app. I used this function to send data to android app (actually it was a service) :

 

boolean send_data(char *message, void (*send_success_cb),
        void (*receive_success_cb)(char *url, char *user_id, char *password))
{
    if (send_success_cb) {
        _g_send_success_cb = send_success_cb;
    }

    if (receive_success_cb) {
        _g_receive_success_cb = receive_success_cb;
    }

    int result;
    if (priv_data.socket) {
        LOGI("Sending data");
        result = sap_socket_send_data(priv_data.socket, VIEWER_ACC_CHANNELID, strlen_nc(message), message);
        if(send_success_cb != NULL) {
            LOGI("sending successfully");
            _g_send_success_cb();
        }
    } else {
        // If not connected, insert message queue.
        insert_queue(message);
        LOGI("No service Connection");
        return FALSE;
    }
    return TRUE;

}

The app in Android still receieved data but it did not wake up.

Here is main function supported in sdk: "sap_socket_send_data(priv_data.socket, VIEWER_ACC_CHANNELID, strlen_nc(message), message);"

Is that problem caused by App in Android device or by using wrong function?

Mark as answer
Kamil N

Hi,

 

when your android app received message from Gear, try to execute code from this post http://stackoverflow.com/questions/2891337/turning-on-screen-programmatically

 

tanze phan

Thank Kamil N,

That would be best solution until now.