added method to MainActivity to obtain a device ID #182

Merged
akinwale merged 2 commits from device-id into master 2018-06-20 20:07:21 +02:00
akinwale commented 2018-06-18 15:17:51 +02:00 (Migrated from github.com)
No description provided.
eukreign (Migrated from github.com) approved these changes 2018-06-20 19:54:06 +02:00
eukreign (Migrated from github.com) left a comment

LGTM; only two comments I have (may not be relevant):

  • Should the strings used in error and toast messages be internationalized/translateable?
  • I noticed a lot of static functions in the class which then end up passing around this as the Context. I assume you need to call these from somewhere else where this isn't actually available. Anyways, just something I noticed but maybe there isn't a better way to do it.
LGTM; only two comments I have (may not be relevant): - Should the strings used in error and toast messages be internationalized/translateable? - I noticed a lot of `static` functions in the class which then end up passing around `this` as the `Context`. I assume you need to call these from somewhere else where `this` isn't actually available. Anyways, just something I noticed but maybe there isn't a better way to do it.
akinwale commented 2018-06-20 20:05:47 +02:00 (Migrated from github.com)

Should the strings used in error and toast messages be internationalized/translateable?

Yes. Ideally, these will be moved to the strings.xml resource file, and we can provide translated strings for other languages in their corresponding xml resource files.

I noticed a lot of static functions in the class which then end up passing around this as the Context. I assume you need to call these from somewhere else where this isn't actually available. Anyways, just something I noticed but maybe there isn't a better way to do it.

These methods will be / are called from other parts of the code where a reference to main activity is not available, but with a reference to the activity context present.

> Should the strings used in error and toast messages be internationalized/translateable? Yes. Ideally, these will be moved to the `strings.xml` resource file, and we can provide translated strings for other languages in their corresponding xml resource files. > I noticed a lot of `static` functions in the class which then end up passing around this as the `Context`. I assume you need to call these from somewhere else where this isn't actually available. Anyways, just something I noticed but maybe there isn't a better way to do it. These methods will be / are called from other parts of the code where a reference to main activity is not available, but with a reference to the activity context present.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#182
No description provided.