Click here to Skip to main content
15,881,413 members
Home / Discussions / Android
   

Android

 
QuestionHow to parse result returned from `ls -l` in Android Pin
Mukhtar Oyelayo1-Sep-15 3:49
Mukhtar Oyelayo1-Sep-15 3:49 
QuestionRe: How to parse result returned from `ls -l` in Android Pin
David Crow2-Sep-15 6:04
David Crow2-Sep-15 6:04 
AnswerRe: How to parse result returned from `ls -l` in Android Pin
Richard MacCutchan2-Sep-15 6:36
mveRichard MacCutchan2-Sep-15 6:36 
QuestionHelp urgently needed on Http Injection in Android Pin
Mukhtar Oyelayo28-Aug-15 19:52
Mukhtar Oyelayo28-Aug-15 19:52 
AnswerRe: Help urgently needed on Http Injection in Android Pin
Richard MacCutchan28-Aug-15 22:40
mveRichard MacCutchan28-Aug-15 22:40 
GeneralRe: Help urgently needed on Http Injection in Android Pin
Mukhtar Oyelayo29-Aug-15 11:57
Mukhtar Oyelayo29-Aug-15 11:57 
GeneralRe: Help urgently needed on Http Injection in Android Pin
Richard MacCutchan29-Aug-15 21:27
mveRichard MacCutchan29-Aug-15 21:27 
QuestionMonodroid AsyncTask OnProgressUpdate Not Working Pin
Member 1113168818-Aug-15 6:17
Member 1113168818-Aug-15 6:17 
I am trying to create my first asynctask. In asynctask, after calling PublishProgress in DoInBackground , OnProgressUpdate must execute. But unfortunately it is not working in my code...

Can anybody please tell me what is wrong with my code?

Thanks in advance.



C#
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

namespace AndroidApplication1
{
[Activity(Label = "AndroidApplication1", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
Button btn = FindViewById(Resource.Id.MyButton);
btn.Click += new EventHandler(btn_click);

    }

    void btn_click(object sender, EventArgs e)
    {
        new AsyncTest().Execute();
    }

 }




public class AsyncTest : AsyncTask
{
    int Progress;

    protected override void OnPreExecute()
    {
        Console.WriteLine("Pre Execute");
    }

    protected void OnProgressUpdate()
    {
        Console.WriteLine("Progress Update");
    }

    protected override Java.Lang.Object DoInBackground(params Java.Lang.Object[] @params)
    {

        while (Progress <10)
        {
            Console.WriteLine("Do in background");
            Progress++;
            PublishProgress(Progress);
            System.Threading.Thread.Sleep(10);
        }
        return null;
    }


    protected override void OnPostExecute(Java.Lang.Object result)
    {
        Console.WriteLine("Post Execute");
    }


}
}

SuggestionRe: Monodroid AsyncTask OnProgressUpdate Not Working Pin
David Crow20-Aug-15 5:52
David Crow20-Aug-15 5:52 
QuestionHow to store large data in an Android application Pin
jasonalien18-Aug-15 3:13
jasonalien18-Aug-15 3:13 
AnswerRe: How to store large data in an Android application Pin
Afzaal Ahmad Zeeshan18-Aug-15 4:47
professionalAfzaal Ahmad Zeeshan18-Aug-15 4:47 
Questionwhy viewholde class make static Pin
Gaurav Tyagi17-Aug-15 18:59
Gaurav Tyagi17-Aug-15 18:59 
GeneralRe: why viewholde class make static Pin
Richard MacCutchan17-Aug-15 21:12
mveRichard MacCutchan17-Aug-15 21:12 
Questionhow to use toolbar in android Pin
Gaurav Tyagi17-Aug-15 18:39
Gaurav Tyagi17-Aug-15 18:39 
QuestionTemperature monitoring on an Android device Pin
Daniel Pfeffer13-Aug-15 4:24
professionalDaniel Pfeffer13-Aug-15 4:24 
AnswerRe: Temperature monitoring on an Android device Pin
Richard MacCutchan13-Aug-15 5:49
mveRichard MacCutchan13-Aug-15 5:49 
Questionandroid compilation problem on lower version devices Pin
Member 1190643213-Aug-15 0:25
Member 1190643213-Aug-15 0:25 
AnswerRe: android compilation problem on lower version devices Pin
Afzaal Ahmad Zeeshan13-Aug-15 1:05
professionalAfzaal Ahmad Zeeshan13-Aug-15 1:05 
AnswerRe: android compilation problem on lower version devices Pin
Richard MacCutchan13-Aug-15 1:05
mveRichard MacCutchan13-Aug-15 1:05 
GeneralRe: android compilation problem on lower version devices Pin
Member 1190643213-Aug-15 2:35
Member 1190643213-Aug-15 2:35 
GeneralRe: android compilation problem on lower version devices Pin
Richard MacCutchan13-Aug-15 4:15
mveRichard MacCutchan13-Aug-15 4:15 
AnswerRe: android compilation problem on lower version devices Pin
David Crow13-Aug-15 5:52
David Crow13-Aug-15 5:52 
AnswerRe: android compilation problem on lower version devices Pin
Siddharth Chandra24-Aug-15 6:09
Siddharth Chandra24-Aug-15 6:09 
QuestionDraggable Button in Xamarin.Android ? Pin
Vaikesh K P11-Aug-15 0:20
professionalVaikesh K P11-Aug-15 0:20 
AnswerRe: Draggable Button in Xamarin.Android ? Pin
Richard MacCutchan11-Aug-15 5:42
mveRichard MacCutchan11-Aug-15 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.