1 Reply Latest reply on Aug 17, 2019 9:56 AM by DheerajK_81



      BLE101robot I am trying to follow and copy.  I am on the Andriod side now.  It seem that the code in git, bleapp/AndroidStudio/BLE101_robot/app at master · cypresssemiconductorco/bleapp · GitHub , is missing "activity_main.xml" file.


      Better yet, where can I find a complete BLE101robot Andriod code?



        • 1. Re: activity_main.xml

          When creating an Android App, you can choose to use a different name than the default "MainActivity". Based on what name you give, both the java and the xml layout file will have the same name. For example, if you name the activity as "SampleActivity", the layout will have the name "activity_sample" by default.


          For example, you will notice in BLE Robot Source Files that there is no "MainActivity.java" file. Hence, there won't be an "activity_main.xml".


          To find out which activity is launched first, you need to check the AndroidManifest.xml file.


          Here, you need to check for the intent filter which reads MAIN and LAUNCHER as shown below:

          <activity android:name=".ScanActivity">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />


          So, ScanActivity is actually the MainActivity or the activity that's going to be launched first.


          Therefore the code is actually complete and there are no missing files. Hope this clears things out




          1 of 1 people found this helpful