2016-09-26 85 views
2

我必須做這個遠程應用程序 - :Link of App Play Store如何在Android編程中製作Google TV遙控器應用程序?

我沒有很好的英文通信。這就是爲什麼我共享這樣一個鏈接,我需要做的,請建議我如何做approach.1st我做了一步,即我創建了密鑰存儲,並添加了密鑰存儲現在我想搜索相同的IP什麼是設備,但它沒有被檢測到,我不知道爲什麼?

我使用的參考參考代碼Code Link

sendUserActionEvent() mView == null 09 - 29 14: 20: 02.741 1464 - 1464/com.entertailion.android.anymote E/ViewRootImpl: sendUserActionEvent() mView == null 09 - 29 14: 20: 02.771 1464 - 3440/com.entertailion.android.anymote E/anymote: ConnectingActivity: (IOE) Could not create socket to Unknown boxjava.net.ConnectException: failed to connect to/10.10 .20 .52(port 9551): connect failed: ECONNREFUSED(Connection refused) 
at libcore.io.IoBridge.connect(IoBridge.java: 124) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 183) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 163) 
at java.net.Socket.startupSocket(Socket.java: 590) 
at java.net.Socket.tryAllAddresses(Socket.java: 128) 
at java.net.Socket. <init> (Socket.java: 178) 
at java.net.Socket. <init> (Socket.java: 150) 
at javax.net.ssl.SSLSocket. <init> (SSLSocket.java: 764) 
at com.android.org.conscrypt.OpenSSLSocketImpl. <init> (OpenSSLSocketImpl.java: 205) 
at com.android.org.conscrypt.OpenSSLSocketFactoryImpl.createSocket(OpenSSLSocketFactoryImpl.java: 68) 
at com.entertailion.java.anymote.connection.ConnectingTask.attemptToConnect(ConnectingTask.java: 360) 
at com.entertailion.java.anymote.connection.ConnectingTask.connect(ConnectingTask.java: 203) 
at com.entertailion.java.anymote.connection.ConnectingTask.run(ConnectingTask.java: 175) 
Caused by: android.system.ErrnoException: connect failed: ECONNREFUSED(Connection refused) 
at libcore.io.Posix.connect(Native Method) 
at libcore.io.BlockGuardOs.connect(BlockGuardOs.java: 111) 
at libcore.io.IoBridge.connectErrno(IoBridge.java: 137) 
at libcore.io.IoBridge.connect(IoBridge.java: 122) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 183)  
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 163)  
at java.net.Socket.startupSocket(Socket.java: 590)  
at java.net.Socket.tryAllAddresses(Socket.java: 128)  
at java.net.Socket. <init> (Socket.java: 178)  
at java.net.Socket. <init> (Socket.java: 150)  
at javax.net.ssl.SSLSocket. <init> (SSLSocket.java: 764)  
at com.android.org.conscrypt.OpenSSLSocketImpl. <init> (OpenSSLSocketImpl.java: 205)  
at com.android.org.conscrypt.OpenSSLSocketFactoryImpl.createSocket(OpenSSLSocketFactoryImpl.java: 68)  
at com.entertailion.java.anymote.connection.ConnectingTask.attemptToConnect(ConnectingTask.java: 360)  
at com.entertailion.java.anymote.connection.ConnectingTask.connect(ConnectingTask.java: 203)  
at com.entertailion.java.anymote.connection.ConnectingTask.run(ConnectingTask.java: 175)  09 - 29 14: 20: 02.821 1464 - 3440/com.entertailion.android.anymote E/anymote: ConnectingActivity: Failed to connect 
java.net.ConnectException: failed to connect to/10.10 .20 .52(port 9552): connect failed: ECONNREFUSED(Connection refused) 
at libcore.io.IoBridge.connect(IoBridge.java: 124) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 183) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 163) 
at java.net.Socket.startupSocket(Socket.java: 590) 
at java.net.Socket.tryAllAddresses(Socket.java: 128) 
at java.net.Socket. <init> (Socket.java: 178) 
at java.net.Socket. <init> (Socket.java: 150) 
at com.entertailion.java.anymote.connection.ConnectingTask.attemptToPair(ConnectingTask.java: 260) 
at com.entertailion.java.anymote.connection.ConnectingTask.connect(ConnectingTask.java: 209) 
at com.entertailion.java.anymote.connection.ConnectingTask.run(ConnectingTask.java: 175) 
Caused by: android.system.ErrnoException: connect failed: ECONNREFUSED(Connection refused) 
at libcore.io.Posix.connect(Native Method) 
at libcore.io.BlockGuardOs.connect(BlockGuardOs.java: 111) 
at libcore.io.IoBridge.connectErrno(IoBridge.java: 137) 
at libcore.io.IoBridge.connect(IoBridge.java: 122) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 183)  
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java: 163)  
at java.net.Socket.startupSocket(Socket.java: 590)  
at java.net.Socket.tryAllAddresses(Socket.java: 128)  
at java.net.Socket. <init> (Socket.java: 178)  
at java.net.Socket. <init> (Socket.java: 150)  
at com.entertailion.java.anymote.connection.ConnectingTask.attemptToPair(ConnectingTask.java: 260)  
at com.entertailion.java.anymote.connection.ConnectingTask.connect(ConnectingTask.java: 209)  
at com.entertailion.java.anymote.connection.ConnectingTask.run(ConnectingTask.java: 175)  09 - 29 14: 20: 02.821 1464 - 3440/com.entertailion.android.anymote I/anymote: ConnectingActivity: Pairing failed 09 - 29 14: 20: 02.821 1464 - 3440/com.entertailion.android.anymote E/anymote: ConnectingActivity: run 
java.lang.NullPointerException: null socket 
at com.entertailion.java.anymote.client.AnymoteSender.attemptToConnect(AnymoteSender.java: 118) 
at com.entertailion.java.anymote.connection.ConnectingTask.run(ConnectingTask.java: 177) 

回答

3

至於Anymote LIB實現而言它有可用的原因明確API。

Android-Anymote執行MainActivity您可以在Line No: 59上看到它正在註冊可能的連接。所有可用設備均可在Line No: 319方法onSelectDevice上獲得,這是網絡上所有可見Google TV設備的列表。

+0

在清單文件中,添加了一項活動,即PairingActivity,但是在src文件中它不存在,那麼如何獲得PairingAcitvity。 @Murtaza Khursheed Hussain – RAJAN

+0

我用過這個,但它沒有在同一個ip谷歌電視上搜索。 – RAJAN

+0

是源代碼中缺少'PairingActivity',但我相信不需要配對活動,因爲''onconnected'方法處理'pairing'工作,當您從'onSelectedDevice'列表中選擇設備時會調用此方法。可能他們忘記從清單中刪除清單 –

相關問題