mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 09:57:19 -05:00
Android qml app play notification sound
This commit is contained in:
parent
3fddbaf070
commit
fcca44d1e6
@ -23,6 +23,7 @@ import android.app.NotificationManager;
|
|||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.media.RingtoneManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
|
||||||
import org.qtproject.qt5.android.bindings.QtService;
|
import org.qtproject.qt5.android.bindings.QtService;
|
||||||
@ -36,7 +37,8 @@ public class RetroShareAndroidNotifyService extends QtService
|
|||||||
mBuilder.setSmallIcon(R.drawable.retroshare06_48x48)
|
mBuilder.setSmallIcon(R.drawable.retroshare06_48x48)
|
||||||
.setContentTitle(title)
|
.setContentTitle(title)
|
||||||
.setContentText(text)
|
.setContentText(text)
|
||||||
.setAutoCancel(true);
|
.setAutoCancel(true)
|
||||||
|
.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
|
||||||
|
|
||||||
Intent intent = new Intent(this, RetroShareQmlActivity.class);
|
Intent intent = new Intent(this, RetroShareQmlActivity.class);
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
|
Loading…
Reference in New Issue
Block a user