Skip to content

Commit

Permalink
Extract string resources
Browse files Browse the repository at this point in the history
  • Loading branch information
vladholubiev committed Feb 3, 2015
1 parent 2c95cc2 commit 75db76c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ protected String doInBackground(Void... params) {
Document mainPage = Jsoup.parse("<div id=\"content\"></div>");
try {
// mainPage = getFromLocalSource();
mainPage = getFromCustomRemoteSource();
// mainPage = getFromRemoteSource();
// mainPage = getFromCustomRemoteSource();
mainPage = getFromRemoteSource();
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void run() {
}
}
};
scoreCheckTimer.schedule(refreshStudentTask, 0, 10000);
scoreCheckTimer.schedule(refreshStudentTask, 0, 2 * 60 * 60 * 1000);
System.out.println(scoreCheckTimer);
} else {
Log.i(TAG, "No modules dates in the near 2 days");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public static void sendNotification() {
private static void buildNotification() {
mNotificationBuilder = new NotificationCompat.Builder(App.getContext())
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle("New score available!")
.setContentText("Open MODULE.OK to check it out!");
.setContentTitle(App.getContext().getString(R.string.notification_new_score_available_title_text))
.setContentText(App.getContext().getString(R.string.notification_new_score_detailed_text));
Intent resultIntent = new Intent(App.getContext(), MainActivity.class);
PendingIntent resultPendingIntent =
PendingIntent.getActivity(
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
<string name="last_synchronized_time">Last synced with mod.tanet</string>
<string name="surprise_message">Surprise!</string>
<string name="app_version_hint">App version</string>
<string name="notification_new_score_available_title_text">New score available!</string>
<string name="notification_new_score_detailed_text">Open MODULE.OK to check it out!</string>

<string-array name="semesters">
<item>@string/first_semester_name</item>
Expand Down

0 comments on commit 75db76c

Please sign in to comment.