If you're hacking FR, you can tell whether the player is on a bike by using the speed value assigned to the player,
detailed here by knizz. Here's a simple script will take the speed value and place it into variable 0x8000, allowing you to check it without having to make a custom ASM routine:
Code:
#dynamic 0x800000
#org @start
setvar 0x8000 0x0
copybyte 0x020370B8 0x02037078
compare 0x8000 0x2
if 0x1 goto @OnBicycle
compare 0x8000 0x22
if 0x1 goto @OnBicycle
goto @Walking
We're checking for values of 0x2 and 0x22 as its the second halfbyte that determines how fast you're going. If you use the bike via the bag or enter a new map the speed value will be set to 0x22, but change to 0x2 after a single step. If you use the bike via the select button it will automatically be set to 0x2.
There's probably an easier way to check whether the player is on a bike, but this method works just fine.