java如何从json获取数据url?
我有打开这个代码链接的按钮
public class Settings_d extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.Settings_d );
Button b = (Button) findViewById(R.id.new8);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String url = "https://www.google.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
});
}
}
我想在没有更新应用的情况下更新url。。 如何从JSON获取数据url
谢谢
# 1 楼答案
你不需要JSON
您可以这样使用webview:
因此,尝试以下代码来更改按钮中的url:
在here.中可以看到更多webview插件
# 2 楼答案
如果您想更改应用程序中的某些数据,请尝试使用onesignal。这是一个免费的推送通知面板,你可以通过它向你的应用程序发送背景数据,你可以在后台服务中做任何事情,而不是显示通知。 Read more