Rectangle 27 20

Well currently I'm working on a project and came across Sliding menu,i googled but get disappointed to see that no one has given some instructions or hints on how to start making a sliding menu, Every one has given link to some Github's projects/libraries to use, Hence I decided to do it myself and finally i have my own Sliding Menu Ready...

1. on making animations of sliding

2. on making it work with all screen resolutions

Its really easy and simple once you get some idea about Animations, I have read some where, its not sensible to re-invent the Wheel(people who are refering to github source code of sliding menu),but i believe that you should at least once try to make your own so you get a idea how it actually works and function :P

//later in the code it will be refer as findLayout
<?xml version="1.0" encoding="utf-8"?>


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <RelativeLayout
        android:id="@+id/find_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <RelativeLayout
        android:id="@+id/header" 
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:padding="2dp"
        android:background="@drawable/main_header">

        <Button 
            android:id="@+id/filter"
            android:layout_width="40dp"
            android:layout_height="30dp"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:background="@drawable/filter_button" />

        <TextView 
            android:id="@+id/city"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/filter"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="3dp"
            android:text="Islamabad"
            android:textSize="22sp"
            android:textStyle="bold"
            android:textColor="@android:color/primary_text_dark"/>

        <RelativeLayout 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/city"
            android:layout_alignLeft="@+id/city">

            <TextView 
                android:id="@+id/interested_in"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:text="Men and Women"
                android:textSize="12sp"
                android:textColor="@android:color/primary_text_dark"/>

            <ImageView 
                android:id="@+id/separator"
                android:layout_width="2dp"
                android:layout_height="18dp"
                android:layout_toRightOf="@+id/interested_in"
                android:layout_marginLeft="4dp"
                android:src="@drawable/separator_1"
                android:layout_centerVertical="true" />

            <TextView 
                android:id="@+id/age"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dp"
                android:layout_toRightOf="@+id/separator"
                android:layout_centerVertical="true"
                android:text="18-24 years"
                android:textSize="12sp"
                android:textColor="@android:color/primary_text_dark"/>

            <ImageView
                android:id="@+id/separator_1" 
                android:layout_width="2dp"
                android:layout_height="18dp"
                android:layout_toRightOf="@+id/age"
                android:layout_marginLeft="4dp"
                android:src="@drawable/separator_1"
                android:layout_centerVertical="true" />

            <TextView 
                android:id="@+id/distance"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dp"
                android:layout_toRightOf="@+id/separator_1"
                android:layout_centerVertical="true"
                android:text=">30km"
                android:textSize="12sp"
                android:textColor="@android:color/primary_text_dark"/>


        </RelativeLayout>

    </RelativeLayout>

    <GridView 
        android:id="@+id/users_grid"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/header"
        android:numColumns="4">

    </GridView>

    </RelativeLayout>

    <include 
        layout="@layout/filter"/> //here i included the filter.xml, which is on top of find.xml layout and is initially invisible

</RelativeLayout>
//later in code refer as FilterLayout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/filter_layout"
    android:visibility="invisible"
    android:layout_width="260dp"
    android:layout_height="match_parent"
    android:background="@drawable/grey_bg" >

    <ImageView 
        android:id="@+id/profile_pic"
        android:layout_width="match_parent"
        android:layout_height="220dp"
        android:src="@drawable/pic"/>

    <RelativeLayout
        android:id="@+id/header" 
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:paddingLeft="10dp"
        android:paddingTop="5dp"
        android:layout_below="@+id/profile_pic"
        android:background="@drawable/light_blue_header">

        <TextView
            android:id="@+id/name" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="3dp"
            android:text="Raja Babar"
            android:textSize="18sp"
            android:textStyle="bold"
            android:textColor="@android:color/primary_text_dark"/>

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/name"
            android:layout_alignLeft="@+id/name">

            <TextView
                android:id="@+id/gender"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:text="Male"
                android:textSize="12sp"
                android:textColor="@android:color/primary_text_dark" />

            <ImageView 
                android:id="@+id/seperator"
                android:layout_width="2dp"
                android:layout_height="20dp"
                android:layout_toRightOf="@+id/gender"
                android:layout_marginLeft="5dp"
                android:src="@drawable/separator_1"
                android:layout_centerVertical="true" />

            <TextView
                android:id="@+id/age"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@+id/seperator"
                android:layout_marginLeft="5dp"
                android:layout_centerVertical="true"
                android:text="22 years"
                android:textSize="12sp"
                android:textColor="@android:color/primary_text_dark" />

        </RelativeLayout>


    </RelativeLayout>

    <ScrollView 
        android:layout_width="250dp"
        android:layout_height="wrap_content"
        android:layout_below="@+id/header"
        android:layout_marginTop="15dp"
        android:layout_centerHorizontal="true">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

    <TextView
            android:id="@+id/filter_options" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/filter_options"
            android:textSize="18sp"
            android:textStyle="bold"
            android:textColor="@android:color/primary_text_light"/>

    <RelativeLayout
        android:id="@+id/interested_in_layout" 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="15dp"
        android:paddingRight="40dp"
        android:layout_below="@+id/filter_options"
        android:background="@drawable/interested_in_field">

        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:text="@string/gender"
            android:textSize="18sp"
            android:textStyle="bold"
            android:textColor="@android:color/primary_text_light"/>

        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:text="@string/women_men"
            android:textSize="18sp"
            android:textColor="#33b9cd" />


    </RelativeLayout>
    <RelativeLayout
        android:id="@+id/age_layout" 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="15dp"
        android:paddingRight="40dp"
        android:layout_below="@+id/interested_in_layout"
        android:background="@drawable/age_field_1">

        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:text="@string/age"
            android:textSize="18sp"
            android:textStyle="bold"
            android:textColor="@android:color/primary_text_light"/>

        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:text="18-24 years"
            android:textSize="18sp"
            android:textColor="#33b9cd"/>


    </RelativeLayout>
    <RelativeLayout 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="15dp"
        android:paddingRight="40dp"
        android:layout_below="@+id/age_layout"
        android:background="@drawable/distance_field">

        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:text="@string/distance"
            android:textSize="18sp"
            android:textStyle="bold"
            android:textColor="@android:color/primary_text_light"/>

        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:text=">30km"
            android:textSize="18sp"
            android:textColor="#33b9cd"/>


    </RelativeLayout>



    </RelativeLayout>

    </ScrollView>



</RelativeLayout>

In find.xml i have included filter.xml initially which is invisible

package matchat.helpers;

import com.s3.matchat.R;

import android.content.Context;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.RelativeLayout;

public class FilterAnimation implements AnimationListener 
{
    Context context;

    RelativeLayout filterLayout, otherLayout;

    private Animation filterSlideIn, filterSlideOut, otherSlideIn, otherSlideOut;

    private static int otherLayoutWidth, otherLayoutHeight;

    private boolean isOtherSlideOut = false;

    private int deviceWidth;

    private int margin;

    public FilterAnimation(Context context) 
    {
        this.context = context;

        DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();

        deviceWidth = displayMetrics.widthPixels; // as my animation is x-axis related so i gets the device width and will use that width,so that this sliding menu will work fine in all screen resolutions
    }

    public void initializeFilterAnimations(RelativeLayout filterLayout)
    {
        this.filterLayout = filterLayout;

        filterSlideIn = AnimationUtils.loadAnimation(context, R.anim.filter_slide_in);

        filterSlideOut = AnimationUtils.loadAnimation(context, R.anim.filter_slide_out);    

    }

    public void initializeOtherAnimations(RelativeLayout otherLayout)
    {       
        this.otherLayout = otherLayout;

        otherLayoutWidth = otherLayout.getWidth();

        otherLayoutHeight = otherLayout.getHeight();


        otherSlideIn = AnimationUtils.loadAnimation(context, R.anim.other_slide_in);
        otherSlideIn.setAnimationListener(this);

        otherSlideOut = AnimationUtils.loadAnimation(context, R.anim.other_slide_out);
        otherSlideOut.setAnimationListener(this);
    }

    public void toggleSliding()
    {
        if(isOtherSlideOut) //check if findLayout is already slided out so get so animate it back to initial position
        {

            filterLayout.startAnimation(filterSlideOut);

            filterLayout.setVisibility(View.INVISIBLE);

            otherLayout.startAnimation(otherSlideIn);

        }
        else //slide findLayout Out and filterLayout In
        {
            otherLayout.startAnimation(otherSlideOut);

            filterLayout.setVisibility(View.VISIBLE);

            filterLayout.startAnimation(filterSlideIn);
        }
    }

    @Override
    public void onAnimationEnd(Animation animation) 
    {
        if(isOtherSlideOut) //Now here we will actually move our view to the new position,because animations just move the pixels not the view
        {
            RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(otherLayoutWidth, otherLayoutHeight);

            otherLayout.setLayoutParams(params);

            isOtherSlideOut = false;
        }
        else
        {   
            margin = (deviceWidth * 80) / 100; //here im coverting device percentage width into pixels, in my other_slide_in.xml or other_slide_out.xml you can see that i have set the android:toXDelta="80%",so it means the layout will move to 80% of the device screen,to work across all screens i have converted percentage width into pixels and then used it



            RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(otherLayoutWidth, otherLayoutHeight);

            params.leftMargin = margin;

            params.rightMargin = -margin; //same margin from right side (negavite) so that our layout won't get shrink


            otherLayout.setLayoutParams(params);

            isOtherSlideOut = true;

            dimOtherLayout();
        }
    }

    @Override
    public void onAnimationRepeat(Animation animation) 
    {

    }

    @Override
    public void onAnimationStart(Animation animation) 
    {

    }

    private void dimOtherLayout()
    {
        AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.5f);

        alphaAnimation.setFillAfter(true);

        otherLayout.startAnimation(alphaAnimation);
    }

}
package main.matchat.activities;

import matchat.helpers.FilterAnimation;
import com.s3.matchat.R;
import android.app.Activity;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.View.OnClickListener;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.widget.Button;
import android.widget.RelativeLayout;

public class Find extends Activity implements OnClickListener
{
    RelativeLayout filterLayout, findLayout;

    Button btFilter;

    FilterAnimation filterAnimation;

    @Override
    protected void onCreate(Bundle savedInstanceState) 
    {       
        super.onCreate(savedInstanceState);
        setContentView(R.layout.find);

        filterLayout = (RelativeLayout)findViewById(R.id.filter_layout);

        findLayout = (RelativeLayout)findViewById(R.id.find_layout);

        btFilter = (Button)findViewById(R.id.filter);
        btFilter.setOnClickListener(this);

        filterAnimation = new FilterAnimation(this);

        initializeAnimations(); 
    }

    private void initializeAnimations()
    {   //Setting GlobolLayoutListener,when layout is completely set this function will get called and we can have our layout onbject with correct width & height,else if you simply try to get width/height of your layout in onCreate it will return 0

        final ViewTreeObserver filterObserver = filterLayout.getViewTreeObserver();

        filterObserver.addOnGlobalLayoutListener(new OnGlobalLayoutListener() 
        {

            @Override
            public void onGlobalLayout() 
            {
                filterLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);

                DisplayMetrics displayMetrics = getResources().getDisplayMetrics();

                int deviceWidth = displayMetrics.widthPixels;

                int filterLayoutWidth = (deviceWidth * 80) / 100; //here im coverting device percentage width into pixels, in my other_slide_in.xml or other_slide_out.xml you can see that i have set the android:toXDelta="80%",so it means the layout will move to 80% of the device screen,to work across all screens i have converted percentage width into pixels and then used it

                RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(filterLayoutWidth, RelativeLayout.LayoutParams.MATCH_PARENT);

                filterLayout.setLayoutParams(params);//here im setting the layout params for my filter.xml because its has width 260 dp,so work it across all screen i first make layout adjustments so that it work across all screens resolution 

                filterAnimation.initializeFilterAnimations(filterLayout);

            }
        });

        final ViewTreeObserver findObserver = findLayout.getViewTreeObserver();

        findObserver.addOnGlobalLayoutListener(new OnGlobalLayoutListener() 
        {

            @Override
            public void onGlobalLayout() 
            {
                findLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);

                filterAnimation.initializeOtherAnimations(findLayout);
            }
        });

    }

    @Override
    public void onClick(View v) 
    {
        int id = v.getId();

        switch(id)
        {

        case R.id.filter:

            filterAnimation.toggleSliding();

            break;
        }
    } 

}

Here are the animations res/anim

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:interpolator="@android:anim/decelerate_interpolator">

    <translate 
        android:fromXDelta="0%"
        android:toXDelta="-100%"
        android:duration="1000"/>

</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:interpolator="@android:anim/decelerate_interpolator">

    <translate 
        android:fromXDelta="0%"
        android:toXDelta="80%"
        android:duration="1000"
        android:fillEnabled="true"/>

</set>

There you go a complete working and functional Sliding Menu, and you can customized it to meet your requirements,if any one still have some problems setting up,feel free to ask,i feel pleasure to help you out :)

@GautamVasoya Yeah surely you can customize it and on Gesture event you can simply animate it

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 14

I have been using this library these days and it works pretty well. Indeed, its usage is very straightforward.

You just declare a side_navigation.xml under your menu folder:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

    <item
        android:id="@+id/side_navigation_menu_chart"
        android:icon="@drawable/icon_kitsch_gray"
        android:title="@string/navigation_chart"/>
    <item
        android:id="@+id/side_navigation_menu_info"
        android:icon="@drawable/ic_menu_info_details"
        android:title="@string/navigation_info"/>
    <item
        android:id="@+id/side_navigation_menu_gallery"
        android:icon="@drawable/ic_menu_gallery"
        android:title="@string/navigation_photos"/>
    <item
        android:id="@+id/side_navigation_menu_signin"
        android:icon="@drawable/ic_menu_login"
        android:title="@string/navigation_signin"/>
    <item
        android:id="@+id/side_navigation_menu_settings"
        android:icon="@drawable/ic_menu_preferences"
        android:title="@string/navigation_settings"/>

</menu>

Then, in your activity layout, you add the navigation View:

<com.devspark.sidenavigation.SideNavigationView
    android:id="@+id/side_navigation_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

And, in your activity, you link both of them:

SideNavigationView sideNavigationView = (SideNavigationView)findViewById(R.id.side_navigation_view);
sideNavigationView.setMenuItems(R.menu.side_navigation);

To trigger the side navigation panel, is a good option to call it when the user presses the home icon in the ActionBar. For example:

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case android.R.id.home:
            sideNavigationView.toggleMenu();
            return true;

        default:
            return super.onOptionsItemSelected(item);
    }
}

You have to remove that button off. The side navigation view will provide you everything you need to trigger it. See my edit.

@Chinaski: Hi, I am a rookie in Android development. Can you please help me with importing this library with my current project. I have downloaded a zip file from github but I don't see any .jar file. I have previously imported .jar libraries into project. But this one looks different. Help me out!!

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 4

Background playback should work just fine. You do need the audio item in your UIBackgroundModes Info.plist entry, though. Also, make sure you test on a device - I know remote control events don't work in the iOS Simulator, and that might be the case for background audio as well.

AVAudioSession

audio - iOS: Keep playing music in background with Spotify SDK - Stack...

ios audio avaudioplayer spotify
Rectangle 27 3

Use the official version. Google released the Navigation Drawer pattern at I/O 2013 and has updated the version 4 support library to include this. :)

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 3

You can also use www.scringo.com. It's an SDK that allows you to add this kind of side menu with practically just this piece of code:

Scringo scringo = new Scringo();
scringo.init();

There's a lot of configuration you can do later on from the site (menu direction, colors, etc...) and can also add built-in features to the menu such as inbox, find/invite friends, radar, etc...

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 2

You can read this 3 articles about it :

to get an idea :)

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 2

Here's a simple sliding menu developed by me, check the project in github, very simple to implement http://github.com/leonardosalles/shipp-sliding-menu

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 1

A quick search in github does reveal one project that has implemented the UI pattern.

See also the Prixing app on the Google Play to try out the side navigation implemented by Cyril.

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 1

If you want to make your own Sliding menu instead of using other libraries, for better understand on how things work, then read my articles here

To achieve sliding effect, you can move the menu, or the content view, or both, all depend on your desire.

Te idea is to rely on 2 methods offsetLeftAndRight() and layout() to update the view position. You 'll also need Scroller to facilitate animation

Android - How to make slide menu like facebook, spotify and Google + -...

android
Rectangle 27 0

It turns out this can be done with CSS:

.sp-player {
  display: block !important; 
  height: 100% !important; 
  width: 100% !important;
}

#wrapper {
  width: 200px;
  height: 200px;
}
<div id="wrapper">
  <div id="#my-album-player"></div>
</div>

Thanks to Simon on the freenode #spotify IRC channel.

javascript - How can I make a Large album player using Spotify apps AP...

javascript api spotify
Rectangle 27 0

You have probably a CSS rule preventing scrollbars from appearing. After requesting the CSS that are part of the Spotify Views, make sure you set the overflow property of the html element to auto:

html { overflow: auto; }

The strange thing is overflow: hidden coming from the spotify base.css. I specified overflow: auto in my own css but it is not overwriting the hidden value ...also tried to add !important...anyway your point was right :)!thx

No scrollbars in Spotify Preview API - Stack Overflow

spotify
Rectangle 27 0

Sure, you can use the Client Credentials flow. However, remember that in most endpoints doesn't make sense unless the access token is connected to a user. I believe the are PHP wrappers which helps you make the request to get the access token using this flow.

php - How to get Spotify api access token without asking user to login...

php spotify access-token spotify-app
Rectangle 27 0

You are right, and yours is the best way of checking it. You need to make 2 asynchronous calls and chain them like that.

An alternative would be to fetch first the identifier for the current user through models.session.user.load('username').done(function(u) { ... });, which returns the username, and then compared it with the uri of the owner of the playlist (prefixing the username with spotify:user:. But, as you can see, this alternative wouldn't save you from making 2 nested calls.

javascript - Chaining load calls in Spotify apps api - Stack Overflow

javascript api spotify promise spotify-app
Rectangle 27 0

Well, it's making a brand new playlist each time because you're doing this on each click:

var playlist = new models.Playlist(albumTitle+" - "+artistFromAlbum);

The new in that line really means it ;-)

If you want to use the same playlist over multiple clicks, store the playlists you create in a variable somewhere so you can access it again later. Unfortunately there's no way at present to look at the list of playlists the user has.

Well I think I wasn't specific enough with my problem. I edited my description to make it hopefully more clear what occurs. I also tried to use variables, also Arrays, to store appended playlists. Getting huge amounts of codes for 1 simple function, and the problem still isn't solved. Any ideas?

javascript - Spotify: How to prevent it remembers listening more then ...

javascript api spotify playlist
Rectangle 27 0

Not sure how best to incorporate this into your design, but the Spotify widget can be pretty picky about its proportions. They give min and max width and height on the documentation page, but more importantly it contains this little gem:

The larger player will be rendered if the given height is 80 pixels greater than the given width. Otherwise the compact player will be rendered.

That sounds like it should only affect which player version is shown. In reality, I've found that not conforming to that restriction across the board results in some funky display glitches - parts of the player being hidden, big chunks of whitespace in the iframe, etc.

I've got the widget displaying pretty well with a variety of playlists in a dynamically-sized shadowbox, but since that shadowbox is launched with javascript I have full control over the width and height. I'm able to always set the width to height - 80.

It also doesn't handle resizing of the window well. The iframe resizes perfectly, but its contents don't redraw. The actual widget page seems to calculate its dimensions based on available space in the iframe when it initially loads, and doesn't watch for page resize events. You can see that's the case even without the iframe by loading a widget url directly. If that's a big concern for you, maybe your outer page can use javascript to watch for a resize, and use that event to trigger a refresh of the iframe?

Making Spotify Embeds Responsive - Stack Overflow

embed responsive-design spotify
Rectangle 27 0

Spotify's Web API doesn't support adding tracks to the Starred list, and it doesn't officially support retrieving Starred tracks. The 500 response status code is a bug - the correct response should be 404 Not Found. Hopefully this will be solved shortly.

Update: The Web API now returns 404 Not Found for attempting to add tracks to the Starred playlist.

ruby on rails - How can I add tracks to "starred" playlist in Spotify?...

ruby-on-rails ruby ruby-on-rails-4 spotify
Rectangle 27 0

The service seems to be down. I'm seeing the same thing. If you check out the responses listed on this page it says a 503 error means the service is temporarily unavailable. Which is exactly what the error message itself says, but it's nice to have confirmation. Wish I knew how long it might be down though.

javascript - Spotify fetching artist information - Error 503 Service -...

javascript html ajax json spotify
Rectangle 27 0

If the playlist backend is running slowly, it can take a little while for changes made in the client to make it to the Spotify backend. Only once they're in the backend will the changes make it down to other clients.

Have updated my question a bit. When you say the backend are you referring to the normal windows client? Some of the tracks I removed on Friday and they are still being returned 3 days later. Am wondering how to troubleshoot further.

No, by "backend" I mean the Spotify servers. You can double-check by installing the Spotify client on a new machine and see what it displays for your playlists. Also, beware that playlist changes are sent to libSpotify as deltas, so you may be looking at the list before the "Delete these tracks" delta is received. There are APIs on sp_playlistcontainer to check what's going on.

The Spotify Client is showing the playlist with tracks removed on multiple computers while the console app is showing them still existing on multiple computers. What Api calls do I need to be using? Have updated the question again with exactly what I am currently using to check.

I am currently waiting until (playlist.IsLoaded == true && playlist.CurrentTracks.All(x => x.IsLoaded && x.Artists.Count() > 0)) using session.OnMetaDataUpdated += HandleOnMetaUpdated; and playlist.OnMetadataUpdated += PlaylistMetaUpdated;

Figured it out.. wasn't anything wrong with the application, was that the client was hiding the tracks as they weren't playable in my region. Thanks for your help!

c# - Unexpected results getting contents of spotify playlist - Stack O...

c# spotify
Rectangle 27 0

It common practice to not include rich media content in a api response as the client will have to wait until everything has been sent which can take a long time. To speed up the process you should parser the information gathered and display that to the user while you have another asynchronously operation using a Block to retrieve the image and display it.

ios - Get Spotify Track artwork on UITableView - Stack Overflow

ios spotify libspotify
Rectangle 27 0

In order to log out, you need to make a GET request to the Facebook's logout URL, which at the moment is https://www.facebook.com/logout.php, passing two parameters:

  • access_token: It is the access token provided by Facebook when access to the user's account was requested.
  • next: It is a URL that has to be part of the domain URL that was set on Facebook's app profile.

Logging out is performed by making an AJAX call to that URL. If it was successful, a redirection to the next URL will me made. Otherwise, the redirection will be made to http://www.facebook.com/home.php (for instance, if the next URL doesn't belong to the registered app domain).

You can read the response of that AJAX call and check that the content you get is that from your next URL.

oauth - Spotify App - Facebook Auth logout procedure - Stack Overflow

facebook oauth spotify