Bug 325061 - friendly device name
Summary: friendly device name
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Android 4.x
: NOR wishlist
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-18 14:43 UTC by Mauro Panzeri
Modified: 2013-10-30 00:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
apply as described in the comment (3.40 KB, application/x-gzip)
2013-10-09 14:36 UTC, Mauro Panzeri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mauro Panzeri 2013-09-18 14:43:53 UTC
Reading the code of the android app i can see you’re taking BUILD.device as the default device name.
I suggest taking the device name set in bluetooth settings. (if present)
If the device has no bluetooth, or the device name is not set in there, then BUILD.device should be taken.
This way the user has the opportunity to set it to a more friendly name.
(snippet code to retrieve bluetooth device name: http://goo.gl/DlceCk)

Reproducible: Always
Comment 1 Albert Vaca Cintora 2013-09-18 15:17:19 UTC
We have a list of "friendly names", and we only use the internal name if we can not find the device in the list.

In a future, though, we want people to be able to rename the device, so I don't think we implement this.
Comment 2 Mauro Panzeri 2013-09-18 15:51:24 UTC
Mine was just a proposal to get a better default name that are at the same time easily editable by the user without hacks.
(I saw the HumanDeviceNames class , but unfortunately there are 12000+ device models out there.
The list it's unmaintainable and doesn't work well if you have multiple device which are the same model.)

BTW, an internal app setting will be perfectly fine too. ;) 
thanks
Comment 3 Mauro Panzeri 2013-10-09 14:36:46 UTC
Created attachment 82750 [details]
apply as described in the comment

Here it is a patch to have a setting to change the deviceName 
unfortunately i have 2 device of the same model and i really need it to distinguish between them :)

kdeconnect-android-devicenamesetting.patch : adds the deviceName setting in the android app in a PreferenceActivity attached to the MainActivity.

kdeconnect-kded-devicenamesetting.patch : is needed in kdeconnect-kded to reread the deviceName from identityPackage and update the plasmoid/kcm data.

If the patch is too big i'll push it on the reviewboard.
Comment 4 Albert Vaca Cintora 2013-10-30 00:57:04 UTC
Git commit 9dbe1ec9cfd5744edc47299f37ac536430f7a3fa by Albert Vaca, on behalf of Mauro Panzeri.
Committed on 30/10/2013 at 00:36.
Pushed by albertvaka into branch 'master'.

Added a settings activity to change the publicly visible device name

When changed the new name will be used instead of the one from
HumanDeviceNames

REVIEW: 113204

M  +9    -0    src/main/AndroidManifest.xml
M  +2    -1    src/main/java/org/kde/kdeconnect/BackgroundService.java
M  +1    -1    src/main/java/org/kde/kdeconnect/HumanDeviceNames.java
M  +6    -1    src/main/java/org/kde/kdeconnect/NetworkPackage.java
M  +4    -1    src/main/java/org/kde/kdeconnect/UserInterface/MainActivity.java
A  +103  -0    src/main/java/org/kde/kdeconnect/UserInterface/MainSettingsActivity.java
M  +7    -0    src/main/res/menu/main.xml
M  +4    -1    src/main/res/values/strings.xml
A  +15   -0    src/main/res/xml/general_preferences.xml

http://commits.kde.org/kdeconnect-android/9dbe1ec9cfd5744edc47299f37ac536430f7a3fa