我有一个noraml java类,在这个类的构造函数中说ReceivedChat.java我想调用Android的Activity.
public class ReceivedChat {
String message;
String from;
Context context;
ReceivedChat(String message, String from) {
this.message = message;
this.from = from;
Bundle b = new Bundle();
b.putString("message", this.message);
b.putString("from", this.from);
b.putString("fromChat", "true");
Intent i = new Intent(context.getApplicationContext(), XmppChatActivity.class);
i.putExtras(b);
context.getApplicationContext().startActivity(i);
}
}
Run Code Online (Sandbox Code Playgroud)
我的Activity类是XmppChatActivity.
这个程序不起作用.它不是叫我XmppChatActivity班上的onCreate 任何帮助都会感激我.
我最近参加了亚马逊面试,在设计轮后被拒绝,2年在亚马逊发生了3次,我总是因为设计轮被拒绝。请帮助我知道我应该如何回答设计问题。像 1) 设计电梯控制系统 2) 设计耳语同步功能(在亚马逊即时视频平台中使用)他们要求我设计端到端 HLD LLD 我没有得到两者究竟有什么不同,我解释为一个算法明智的问题,但不能正确地通过 HLD 和 LLD。
我的意思是我搜索了很多,但找不到回答这样问题的方法。
任何帮助对我都有好处。
谢谢,