starmicronics android sdk not working
<p>i need to print image from android phone to Bluetooth printer.i am using <a href="http://www.starmicronics.com/support/sdkdocumentation.aspx" rel="nofollow">starmicronics</a> android sdk. 
According to the user manual i add the jar file and i have got the classes.But while running application it stopped.I cannot debug the application.but the example application given by them is working fine.i use the same coding methods as per the documentation.</p>

<p>this is a sample code</p>

<pre><code>import com.starmicronics.stario.StarIOPortException;
import com.starmicronics.stario.StarIOPort;


public class MainActivity extends Activity {

private Context context;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    context = this;

    StarIOPort port = null; 
    byte[] texttoprint = new byte[]{0x1b, 0x40, 0x1b,0x74,0x0D,(byte) 0x91,(byte) 0x92,(byte) 0x93,(byte) 0x94,(byte) 0x95,(byte) 0x96,(byte) 0x97,(byte) 0x98,(byte) 0x99,0x0A,0x0A,0x0A,0x0A,0x0A}; 

    try  
    { 
        port = StarIOPort.getPort("BT:", "mini", 10000, context); 
        port.writePort(new byte[] {0x0a}, 0, 1); 
    } 
    catch (StarIOPortException e) 
    { 
        Builder dialog = new AlertDialog.Builder(context); 
        dialog.setNegativeButton("Ok", null); 
        AlertDialog alert = dialog.create(); 
        alert.setTitle("Failure"); 
        alert.setMessage("Failed to connect to printer"); 
        alert.show(); 
    }

}
</code></pre>
