mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Initial commit
This commit is contained in:
commit
6ae5282f8a
32 changed files with 516 additions and 0 deletions
23
src/org/wikimedia/commons/CommonsApplication.java
Normal file
23
src/org/wikimedia/commons/CommonsApplication.java
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package org.wikimedia.commons;
|
||||
|
||||
import android.app.Application;
|
||||
import org.mediawiki.api.*;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
|
||||
public class CommonsApplication extends Application {
|
||||
|
||||
private MWApi api;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate();
|
||||
DefaultHttpClient client = new DefaultHttpClient();
|
||||
api = new MWApi("http://test.wikipedia.org/w/api.php", client);
|
||||
}
|
||||
|
||||
public MWApi getApi() {
|
||||
return api;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue