Bluetooth Connection (Android Sockets)

Currently I have a Android program split into a bunch of different fragments.
The home fragment scans for a Bluetooth connection with a specific MAC Address, and socket UUID. This connection works fine (no problem yet).

The broadcasting Bluetooth server is a beaglebone black that is running ubuntu and is utilizing bluez to broadcast a specific service with a specific UUID.

Problem:
When I switch to the gallery fragment, I then attempt to use the already connected Bluetooth service to send data (pictures).

Where I run into trouble is with the command outputStream.write(msgBuffer);. It returns with a "null" error.

So far for debugging I have done the following:

I was curious to see if the original connection ever worked (in the home fragment), so after I connected to the Bluetooth server with a call to connect(), I then tested it with a call to socket.getConnected(). This returned true, meaning the Bluetooth socket must be connected to the Bluetooth server.

I then wanted to see what was happening in the gallery fragment.
Before sending my data with the outputStream.write(msgBuffer); command, I ran socket.getConnected() which returned false. Thus meaning the socket must be disconnected.... Why is the bluetooth server now disconnected? Do I have to do anything special to keep the bluetooth connection open? Do I have to do anything special to keep the connection alive when switching fragments?

What would be causing my connection to disconnect in the time between these two events?