Volley は Android のネットワーク処理をいい感じに非同期で行ってくれる。とても便利だけど時々同期的に実行したい時がある。SyncAdapter の中とか。RequestFuture を使って以下のようにすれば非同期呼び出しが終わるまで待つことができる。 public void someMethod() throws ExecutionException, InterruptedException { RequestFuture<String> future = RequestFuture.newFuture(); StringRequest request = new StringRequest(URL, future, future); RequestQueue queue = Volley.newRequestQueue(getContext()); queue.add(request); String result = future.get();// 非同期呼び出しを join する // result でなんかする } 参考 Can I do a synchronous request with volley? - Stack Overflow
Within your quote, you may also|you can even} adjust amount and material and see worth changes in real-time. Download this guide to discover the processes involved in creating sheet metallic components along with method to|tips on how to} design frequent options and choose the best material. Depending on the complexity of the object to be produced, 3D printing uses sorts of|several varieties of|various kinds of} assist car video systems constructions hold up} half geometry. Two of the commonest are a flat lattice construction and a tree-like assist construction. 3D printing has always been a niche market, with a few of} prime 3D printing shares dominating. That stated, the trade is rising quickly — a lot in order that it's expected to be value over US$83.9 billion by 2029.
返信削除