want to call async task from handler in eclipse - android

I want to load data from API for the app on the splash screen for some activity.
So I removed async task from that activity and wrote in splash screen.
I want to have splash screen should load for the same time which is provided in handler.i.e SPLASH_TIME_OUT and while navigating the data should be loaded on landing activity.
If any mistake in asking question then please correct me.
Basically want to load data on splash screen without getting more time.
Here is the code snippet.
new Handler().postDelayed(new Runnable() {
public void run() {
// After 5 seconds redirect to another intent
if(CommonUtils.getSavedPreferences(getApplicationContext(), Constants.ACCESS_TOKEN).length()>0)
{
Intent i=new Intent(SplashActivity.this,DashBoardActivity.class);
SplashAsync async=new SplashAsync();
async.execute("");
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
}else{
Intent i=new Intent(SplashActivity.this,LoginActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
}
//Remove activity
// finish();
}
}, SPLASH_TIME_OUT); //it is set to 3000
Async task
public class SplashAsync extends AsyncTask<String, Void, String>{
private Dialog mDialog;
private String response = null;
#Override
protected void onPreExecute() {
super.onPreExecute();
try {
mDialog = new Dialog(SplashActivity.this, android.R.style.Theme_Translucent);
mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mDialog.setContentView(R.layout.loading);
mDialog.setCancelable(true);
mDialog.show();
} catch (Exception e) {
e.printStackTrace();
}
}
#Override
protected String doInBackground(String... params) {
response = callForDirectoryRequest();
System.out.println(response);
return response;
}
#Override
protected void onPostExecute(String result) {
try{
super.onPostExecute(result);
if (mDialog != null) {
mDialog.dismiss();
}
Gson gson = new Gson();
mMemberResponseParser = gson.fromJson(response,
new TypeToken<List<MemberResponseParser>>(){}.getType());
}
catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
private String callForDirectoryRequest() {
String url = Constants.DIRECTORY_URL+"member_email="+CommonUtils.getSavedPreferences(getApplicationContext(), Constants.MEMBER_EMAIL)+"&member_token="+CommonUtils.getSavedPreferences(getApplicationContext(), Constants.ACCESS_TOKEN);
Log.e("", "URL IS NOW " + url);
try {
#SuppressWarnings("deprecation")
StringEntity stringEntity = new StringEntity("");
ServiceCall mServiceCall=new ServiceCall(getApplicationContext(), url, stringEntity);
response = mServiceCall.getHttpGetServiceResponse();
System.out.println("################### Response:"+ response);
} catch (Exception e) {
e.printStackTrace();
}
return response;
}
}
Can anyone help on this?

Related

Asyntask not executing onPostExecute()

This is my Asyntask code which is not firing the onPostExecute() Any one has any idea why this might be happening???
EDIT: The Asyntask is called this way
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FacebookSdk.sdkInitialize(getApplicationContext());
callbackManager = CallbackManager.Factory.create();
setContentView(R.layout.activity_main);
.
.
textView.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(), SignUp.class);
startActivity(intent);
}
});
textView2.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(), Feedback.class);
startActivity(intent);
}
});
fbLoginButton = (LoginButton) findViewById(R.id.login_button);
fbLoginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
#Override
public void onSuccess(LoginResult loginResult) {
token=loginResult.getAccessToken().getToken().toString();
Log.v("tag", "Token:\n" + token);
try {
get_profile();
}catch (Exception ex) {
String error = ex.getMessage();
}
}
#Override
public void onCancel() {
Toast.makeText(MainActivity.this, "Login cancelled by user!", Toast.LENGTH_LONG).show();
System.out.println("Facebook Login failed!!");
}
#Override
public void onError(FacebookException e) {
Toast.makeText(MainActivity.this, "Login unsuccessful!", Toast.LENGTH_LONG).show();
System.out.println("Facebook Login failed!!");
}
});
}
The get_profile(); method is defined like this
//Method to get profile details
public void get_profile() throws UnsupportedEncodingException {
try {
// Calling async task to get json
new FetchOperation().execute();
} catch (Exception e) {
e.printStackTrace();
}
}
This is inside the Main class too
//Asynctask to get Getting fb profile details
private class FetchOperation extends AsyncTask<Void, Void, String> {
String fb_token;
#Override
protected void onPreExecute() {
super.onPreExecute();
// Get user defined values
fb_token = token;
}
#Override
protected String doInBackground(Void... params) {
String response = "";
String Urls = "https://graph.facebook.com/me?access_token=";
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(Urls +token);
HttpEntity httpEntity = null;
HttpResponse httpResponse = null;
try {
httpResponse = httpclient.execute(httpget);
} catch (ClientProtocolException e) {
e.printStackTrace();
Log.v("Response", "Hi From e1 : " + e.toString());
} catch (IOException e) {
e.printStackTrace();
}
try {
httpEntity = httpResponse.getEntity();
response = EntityUtils.toString(httpEntity);
Log.v("Response", "Hi From 2 : "+response.toString());
return response;
} catch (IOException e) {
e.printStackTrace();
Log.v("Response", "Hi From e2 : " + e.toString());
}
return null;
}
#Override
protected void onPostExecute(String jsonStr) {
super.onPostExecute(jsonStr);
Log.v("tag", "Result:" + jsonStr);
if (jsonStr != null) {
try{
JSONObject jsonObj = new JSONObject(jsonStr);
String email = jsonObj.getString("email");
String firstName = jsonObj.getString("first_name");
String lastName = jsonObj.getString("last_name");
String gender = jsonObj.getString("gender");
String country = jsonObj.getString("locale");
id = jsonObj.getString("id");
user = firstName.concat(" ");
user = user.concat(lastName);
image = "http://graph.facebook.com/" + id + "/picture?type=large";
Log.v("Fb name", "Bla bla Name : " + user);
new UploadOperation().execute();
}
catch (JSONException e) {
e.printStackTrace();
}
}
else {
Log.e("ServiceHandler", "Couldn't get any data from the url");
}
}
}
This is the last lines of the logcat
06-29 14:30:49.927 2091-2091/com.example.kmi_dev.fbloginsample V/tag﹕ Token:
CA****************************************************************xr
06-29 14:30:50.697 2091-2135/com.example.kmi_dev.fbloginsample V/Response﹕ Hi From 2 : {"id":"910***********6","first_name":"Shivanshu","gender":"male","last_name":"Verma","link":"https:\/\/www.facebook.com\/app_scoped_user_id\/910***********6\/","locale":"en_GB","name":"Shivanshu Verma","timezone":5.5,"updated_time":"2015-06-22T04:17:39+0000","verified":true}
06-29 14:31:23.827 2091-2098/com.example.kmi_dev.fbloginsample W/art﹕ Suspending all threads took: 10ms
I intend to fire another asyntask which will then save the data fetched by this asyntask into the database.
Make these changes, it will work -
private class FetchOperation extends AsyncTask<Void, Void, String>
change to - private class FetchOperation extends AsyncTask<Void, String, String> , because, you are trying to return String.
response = EntityUtils.toString(httpEntity);
change to - response = EntityUtils.toString(httpEntity).toString();
at the next line of this you have actually done it.
At the very end of doInBackground method where return null;
change to - return response;
4.No need to call super in onPostExecute()
5.Inside onPostExecute() check jsonStr is null or not and do whatever you want to do if null and if contains json data.
Your JSONObject does not contain a JSONString "email", so it is falling over at line
String email = jsonObj.getString("email");
and going straight to catch block.

Passing object model to another AsyncTask from other AsyncTask and adding data to model doesn't render

This is my first async task, which gets called first, it gets data from server and then onPostExecute it executes other async task, which downloads and sets image.
private class GetData extends AsyncTask<String, Void, Void> {
private final HttpClient client = new DefaultHttpClient();
private String content;
private String error = null;
#Override
protected void onPreExecute() {
}
#Override
protected void onProgressUpdate(Void... progress) {
}
#Override
protected Void doInBackground(String... params) {
try {
HttpGet httpget = new HttpGet(params[0]);
ResponseHandler<String> responseHandler = new BasicResponseHandler();
content = client.execute(httpget, responseHandler);
} catch (ClientProtocolException e) {
error = e.getMessage();
cancel(true);
} catch (IOException e) {
error = e.getMessage();
cancel(true);
}
return null;
}
#Override
protected void onPostExecute(Void result) {
if (error == null) {
try {
JSONObject dataDishes = new JSONObject(content);
Log.d("DISHES", dataDishes.toString());
ArrayList<DishModel> dishData = new ArrayList<DishModel>();
for (int i = 0; i < 8; i++) {
DishModel model = new DishModel();
model.setName("Company " + i);
model.setDesc("desc" + i);
//TODO: set data img
new GetImage(model).execute("http://example.com/" + (i + 1) + ".png");
dishData.add(model);
}
ListView listAllDishes = (ListView) getView().findViewById(R.id.listView);
DishRowAdapter adapterAllDishes = new DishRowAdapter(getActivity(),
R.layout.dish_row, dishData);
listAllDishes.setAdapter(adapterAllDishes);
} catch (JSONException e) {
Log.d("DISHES", e.toString());
}
} else {
Log.e("DISHES", error);
}
}
}
This is another async task, it downloads image and onPostExecute it sets image to passed model.
private class GetImage extends AsyncTask<String, Void, Void> {
private DishModel model;
private Bitmap bmp;
public getImage(DishModel model) {
this.model = model;
}
#Override
protected void onPreExecute() {
}
#Override
protected void onProgressUpdate(Void... progress) {
}
#Override
protected Void doInBackground(String... params) {
try {
URL url = new URL(params[0]);
Log.d("DISHES", params[0]);
try {
bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
} catch (IOException e) {
Log.d("DISHES", e.toString());
}
} catch (MalformedURLException e) {
Log.d("DISHES", e.toString());
}
return null;
}
#Override
protected void onPostExecute(Void result) {
model.setPhoto(bmp);
}
}
It works if I do both data/image download proccess in one AsyncTask doInBackground(String... params), but it doesnt when I split data and image downloading into seperate async tasks. Furthermore I dont get any exceptions or errors.
UPDATE: Images shows up when i switch views..
At first, getImage and getData are classes, and classes names in Java are capitalized.
Technically, you can run another AsyncTask from onProgressUpdate() or onPostExecute() - https://stackoverflow.com/a/5780190/1159507
So, try to put the breakpoint in second AsyncTask call and debug is it called.

Which is the correct way to call async task in onCompleted method in facebook 3.0 Request.newMeRequest method

I tried this, but I'm getting WindowLeaked error message after postexecute method is called.
here Is my code:
Request meRequest=Request.newMeRequest(session, new GraphUserCallback()
{
#Override
public void onCompleted(GraphUser user, Response response)
{
if(response.getError()==null)
{
try
{
MyAsyncTask async = new MyAsyncTask ();
async.execute("fbsignup");
} catch (Exception e)
{
Log.v("FB error:::::::::", e.getMessage());
}
}
}
});
meRequest.executeAsync();
This is MyAsyncTask class, When I tried to call Intent without using asynctask it is working fine, so i guess my error is in asynctask only.
private class MyAsyncTask extends AsyncTask<String, Void, Void> {
private ProgressDialog pDialog = null;
private String responseFromServer = null;
private boolean hasExceptionOccured = false;
#Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(getActivity());
pDialog.setMessage("Please wait..");
pDialog.setCancelable(false);
pDialog.show();
}
#Override
protected Void doInBackground(String... params) {
try
{
// Parse graph user data and check whether user has registered or not.
// If user is not registered mandatory password popup.
ServiceHandler handler = new ServiceHandler();
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
if(params[0].equalsIgnoreCase("fbsignup"))
{
parameters.add(new BasicNameValuePair("email", UserEmailID));
responseFromServer = handler.makeServiceCall(URL, 2, parameters);
}
} catch (Exception e)
{
Log.v("CLassName::::::SignupwithEmail:::::::AsyncTask", e.getMessage());
hasExceptionOccured = true;
}
return null;
}
#Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
if (pDialog!=null)
{
pDialog.dismiss();
}
try
{
if(responseFromServer.contains("success"))
{
Intent i = new Intent(getActivity(), HomePage.class);
getActivity().startActivity(i);
getActivity().finish();
}
} catch (Exception e)
{
Log.v("Main FRagment FB async::::::", e.getMessage());
}
}
}
hey you can use updated facebook v3.6 sdk. Please download and get some sample app also available inside. Facebook v3.6
user after login session
Session session = Session.getActiveSession();
requestMyAppFacebookFriends(session);
private List<GraphUser> getResults(Response response) {
GraphMultiResult multiResult = response
.getGraphObjectAs(GraphMultiResult.class);
GraphObjectList<GraphObject> data = multiResult.getData();
return data.castToListOf(GraphUser.class);
}
private void requestMyAppFacebookFriends(Session session) {
Request friendsRequest = createRequest(session);
friendsRequest.setCallback(new Request.Callback() {
#Override
public void onCompleted(Response response) {
//List<GraphUser> friends = getResults(response);
//Log.e("RESULT : ", "#"+friends.size());
// TODO: your code here
}
});
friendsRequest.executeAsync();
}
private Request createRequest(Session session) {
Request request = Request.newGraphPathRequest(session, "me/friends", null);
Set<String> fields = new HashSet<String>();
String[] requiredFields = new String[] { "id", "name", "picture","installed" };
fields.addAll(Arrays.asList(requiredFields));
Bundle parameters = request.getParameters();
parameters.putString("fields", TextUtils.join(",", fields));
request.setParameters(parameters);
return request;
}
I added
Looper.loop();
after
async.execute("fbsignup");
This solved my problem.

ProgressDialog doesn't show up in AsyncTask

I am creating an android app that depends on data that the app gets from the database. To get this data I have the following class (this class gets data from the database in JSON, translates it and returns it):
public class Json {
public String jsonResult;
private Activity activity;
private String url = "http://json.example.org/json.php";
private String db, query;
public Json(Activity activity) {
this.activity = activity;
}
public String accessWebService(String db, String query) {
JsonReadTask task = new JsonReadTask();
this.db = db;
this.query = query;
task.execute(new String[] { url });
try {
task.get();
} catch (InterruptedException e) {
Toast.makeText(activity.getApplicationContext(), "FATAL ERROR: The thread got interrupted",
Toast.LENGTH_LONG).show();
} catch (ExecutionException e) {
Toast.makeText(activity.getApplicationContext(), "FATAL ERROR: The thread wasn't able to execute",
Toast.LENGTH_LONG).show();
}
return jsonResult;
}
// Async Task to access the web
private class JsonReadTask extends AsyncTask<String, Void, String> {
private final ProgressDialog dialog = new ProgressDialog(activity);
protected String doInBackground(String... params) {
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(params[0]);
try {
// add post data
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("db", db));
nameValuePairs.add(new BasicNameValuePair("query", query));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
jsonResult = inputStreamToString(response.getEntity().getContent()).toString();
if (jsonResult.isEmpty()) {
Toast.makeText(activity.getApplicationContext(),
"Error, connection is up but didn't receive data. That's strange...", Toast.LENGTH_LONG)
.show();
this.cancel(true);
}
} catch (ClientProtocolException e) {
// Toast.makeText(activity.getApplicationContext(),
// "Error, Client Protocol Exception in JSON task",
// Toast.LENGTH_LONG).show();
Log.i("Json", "Error, Client Protocol Exception in JSON task");
this.cancel(true);
} catch (IOException e) {
// Toast.makeText(activity.getApplicationContext(),
// "Error, Please check your internet connection",
// Toast.LENGTH_LONG).show();
Log.i("Json", "Error, Please check your internet connection");
this.cancel(true);
}
return null;
}
private StringBuilder inputStreamToString(InputStream is) {
String rLine = "";
StringBuilder answer = new StringBuilder();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
try {
while ((rLine = rd.readLine()) != null) {
answer.append(rLine);
}
} catch (IOException e) {
Toast.makeText(activity.getApplicationContext(), "Error..." + e.toString(), Toast.LENGTH_LONG).show();
}
return answer;
}
}// end async task
}
I noticed that my app freezes while accessing the database. After some googling, I found out it was the .get() method in the accessWebService() method caused this. I tried to implement a progressDialog like so (I also deleted the .get() method):
private final ProgressDialog dialog = new ProgressDialog(activity);
protected void onPreExecute() {
super.onPreExecute();
this.dialog.setMessage("Loading...");
this.dialog.setCancelable(false);
this.dialog.show();
}
protected void onPostExecute(String result) {
if (this.dialog.isShowing()) {
this.dialog.dismiss();
}
}
but the dialog didn't show up and I got NullPointerException because the app only works when there is data:
result = json.accessWebService(db, query);
(maybe an important thing to mention: I also use this method in for loops)
So now my question is: How can I change my app so that I get a ProgressDialog while accessing the database and without getting NullPointerException? I fear that I have to rearchitect my whole app and if I have to do this, how do I do this? I hope you guys understand my question and have a fix for this because I really need help. Thanks in advance.
P.S. Sorry if my English is not that good, I'm not a native speaker.
... I found out it was the .get() method in the accessWebService() method caused this. I tried to implement a progressDialog...
That is right. get() is a blocking call and simply adding a ProgressDialog won't fix it. You need to remove .get() and that will probably fix the issue of your ProgressDialog not showing.
An AsyncTask must be executed on the main Thread so make sure you are doing that.
Another problem you have is Toast.LENGTH_LONG).show(); runs on the UI and you have it in doInBackground() which cannot happen. You need to send the result to onPostExecute() and you can display your Toast there if need. This could also be done in onProgressUpdate().
This null pointer exception happens because of result value was null. put the condition before
if(result != null ) {
// CODE FOR PARSING
} else {
return;
}
You can start showing progress bar before asyncTask is started and finish showing when asyncTask is finished.
Pass handler to asyncTask and sendMessage onPostExecute method. Then handle message on UI thread and hide progress bar
For example there is handler field in UI (mainActivity). There you should handle hiding progress bar:
public Handler refreshChannelsHandler = new Handler() {
#Override
public void handleMessage(Message msg) {
switch (msg.what) {
case EPGManager.ERROR_MESSAGE:
//do some stuff
break;
case EPGManager.SUCCESS_MESSAGE:
//do some stuff
break;
}
super.handleMessage(msg);
}
};
Then you can call asyncTask with your handler
epgManager.loadChannels(refreshChannelsHandler);
AsyncTask is inside the method so it looks like this:
public void loadChannels(Handler handler) {
AsyncTask task = new AsyncTask() {
#Override
protected Object doInBackground(Object[] params) {
try {
//do AsyncTask Job
} catch (Exception e) {
return new LoadingResult((Handler) params[0], false);
}
return new LoadingResult((Handler) params[0], false);
}
#Override
protected void onPostExecute(Object o) {
super.onPostExecute(o);
LoadingResult loadingResult = ((LoadingResult)o);
sendMessageToHandler(loadingResult.handler, loadingResult.isSuccess);
}
};
task.execute(handler);
}
Here is method:
private void sendMessageToHandler(Handler handler, boolean isSuccess) {
handler.sendEmptyMessage(isSuccess ? SUCCESS_MESSAGE : ERROR_MESSAGE);
}
And finally inner class
private class LoadingResult {
private Handler handler;
private boolean isSuccess;
public LoadingResult(Handler handler, boolean isSuccess) {
this.handler = handler;
this.isSuccess = isSuccess;
}
public Handler getHandler() {
return handler;
}
public void setHandler(Handler handler) {
this.handler = handler;
}
public boolean isSuccess() {
return isSuccess;
}
public void setSuccess(boolean isSuccess) {
this.isSuccess = isSuccess;
}
}
Ow, and don't forget constants
public static final int SUCCESS_MESSAGE = 1;
public static final int ERROR_MESSAGE = -1;
Hope it helps :)

how to stop AsyncTask if some condition is true

I use asynctask to get json data from remote url but sometimes this url return errors in json data like this :
{
"error": {
"message": "(#803) Some of the aliases you requested do not exist: RNN.NES",
"type": "OAuthException",
"code": 803
}
}
in doInBackground, i check if there an error by json ..
if(true) {
//cancel asynctask and show toast with message i use
cancel(true)
}
but i do that the condititon is true but it is not cancelled
this is my code :
private class MyAsyncTask extends AsyncTask<String, Void, Void> {
ProgressDialog mProgressDialog;
#Override
protected void onPostExecute(Void result) {
db = new DAOPages(context);
db.open();
db.addPage(name, fid, picName);
getPagePrefs(fid);
db.close();
mProgressDialog.dismiss();
Intent intent = new Intent(context, PagePrefsActivity.class);
intent.putExtra("fPageid", fid);
context.startActivity(intent);
}
#Override
protected void onPreExecute() {
mProgressDialog = ProgressDialog.show(context, "Loading...",
"Data is Loading...");
}
#Override
protected Void doInBackground(String... params) {
// Creating JSON Parser instance
JSONParser jParser = new JSONParser();
// getting JSON string from URL
JSONObject json = jParser.getJSONFromUrl(params[0]);
// addPageData(params[0]);
try {
if(json.getJSONObject("error") != null) {
Log.e("error", "true");
cancel(true);
}
name = json.getString("name");
fid = json.getString("id");
String picture = json.getJSONObject("picture")
.getJSONObject("data").getString("url");
picName = downloadImage(picture, fid);
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
}
Now how can i stop that and show toast ???
thanks in advance
The method cancel(true) doesn't stop the AsyncTask. It just invokes onCancelled() instead of onPostExecute() after doInBackGround returns. You can use AsyncTask.isCancelled(), which will return true if you cancel the AsyncTask, to prevent further processing in doInBackground().
So override onCancelled() and put your Toast in there.
private class MyAsyncTask extends AsyncTask<String, Void, Void> {
ProgressDialog mProgressDialog;
#Override
protected void onPostExecute(Void result) {
db = new DAOPages(context);
db.open();
db.addPage(name, fid, picName);
getPagePrefs(fid);
db.close();
mProgressDialog.dismiss();
Intent intent = new Intent(context, PagePrefsActivity.class);
intent.putExtra("fPageid", fid);
context.startActivity(intent);
}
#Override
protected void onPreExecute() {
mProgressDialog = ProgressDialog.show(context, "Loading...",
"Data is Loading...");
}
#Override
protected Void doInBackground(String... params) {
// Creating JSON Parser instance
JSONParser jParser = new JSONParser();
// getting JSON string from URL
JSONObject json = jParser.getJSONFromUrl(params[0]);
// addPageData(params[0]);
try {
if(json.getJSONObject("error") != null) {
Log.e("error", "true");
cancel(true); // after this AsyncTask.isCancelled() returns true
}
if(!this.isCancelled()){ // if it's true, prevent further processing
name = json.getString("name");
fid = json.getString("id");
String picture = json.getJSONObject("picture")
.getJSONObject("data").getString("url");
picName = downloadImage(picture, fid);
}
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
// will be called instead onPostExecute after a cancel
#Override
protected void onCancelled() {
// Show your Toast
}
}
You can check using isCancelled() in onPostExecute() method and can show Toast in that method.Here is how you can do that -:
#Override
protected void onPostExecute(Void result) {
if(isCancelled()) {
Toast.makeText(context, "your text", Toast.LENGTH_SHORT).show();
return;
}
db = new DAOPages(context);
db.open();
db.addPage(name, fid, picName);
getPagePrefs(fid);
db.close();
mProgressDialog.dismiss();
Intent intent = new Intent(context, PagePrefsActivity.class);
intent.putExtra("fPageid", fid);
context.startActivity(intent);
}

Categories

Resources