mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-24 05:04:50 -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) {
|
private Notification buildForegroundNotification(String status) {
|
||||||
Log.v(TAG, "Building notification " + status);
|
Log.v(TAG, "Building notification " + status);
|
||||||
builder = new NotificationCompat.Builder(this);
|
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);
|
Intent targetIntent = new Intent(this, ZimHostActivity.class);
|
||||||
targetIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
targetIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
PendingIntent contentIntent =
|
PendingIntent contentIntent =
|
||||||
@ -167,7 +168,7 @@ public class HotspotService extends Service {
|
|||||||
NotificationChannel hotspotServiceChannel = new NotificationChannel(
|
NotificationChannel hotspotServiceChannel = new NotificationChannel(
|
||||||
Constants.HOTSPOT_SERVICE_CHANNEL_ID, getString(R.string.hotspot_service_channel_name),
|
Constants.HOTSPOT_SERVICE_CHANNEL_ID, getString(R.string.hotspot_service_channel_name),
|
||||||
NotificationManager.IMPORTANCE_DEFAULT);
|
NotificationManager.IMPORTANCE_DEFAULT);
|
||||||
hotspotServiceChannel.setDescription("Sample hotspot description");
|
hotspotServiceChannel.setDescription(getString(R.string.hotspot_channel_description));
|
||||||
hotspotServiceChannel.setSound(null, null);
|
hotspotServiceChannel.setSound(null, null);
|
||||||
builder.setChannelId(Constants.HOTSPOT_SERVICE_CHANNEL_ID);
|
builder.setChannelId(Constants.HOTSPOT_SERVICE_CHANNEL_ID);
|
||||||
notificationManager.createNotificationChannel(hotspotServiceChannel);
|
notificationManager.createNotificationChannel(hotspotServiceChannel);
|
||||||
|
@ -50,6 +50,8 @@
|
|||||||
<string name="hotspot_dialog_title">Turn on your WIFI hotspot</string>
|
<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_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_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="sample_ip_address">http://000.000.000.000</string>
|
||||||
<string name="start_server_label">Start server</string>
|
<string name="start_server_label">Start server</string>
|
||||||
<string name="stop_server_label">Stop server</string>
|
<string name="stop_server_label">Stop server</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user