|
@@ -1,4 +1,4 @@
|
|
-package com.ch.jedge.demo.glm;
|
|
|
|
|
|
+package com.ch.jedge.llm.filter.glm;
|
|
|
|
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
@@ -13,14 +13,15 @@ import android.content.IntentFilter;
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
import android.util.Log;
|
|
import android.util.Log;
|
|
|
|
|
|
-import com.ch.jedge.demo.glm.asserts.QAssetsCopyer;
|
|
|
|
-import com.ch.jedge.demo.glm.service.BaseJedgeService;
|
|
|
|
-import com.ch.jedge.demo.glm.service.JBotService;
|
|
|
|
-import com.ch.jedge.demo.glm.service.JGlmService;
|
|
|
|
-import com.ch.jedge.demo.glm.service.MgsService;
|
|
|
|
-import com.ch.jedge.demo.glm.service.PanleAgentService;
|
|
|
|
-import com.ch.jedge.demo.glm.service.TVAgentService;
|
|
|
|
-import com.ch.jedge.demo.glm.service.TVMufisService;
|
|
|
|
|
|
+import com.ch.jedge.llm.filter.glm.asserts.QAssetsCopyer;
|
|
|
|
+import com.ch.jedge.llm.filter.glm.service.BaseJedgeService;
|
|
|
|
+import com.ch.jedge.llm.filter.glm.service.JBotService;
|
|
|
|
+import com.ch.jedge.llm.filter.glm.service.JGlmService;
|
|
|
|
+import com.ch.jedge.llm.filter.glm.service.MgsService;
|
|
|
|
+import com.ch.jedge.llm.filter.glm.service.PanleAgentService;
|
|
|
|
+import com.ch.jedge.llm.filter.glm.service.TVAgentService;
|
|
|
|
+import com.ch.jedge.llm.filter.glm.service.TVMufisService;
|
|
|
|
+import com.ch.jedge.tvmufis.JeageTVBridge;
|
|
import com.changhong.qlib.util.file.FileUtils;
|
|
import com.changhong.qlib.util.file.FileUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -35,6 +36,7 @@ public class MainActivity extends AppCompatActivity {
|
|
|
|
|
|
//添加过滤器,用于过滤发送过来广播
|
|
//添加过滤器,用于过滤发送过来广播
|
|
private IntentFilter filter = new IntentFilter("intent.jedge.glm.msg");
|
|
private IntentFilter filter = new IntentFilter("intent.jedge.glm.msg");
|
|
|
|
+ private IntentFilter asr_filter = new IntentFilter("com.ch.jedge.llm.filter.glm.asr");
|
|
|
|
|
|
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
|
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
|
@Override
|
|
@Override
|
|
@@ -70,7 +72,7 @@ public class MainActivity extends AppCompatActivity {
|
|
BaseJedgeService.startJedgeService(this , dir, jedgeBasePath, "jsmart", PanleAgentService.class);
|
|
BaseJedgeService.startJedgeService(this , dir, jedgeBasePath, "jsmart", PanleAgentService.class);
|
|
|
|
|
|
//注册广播
|
|
//注册广播
|
|
-// registerReceiver(new MsgReceiver(), filter);
|
|
|
|
|
|
+ registerReceiver(new AsrMsgReceiver(), asr_filter);
|
|
// LocalBroadcastManager.getInstance(this).registerReceiver(msgReceiver, filter);
|
|
// LocalBroadcastManager.getInstance(this).registerReceiver(msgReceiver, filter);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -122,4 +124,16 @@ public class MainActivity extends AppCompatActivity {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ class AsrMsgReceiver extends BroadcastReceiver {
|
|
|
|
+ @Override
|
|
|
|
+ public void onReceive(Context var1, Intent var2) {
|
|
|
|
+ String content = var2.getStringExtra("text");
|
|
|
|
+ if(content.isEmpty())
|
|
|
|
+ return;
|
|
|
|
+ Log.d("ASRTEXTFORGLM", content);
|
|
|
|
+ JeageTVBridge bridge = JeageTVBridge.getInstance();
|
|
|
|
+ bridge.senduserMsg(content);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|