mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 12:42:56 -04:00
Use string values in HotspotService
This commit is contained in:
parent
414a667564
commit
b812fec0cb
@ -123,7 +123,8 @@ public class HotspotService extends Service {
|
||||
private Notification buildForegroundNotification(String status) {
|
||||
Log.v(TAG, "Building notification " + status);
|
||||
builder = new NotificationCompat.Builder(this);
|
||||
builder.setContentTitle("Kiwix Hotspot").setContentText(status);
|
||||
builder.setContentTitle(getString(R.string.hotspot_notification_content_title))
|
||||
.setContentText(status);
|
||||
Intent targetIntent = new Intent(this, ZimHostActivity.class);
|
||||
targetIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
PendingIntent contentIntent =
|
||||
@ -167,7 +168,7 @@ public class HotspotService extends Service {
|
||||
NotificationChannel hotspotServiceChannel = new NotificationChannel(
|
||||
Constants.HOTSPOT_SERVICE_CHANNEL_ID, getString(R.string.hotspot_service_channel_name),
|
||||
NotificationManager.IMPORTANCE_DEFAULT);
|
||||
hotspotServiceChannel.setDescription("Sample hotspot description");
|
||||
hotspotServiceChannel.setDescription(getString(R.string.hotspot_channel_description));
|
||||
hotspotServiceChannel.setSound(null, null);
|
||||
builder.setChannelId(Constants.HOTSPOT_SERVICE_CHANNEL_ID);
|
||||
notificationManager.createNotificationChannel(hotspotServiceChannel);
|
||||
|
@ -50,6 +50,8 @@
|
||||
<string name="hotspot_dialog_title">Turn on your WIFI hotspot</string>
|
||||
<string name="hotspot_dialog_message">In order for this feature to work you need to first turn on your WIFI hotspot manually.</string>
|
||||
<string name="hotspot_dialog_neutral_button">YES, I’VE TURNED IT ON</string>
|
||||
<string name="hotspot_channel_description">Updates about the state of your hotspot/server.</string>
|
||||
<string name="hotspot_notification_content_title">Kiwix Hotspot</string>
|
||||
<string name="sample_ip_address">http://000.000.000.000</string>
|
||||
<string name="start_server_label">Start server</string>
|
||||
<string name="stop_server_label">Stop server</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user