Trying to connect to Kaa Server with Android SDK :
Added downloaded android sdk jar as library in application.
Code public class MainActivity extends AppCompatActivity {
private Context mContext; private KaaClient mClient;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mContext = getApplicationContext();
mClient = Kaa.newClient(new AndroidKaaPlatformContext(mContext), new SimpleKaaClientStateListener(){ @Override public void onStarted(){ Toast.makeText(mContext, "Success", Toast.LENGTH_LONG).show(); } @Override public void onStartFailure(KaaException exception){ Toast.makeText(mContext, "Failure", Toast.LENGTH_LONG).show(); } },true); mClient.start();
} }
But not getting Success message.
Is there any tutorial out there to follow for Android SDK ?
Regards, Hiten
This query is solved now. It's working as expected.
You have to generate SDK right base on your application and choose Target Platform is Android. And you can recheck way to add library in android studio.