I have done some research in regards to this but I seem to get conflicting requirements.
So Android defines and have published a specification for this. https://source.android.com/devices/accessories/headset/plug-headset-spec.html
Apple on the other hand, I am unable to find out if they publish this information. I have also found out that some Android headset (3 button) does not seem to be compatible with iPhones.
Does anybody know what methods Apple iPhone devices use for 3 button detection? Is there somewhere a publish specification released?