Tag: IOT

附近的消息API MessageLisenter不被触发

我正在与NXP i.MX7D合作开发IoT项目。 在这个项目中,我使用Google Nearby API将数据从伴侣应用程序发布到应用程序。 我跟着这个项目附近kotlin 。 我几乎完全按照这个回购。 但在我的情况下,我的两个应用程序正在发布订阅成功。 这里是我的两个活动的代码,第一个是伴侣应用程序的MainActiviy.kt ,第二个是在NXP i.MX7D上运行的活动 class MainActivity : AppCompatActivity(), GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { /** * The entry point to Google Play Services. */ private var mGoogleApiClient: GoogleApiClient? = null /** * A [MessageListener] for processing messages from nearby devices. */ private var messageListener: MessageListener? = null /** * One […]