This app demonstrates, how to transmit as a beacon.
Using this app you can transmit AltBeacon and iBeacon advertisement. By default, it will transmit an AltBeacon advertisement, but can easily be modified the beacon format as well.
For beacon trasnmission, you need to follow thesesteps
Do the basic setup like setting SDK version and adding dependency.
Add the needed permission in manifest.
Check the device bluetooth connection.
Initiate the BeaconManager.
Start the beacon transmission.
Changing the beaconLayout for format change.
For more information, check out my detailed guide here : http://droidmentor.com/beacon-transmitter/