Basic Kaa mobile application with android sdk

拜拜、爱过 提交于 2019-12-12 05:59:38

问题


Trying to connect to Kaa Server with Android SDK :

  1. Added downloaded android sdk jar as library in application.

  2. 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


回答1:


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.




回答2:


This query is solved now. It's working as expected.



来源:https://stackoverflow.com/questions/43738355/basic-kaa-mobile-application-with-android-sdk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!