[FIX] Spotify in Landscape mode

Search This thread

chaval

Senior Member
Jan 2, 2010
125
17
Here is a fix to allow Spotify to change to Portrait/Landscape based on the phones orientation
(Cant beleive Spotify doesnt have this feature:eek:)

1
Donwload the latest Spotify APK
http://www.spotify.com/wp-content/uploads/android/0.4.08/SpotifyAndroid.apk

(This fix applies for the ver .08 as the changed values are different dep. on version.)

2
Download APKEdit (Thx "whiskeybro", hope this is ok with you)
http://xdaforums.com/showthread.php?p=10157000

3
Open SpotifyAndroid.APK in the editor, go to the "Content" tab and at the bottom there are folders and files, Rightclick on "AndroidManifest" and choose "Edit"

4
Change the following value: "nosensor" to "sensor". All of them
Delete the string "a:configChanges="keyboardHidden|orientation"". There is only one.

5
Save the file and close notepad, Click "Apply" in APKEdit.
(APKEdit may hang here, let it work and it should have created a new APK, saving the old as .backup)

6
Install the new APK

Ive noticed a bug during the initial login and changing orientation.
Do it in Portrait mode and let it load your data before changing orientation.
Otherwise it works fine in landscape (lists, play, search, artist info etz)

Latest version with FIX (version 0.4.9.181)
http://www.megaupload.com/?d=XNXXV9EY
Tested only on Nexus S, hope this works on other phones, it should
 
Last edited:

misterdesign

Member
Apr 19, 2011
6
1
Works fantastic. Is there anyway to do this with the stock dialler installed within my android phone on the HTC Desire HD? I use this within my car in landscape view and want my phone setup so when the dialler shows an incoming call it isn't display in portrait as standard.
 

misterdesign

Member
Apr 19, 2011
6
1
Tell a lie.... this Spotify fix doesn't seem to work correctly.

I have followed the instructions to a T as far as I can see. I have noticed that when I first login to Spotify I can rotate the screen to landscape and portrait fine. So I've kept it in portrait as instructed, let my Spotify login and when I've rotated the phone it doesn't flip to landscape. Anyone got any ideas to why this isn't working? Needed for the car dock.

Thanks.
 

chaval

Senior Member
Jan 2, 2010
125
17
Tell a lie.... this Spotify fix doesn't seem to work correctly.

I have followed the instructions to a T as far as I can see. I have noticed that when I first login to Spotify I can rotate the screen to landscape and portrait fine. So I've kept it in portrait as instructed, let my Spotify login and when I've rotated the phone it doesn't flip to landscape. Anyone got any ideas to why this isn't working? Needed for the car dock.

Thanks.

Strange, I did it today with the latest Spotify ver and it worked fine.
All I did was to change all the nosensor to sensor and remove the config parameter.

Uninstall it and try my edited APK.
http://www.megaupload.com/?d=XNXXV9EY
 
Last edited:

campbell.0

Senior Member
Dec 10, 2009
63
1
Bristol
www.twitter.com
Big thanks.

This was irritating me since I installed original app.

Needed to uninstall original apk first. Why Spotify couldn't implement this originally, I don't know. Lazyness?

Once again, XDA to the rescue.

Thanks you.
 

brownat

Member
Oct 2, 2010
21
1
Big thanks for the fix! I cant seem to get it to work on the latest update. Every time I go to apply my changes an error pops up using apk edit. Any help would be appreciated:)
 

anonim1

Senior Member
Mar 14, 2011
181
18
Same here. I think it may be an issue with the APK Edit tool. I can recreate the issue by opening the AndroidManifest.xml file, saving it without making any changes, then clicking Apply. i'm going to post about it in the APK Edit thread. The error is below:

Code:
I: Checking whether resources has changed...
I: Building resources...
C:\Users\user1\AppData\Local\Temp\SpotifyAndroid 0.4.12.180\res\layout\sync_notification.xml:6: error: Error: No resource found that matches the given name (at 'style' with value '@android:style/TextAppearance.StatusBar.EventContent.Title').
C:\Users\user1\AppData\Local\Temp\SpotifyAndroid 0.4.12.180\res\layout\sync_notification.xml:9: error: Error: No resource found that matches the given name (at 'style' with value '@android:style/TextAppearance.StatusBar.EventContent').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\user1\AppData\Local\Temp\APKTOOL3010785002957324851.tmp, -I, C:\Users\user1\apktool\framework\1.apk, -S, C:\Users\user1\AppData\Local\Temp\SpotifyAndroid 0.4.12.180\res, -M, C:\Users\user1\AppData\Local\Temp\SpotifyAndroid 0.4.12.180\AndroidManifest.xml]
 
  • Like
Reactions: snurre

leolulz

Member
Jan 19, 2011
39
18
any chance anyone has a fixed file that isnt hosted on megaupload?

Here's a Spotify APK i built to work in landscape, although it's only version 0.4.08. I can't find out why the latest version wont install and i got no time to learn xml atm :p

Download the apk here: I cant post outside links yet :S Check the attachment instead for the APK.
 

Attachments

  • SpotifyAndroid_Signed.apk
    2.6 MB · Views: 251

Dinaiz

Member
Jul 10, 2009
36
0
Well, I quickly compared the 2 spotify versions (old one and new one). The new one's xml manifest is encrypted (see http://stackoverflow.com/questions/4191762/how-to-view-androidmanifest-xml-from-apk-file)

Basically, there's no need for apktool at all. All you need, is
- rename the apk file to zip
- change AndroidManifest.xml according to the first post
- update the zip and rename it to apk !

But there's the fact that the .zip is encrypted. I didn't manage to make this apktool work for now.
 

chaval

Senior Member
Jan 2, 2010
125
17
Long since I was in this thread. I tried to make this edit to a newer ver a couple of moths ago but failed. Still using the old one.
Keep up the work!
 

gardndj

Senior Member
Aug 1, 2008
237
5
Milwaukee
The manifest isn't encrypted, it's a just in binary format. Here's the manifest in txt form. If you can tell me what needs to be changed I should be able to edit and then recompile back to binary form.
 

Attachments

  • AndroidManifest.txt
    10.9 KB · Views: 33

gespo89

New member
Mar 3, 2010
1
0
I don't know if people are still out there looking for this, but I modded the newsest of Spotify version so I figured I'd share it. It seems to work great out of the box, so I can't for the life of me imagine why they restrict it in the first place.

No outside links for me so it's attached.
 

Attachments

  • com.spotify.mobile.android.ui-1.mod-signed.apk
    2.5 MB · Views: 234
Last edited:

zimmen

Senior Member
Jan 8, 2011
201
58
Umeå
Nice nice :D

But i have a request if someone know how to change the play/pause and skip track buttons to smaller on landscape, so you see more of the cover from the artist.
 

dedfish

Member
Apr 19, 2012
8
0
The preview version of Spotify released today has a much different manifest file. I suspect the next released version will not work with this fix. I've attached the latest manifest in text format.
 

Attachments

  • AndroidManifest.txt
    6.6 KB · Views: 41

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    I am pleased to try it :)

    Just curious, how have you done that?

    Decompilation, copied some of the layout files to layout-land, switched some stuff about, etc :p

    Attached. This has only been tested on my HTC one X, so it could look a bit wonky on other devices, so let me know!
    6
    Here is a fix to allow Spotify to change to Portrait/Landscape based on the phones orientation
    (Cant beleive Spotify doesnt have this feature:eek:)

    1
    Donwload the latest Spotify APK
    http://www.spotify.com/wp-content/uploads/android/0.4.08/SpotifyAndroid.apk

    (This fix applies for the ver .08 as the changed values are different dep. on version.)

    2
    Download APKEdit (Thx "whiskeybro", hope this is ok with you)
    http://xdaforums.com/showthread.php?p=10157000

    3
    Open SpotifyAndroid.APK in the editor, go to the "Content" tab and at the bottom there are folders and files, Rightclick on "AndroidManifest" and choose "Edit"

    4
    Change the following value: "nosensor" to "sensor". All of them
    Delete the string "a:configChanges="keyboardHidden|orientation"". There is only one.

    5
    Save the file and close notepad, Click "Apply" in APKEdit.
    (APKEdit may hang here, let it work and it should have created a new APK, saving the old as .backup)

    6
    Install the new APK

    Ive noticed a bug during the initial login and changing orientation.
    Do it in Portrait mode and let it load your data before changing orientation.
    Otherwise it works fine in landscape (lists, play, search, artist info etz)

    Latest version with FIX (version 0.4.9.181)
    http://www.megaupload.com/?d=XNXXV9EY
    Tested only on Nexus S, hope this works on other phones, it should
    5
    Attached is v0.5.2.87 with landscape support.
    2
    That's not a big problem in fact. I will use Directory Bind for the sdCard.

    By the way, it would be great to know/find where spotify stores the path to its data directory. If it's just stored in a text file, it would be really easy to update manually, without the need to install the old apk, or mess up with directory bind.

    ---------- Post added at 09:50 AM ---------- Previous post was at 09:28 AM ----------



    Found it by myself !

    it's in /data/user/0/com.spotify.mobile.android.ui/shared_prefs/spotify_preferences.xml
    I don't know if this file can easily be edited, I might give it a try today.

    Just tested with a clean spotify installation and it works (uninstalled App, deleted Data from both internal storage and external storage, then reinstalled from market, login, synced a few pl).

    So here is the "how-to move spotify data to sd without the old spotify apk" :
    Req :
    - Spotify !
    - SdCard !
    - Root (sorry ...)

    1 - Make sure Spotify isn't running, if not, terminate it (Settings\manage Apps\Spotify\Force Close)
    2 - On your extSdCard create a /Spotify folder
    3 - On your extSdCard create an Android Folder in /Spotify
    4 - On your extSdCard create a data Folder in /Spotify/Android
    5 - From your internal Storage, move Android/data/com.spotify.mobile.android.ui to your extSdCard in /Spotify/Android/data/
    6 - With a file explorer that has root capabilities, edit this file (you will have to mount / rw):
    /data/user/0/com.spotify.mobile.android.ui/shared_prefs/spotify_preferences.xml
    7 - just after <map> insert this :
    <string name="storage_location">/storage/extSdCard/Spotify</string>
    Warning, this is for a GNote2, the pass to external sdcard storage might be different on other devices. If this is your case, replace /storage/extSdCard by the appropriate path
    8 - save the file
    9 - Start Spotify.
    10 - Login
    11 - Enjoy
    For some reasons, it will ask you to re login, but that's all good. You will find your sync playlists and no data will be redownloaded
    2
    Hi everyone,

    I have taken this mod a little further to better suit my car set up. It is using the latest spotify.

    The album art is much larger. I have removed the skip buttons (because a swipe works to go forwards and backwards). I have also removed the thumbs up and down from radio.

    I think it looks way better. If you would like it let me know and I'll add it.

    edit: apk 2 posts below