You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 9, 2021. It is now read-only.
Hi,
Your android code not working even not sending messages or receiving.
What I did here???
I upload your arduino code in my arduino nano board. Then develop arduino app for simply connect and send message using your code. But no luck.
How I know???
I try S2 terminal App It's working. Your arduino code well responding with S2 terminal.
Problem:
Device is connecting well with arduino but not sending & Receiving msg even not throwing any exception.
Here is my activity...
public class MainActivity extends Activity {
BluetoothArduino mBlue ;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mBlue = BluetoothArduino.getInstance(this,"Arduino");
mBlue.Connect();
Toast.makeText(this,mBlue.getLastMessage(),Toast.LENGTH_SHORT).show();
Button b=(Button)findViewById(R.id.buttonOn);
Button c=(Button)findViewById(R.id.buttonSearch);
b.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View p1)
{
mBlue.SendMessage("Hi from Android!");
}
});
c.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View p1)
{
Toast.makeText(getApplicationContext(),mBlue.getLastMessage(),Toast.LENGTH_SHORT).show();
}
});
}
}