Recent

Author Topic: Android Module Wizard  (Read 708240 times)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #510 on: July 06, 2015, 07:49:29 pm »
Hi All!

There is a new  "Lamw" revision:
 
ref. https://github.com/jmpessoa/lazandroidmodulewizard

Version 0.6 - rev. 32 - 05 July 2015 -

   IMPROVEMENTS!   

          jListView component:         
         New! event/properties:   
            OnDrawItemBitmap
            OnDrawItemTextColor
            OnLongClick <<--- @renabor's request and suggestion!

         warning/changed: "OnClickItemCaption" was lost [sorry ...], please, copy your code to "new" OnClickItem

          jGridView component:         
         New! Event/properties:   
            OnDrawItemBitmap
            OnDrawItemTextColor      
            OnLongClick

          jDigitalClock component:         
         New! properties:
            FontColor
            FontSize
      jSqliteCursor
         New! method:
            GetValueAsString(rowPosition, columnName) <<--- @renabor's suggestion [GetLastID]!
                     rowPosition = -1 --> move to last!
      
      jHttpClient
         New! synchronous methods:  // <<---- by Fatih KILIÇ
            Get(url): string            

            AddNameValueData(name,value)
            Post(url) 

         warning/changed: asynchronous "Get" methods was renamed to "GetAsync"
         warning/changed: asynchronous "PostNameValueData" methods was renamed to "PostNameValueDataAsync"

         New!
            AddNameValueData(name,value)
            PostNameValueDataAsync(url) 
         
      jShellcommand
         warning/changed: asynchronous "Execute" method was renamed to "ExecuteAsync"

      jContactManager
         warning/changed: asynchronous "GetContact" method was renamed to "GetContactAsync"

   UPDATED: ALL Demos !!!

   HINT 1: Old Projects: upgrade your projects code templates !
      Lazarus IDE --> menu Tools --> [Lamw] Android Module Wizard --> Upgrade code Templates [*.lpr, *.java]

   HINT 2:   When prompt "Read error" [Unknown Property] just choice "Continue Loading"!

Thanks to All!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

rx3.fireproof

  • New Member
  • *
  • Posts: 49
Re: Android Module Wizard
« Reply #511 on: July 07, 2015, 01:37:12 pm »
Hello Jmpessoa
 

There are two issues for new version.

1.What to use instead «gapp.BaseIndex»?
2. How to disable OnJNIPrompt event,   when a form is reactivated trough a Backkeypressed?

With Respect

rx3.fireproof


With the new changes, nothing works. I'm back on 06.28

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #512 on: July 08, 2015, 07:03:11 pm »
@rx3.fireproof

Please, wait .... I will try a solution  [today!] !

Thank you!

Edited:

Quote
2. How to disable OnJNIPrompt event,   when a form is reactivated trough a Backkeypressed?

solution: Added jForm property [boolean] PromptOnBackKey ... just do:

 .PromptOnBackKey := False;

Edited:

Quote
1.What to use instead «gapp.BaseIndex»?

solution: Added jForm property [boolean] TryBacktrackOnClose ... just do:

 .TryBacktrackOnClose:= True   for all forms in the stack ...

example:

1. AndroidModule1 ["actMain"]  open form2:

Code: [Select]
  if(AndroidModule2 = nil) then
  begin
    gApp.CreateForm(TAndroidModule2, AndroidModule2);
    AndroidModule2.PromptOnBackKey:= False;
    AndroidModule2.TryBacktrackOnClose:= True;
    AndroidModule2.Init(gApp);
  end
  else
  begin
    AndroidModule2.Show;
  end;

2. AndroidModule2 ["actRecyclable"]  open form3:

Code: [Select]
  if(AndroidModule3 = nil) then
  begin
    gApp.CreateForm(TAndroidModule3, AndroidModule3);
    AndroidModule3.PromptOnBackKey:= False;
    AndroidModule3.TryBacktrackOnClose:= True;
    AndroidModule3.Init(gApp);
  end
  else
  begin
    AndroidModule3.Show;
  end;

3. AndroidModule3 ["actRecyclable"]  open form4:

Code: [Select]
  if(AndroidModule3 = nil) then
  begin
    gApp.CreateForm(TAndroidModule4, AndroidModule4);
    AndroidModule4.PromptOnBackKey:= False;
    AndroidModule4.TryBacktrackOnClose:= True;
    AndroidModule4.Init(gApp);
  end
  else
  begin
    AndroidModule4.Show;
  end;

Now if  you close form4 then all [3 and 2]   forms [actRecyclable]  will close too!
« Last Edit: July 09, 2015, 03:22:43 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #513 on: July 09, 2015, 04:17:45 am »
@jmpessoa

Can jimageview and jmediaplayer show/play an image/a song from link on internet ?   :o

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #514 on: July 09, 2015, 04:34:26 am »
Hello m4u_hoahoctro !

Yes! some links to test ? 
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #515 on: July 09, 2015, 12:03:19 pm »
Hello m4u_hoahoctro !

Yes! some links to test ?

http://i.imgur.com/n2lQnkI.png

I could get content from web, but haven't known how to do with image and media file yet

rx3.fireproof

  • New Member
  • *
  • Posts: 49
Re: Android Module Wizard
« Reply #516 on: July 09, 2015, 05:09:53 pm »
Hello Jmpessoa

Disable OnJNIPrompt event works. Thank you.

On the first question about the «gapp.BaseIndex».

I have a more complex application logic.

As an example of.

From the form 1 you can create the form 2 or the form 3.
From  the form 2 or the form 3 you can create the form 4.
From the form 4 you can create the form 5.
The Form 5 can be created from the Form 1.

I made a working example on version 06.28 by reference https://yadi.sk/d/YyEGt-gUhmWuQ

How to make this example on 06.32 version without «gapp.BaseIndex» I don't understand.

In a real application I have a 27 forms. The data transmitted between them by global records with many fields (string,  boolean and double).


With Respect

rx3.fireproof

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #517 on: July 09, 2015, 08:30:43 pm »
Hello rx3.fireproof!

Try:

//gapp.BaseIndex

What happens if you comment this line? 

The form now know your [own] base... so, if you close it, you will return to the form where it was created [or "showed" :edited after bug fixed !]! 

But you can try return to "main" form using the new property "TryBacktrackOnClose:= True"
in all chain ...the process will stop [before main] if some form [in the way] was not set "TryBacktrackOnClose:= True"


The ideia is not have code like this [try comment this lines too!]:

Code: [Select]
form_index_0_level:=-1;
  form_index_1_level:=-1;
  form_index_2_level:=-1;
  form_index:=-1;

the logic must be "controled" by framework!
« Last Edit: July 10, 2015, 01:57:35 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

rx3.fireproof

  • New Member
  • *
  • Posts: 49
Re: Android Module Wizard
« Reply #518 on: July 09, 2015, 09:14:42 pm »
@ Jmpessoa

If the chain one - control by framework .

What if three chains.
Form5 already exists.

In each chain there is potentially private data.

To destroy the form5 is impossible. I have not found a way to destroy the form5 (form2, form3, form4...) and free the memory. So I use the index for forms.

Please show how to use  "control by framework"  in the "Sample" (three chains).  I will study and implement in my project.

Now sample is stable and has no bugs (only takes memory - sorry) .  I'm not a programmer, what's inside the user is not interested.


With Respect
rx3.fireproof
« Last Edit: July 09, 2015, 09:19:58 pm by rx3.fireproof »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #519 on: July 09, 2015, 09:40:32 pm »
Ok.  I am just doing you example:

Quote
From the form 1 you can create the form 2 or the form 3.
From  the form 2 or the form 3 you can create the form 4.
From the form 4 you can create the form 5.
The Form 5 can be created from the Form 1.

 ... some minutes ...

Ok I found a bug! Please fix here:    [<< ----   rx3!]

"androidwidget.pas"

Code: [Select]
Procedure jForm.Show;
begin
  if not FInitialized then Exit;
  if FVisible then Exit;
  FormState := fsFormWork;
  FVisible:= True;

  FormBaseIndex:= gApp.TopIndex; // << ----   rx3!

  gApp.TopIndex:= Self.FormIndex;
  jForm_Show2(FjEnv,FjObject,FAnimation.In_);
  if Assigned(FOnJNIPrompt) then FOnJNIPrompt(Self);    //*****
end;

Now it is OK to all chains!

my code:

form1 [Main]

Code: [Select]
unit unit1;

{$mode delphi}

interface

uses
  Classes, SysUtils, And_jni, And_jni_Bridge, Laz_And_Controls,
    Laz_And_Controls_Events, AndroidWidget;

type

  { TAndroidModule1 }

  TAndroidModule1 = class(jForm)
    jButton1: jButton;
    jButton2: jButton;
    jButton3: jButton;
    jTextView1: jTextView;
    jTextView2: jTextView;
    procedure jButton1Click(Sender: TObject);
    procedure jButton2Click(Sender: TObject);
    procedure jButton3Click(Sender: TObject);
  private
    {private declarations}
  public
    {public declarations}
  end;

var
  AndroidModule1: TAndroidModule1;

implementation

uses Unit2, Unit3, Unit5;

{$R *.lfm}

{ TAndroidModule1 }


procedure TAndroidModule1.jButton1Click(Sender: TObject);
begin
    if AndroidModule2 = nil then begin
     gApp.CreateForm(TAndroidModule2, AndroidModule2);
     AndroidModule2.Init(gApp);
   end
   else
   begin
     AndroidModule2.Show;
   end;
end;

procedure TAndroidModule1.jButton2Click(Sender: TObject);
begin
  if AndroidModule3 = nil then begin
     gApp.CreateForm(TAndroidModule3, AndroidModule3);
     AndroidModule3.Init(gApp);
  end
  else
  begin
     AndroidModule3.Show;
  end;
end;

procedure TAndroidModule1.jButton3Click(Sender: TObject);
begin
   if AndroidModule5 = nil then begin
     gApp.CreateForm(TAndroidModule5, AndroidModule5);
     AndroidModule5.Init(gApp);
   end
   else
   begin
     AndroidModule5.Show;
   end;
end;

end.

form2  [Recyclable]

Code: [Select]
unit unit2;

{$mode delphi}

interface

uses
  Classes, SysUtils, And_jni, And_jni_Bridge, Laz_And_Controls,
    Laz_And_Controls_Events, AndroidWidget;

type

  { TAndroidModule2 }

  TAndroidModule2 = class(jForm)
    jButton1: jButton;
    jTextView1: jTextView;
    procedure jButton1Click(Sender: TObject);
  private
    {private declarations}
  public
    {public declarations}
  end;

var
  AndroidModule2: TAndroidModule2;

implementation

uses Unit4;


{$R *.lfm}

{ TAndroidModule2 }

procedure TAndroidModule2.jButton1Click(Sender: TObject);
begin
   if AndroidModule4 = nil then begin
     gApp.CreateForm(TAndroidModule4, AndroidModule4);
     AndroidModule4.Init(gApp);
   end
   else
   begin
     AndroidModule4.Show;
   end;
end;

end.

form3  [Recyclable]

Code: [Select]
unit unit3;

{$mode delphi}

interface

uses
  Classes, SysUtils, And_jni, And_jni_Bridge, Laz_And_Controls,
    Laz_And_Controls_Events, AndroidWidget;

type

  { TAndroidModule3 }

  TAndroidModule3 = class(jForm)
    jButton1: jButton;
    jTextView1: jTextView;
    procedure jButton1Click(Sender: TObject);
  private
    {private declarations}
  public
    {public declarations}
  end;

var
  AndroidModule3: TAndroidModule3;

implementation

uses Unit4;

{$R *.lfm}

{ TAndroidModule3 }

procedure TAndroidModule3.jButton1Click(Sender: TObject);
begin
   if AndroidModule4 = nil then begin
     gApp.CreateForm(TAndroidModule4, AndroidModule4);
     AndroidModule4.Init(gApp);
   end
   else
   begin
     AndroidModule4.Show;
   end;
end;

end.

form4  [Recyclable]

Code: [Select]
unit unit4;

{$mode delphi}

interface

uses
  Classes, SysUtils, And_jni, And_jni_Bridge, Laz_And_Controls,
    Laz_And_Controls_Events, AndroidWidget;

type

  { TAndroidModule4 }

  TAndroidModule4 = class(jForm)
    jButton1: jButton;
    jTextView1: jTextView;
    procedure jButton1Click(Sender: TObject);
  private
    {private declarations}
  public
    {public declarations}
  end;

var
  AndroidModule4: TAndroidModule4;

implementation

uses Unit5;

{$R *.lfm}

{ TAndroidModule4 }

procedure TAndroidModule4.jButton1Click(Sender: TObject);
begin
   if AndroidModule5 = nil then begin
     gApp.CreateForm(TAndroidModule5, AndroidModule5);
     AndroidModule5.Init(gApp);
   end
   else
   begin
     AndroidModule5.Show;
   end;
end;

end.

form5  [Recyclable]

Code: [Select]
unit unit5;

{$mode delphi}

interface

uses
  Classes, SysUtils, And_jni, And_jni_Bridge, Laz_And_Controls,
    Laz_And_Controls_Events, AndroidWidget;

type

  { TAndroidModule5 }

  TAndroidModule5 = class(jForm)
    jButton1: jButton;
    jTextView1: jTextView;
    procedure jButton1Click(Sender: TObject);
  private
    {private declarations}
  public
    {public declarations}
  end;

var
  AndroidModule5: TAndroidModule5;

implementation

{$R *.lfm}

{ TAndroidModule5 }

procedure TAndroidModule5.jButton1Click(Sender: TObject);
begin
  showMessage('Hello Form 5');
end;

end.

Thank You!!!

PS. Late I will do a new revision release: New jSeekBar and the bug fixed!
« Last Edit: July 09, 2015, 11:00:13 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #520 on: July 10, 2015, 03:25:00 am »
Please give me an example, jmpessoa
thanks :)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #521 on: July 10, 2015, 04:14:52 am »
@m4u_hoahoctro,

Ok. ...some minutes..

Edited:

You can create a new project and replace yours  "Unit1.pas" and "Unit1.lfm"  with my:


code:  "Unit1.pas"
Code: [Select]
unit unit1;

{$mode delphi}

interface

uses
  Classes, SysUtils, And_jni, And_jni_Bridge, Laz_And_Controls,
  Laz_And_Controls_Events, AndroidWidget, imagefilemanager, mediaplayer,
  surfaceview;

type

  { TAndroidModule1 }

  TAndroidModule1 = class(jForm)
    jAsyncTask1: jAsyncTask;
    jButton1: jButton;
    jButton2: jButton;
    jButton3: jButton;
    jDialogProgress1: jDialogProgress;
    jImageFileManager1: jImageFileManager;
    jImageView1: jImageView;
    jMediaPlayer1: jMediaPlayer;
    jSurfaceView1: jSurfaceView;
    jTextView1: jTextView;
    procedure AndroidModule1JNIPrompt(Sender: TObject);
    procedure jAsyncTask1DoInBackground(Sender: TObject; progress: integer; out
      keepInBackground: boolean);
    procedure jAsyncTask1PostExecute(Sender: TObject; progress: integer);
    procedure jButton1Click(Sender: TObject);
    procedure jButton2Click(Sender: TObject);
    procedure jButton3Click(Sender: TObject);
    procedure jMediaPlayer1Completion(Sender: TObject);
    procedure jMediaPlayer1Prepared(Sender: TObject; videoWidth: integer;
      videoHeight: integer);
    procedure jSurfaceView1SurfaceCreated(Sender: TObject;
      surfaceHolder: jObject);
  private
    {private declarations}
    FActionType: integer;
  public
    {public declarations}

  end;

var
  AndroidModule1: TAndroidModule1;
  FImageBitmap: jObject;

implementation

{$R *.lfm}

{ TAndroidModule1 }

//try Wifi ...
procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);
begin
  if not Self.IsWifiEnabled() then Self.SetWifiEnabled(True);
end;

procedure TAndroidModule1.jAsyncTask1DoInBackground(Sender: TObject;
  progress: integer; out keepInBackground: boolean);
begin
   case FActionType of
     1: begin //sound
             jMediaPlayer1.SetDataSource('http://www.hrupin.com/wp-content/uploads/mp3/testsong_20_sec.mp3');
             jMediaPlayer1.Prepare();  ////Dispatch --> OnPrepared !
        end;

     2: begin //image
              FImageBitmap:= jImageFileManager1.LoadFromURL('http://miftyisbored.com/wp-content/uploads/2013/07/nature-sound-spa-app.png'); //'http://i.imgur.com/n2lQnkI.png
              FImageBitmap:= Get_jObjGlobalRef(FImageBitmap);
        end;

      3: begin  //video
           jMediaPlayer1.SetDataSource('http://bffmedia.com/bigbunny.mp4');
           jMediaPlayer1.Prepare();  ////Dispatch --> OnPrepared !
         end;
   end;
   keepInBackground:= False;
end;

procedure TAndroidModule1.jAsyncTask1PostExecute(Sender: TObject;
  progress: integer);
begin
  jAsyncTask1.Done;
  jDialogProgress1.Stop;
  if FImageBitmap <> nil then
  begin
     jImageView1.SetImageBitmap(FImageBitmap);
     Delete_jGlobalRef(FImageBitmap);
     FImageBitmap:= nil;
  end;
end;

procedure TAndroidModule1.jButton1Click(Sender: TObject);
begin
  FActionType:= 1;
  if not jAsyncTask1.Running then
  begin
    jDialogProgress1.Start;
    jAsyncTask1.Execute;    //Dispatch --> DoInBackground!
  end
end;

procedure TAndroidModule1.jButton2Click(Sender: TObject);
begin
  FActionType:= 2;
  if not jAsyncTask1.Running then
  begin
    jDialogProgress1.Start;
    jAsyncTask1.Execute;    //Dispatch --> DoInBackground
  end
end;

procedure TAndroidModule1.jButton3Click(Sender: TObject);
begin
  FActionType:= 3;
  if not jAsyncTask1.Running then
  begin
    jDialogProgress1.Start;
    jAsyncTask1.Execute;   //Dispatch --> DoInBackground
  end
end;

//here Start/Play  the Sound/Video
procedure TAndroidModule1.jMediaPlayer1Prepared(Sender: TObject;
  videoWidth: integer; videoHeight: integer);
begin
  jMediaPlayer1.Start();
end;

//needed to Show Video
procedure TAndroidModule1.jSurfaceView1SurfaceCreated(Sender: TObject;
  surfaceHolder: jObject);
begin
   jMediaPlayer1.SetDisplay(surfaceHolder);
end;

//Sound/Video End ...!
procedure TAndroidModule1.jMediaPlayer1Completion(Sender: TObject);
begin
   ShowMessage('The End!');
end;

end.


code:  "Unit1.lfm"
Code: [Select]
object AndroidModule1: TAndroidModule1
  Left = 285
  Top = 163
  Width = 320
  Height = 400
  MarginLeft = 0
  MarginTop = 0
  MarginRight = 0
  MarginBottom = 0
  Text = 'AndroidModule1'
  ActivityMode = actMain
  BackgroundColor = colbrDefault
  OnJNIPrompt = AndroidModule1JNIPrompt
  object jTextView1: jTextView
    Left = 31
    Top = 5
    Width = 258
    Height = 20
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    PosRelativeToAnchor = []
    PosRelativeToParent = [rpTop, rpCenterHorizontal]
    LayoutParamWidth = lpWrapContent
    LayoutParamHeight = lpWrapContent
    Text = 'App Load Image Video Sound From Internet'
    Alignment = taLeft
    Enabled = True
    BackgroundColor = colbrDefault
    FontColor = colbrDefault
    FontSize = 0
    TextTypeFace = tfNormal
    Id = 7138094
  end
  object jButton1: jButton
    Left = 2
    Top = 34
    Width = 92
    Height = 40
    MarginLeft = 2
    MarginTop = 4
    MarginRight = 2
    MarginBottom = 4
    Visible = True
    Anchor = jTextView1
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpLeft]
    LayoutParamWidth = lpOneThirdOfParent
    LayoutParamHeight = lpWrapContent
    Text = 'Sound'
    BackgroundColor = colbrDefault
    FontColor = colbrDefault
    FontSize = 0
    OnClick = jButton1Click
    Id = 5324807
  end
  object jButton2: jButton
    Left = 114
    Top = 34
    Width = 92
    Height = 40
    MarginLeft = 2
    MarginTop = 4
    MarginRight = 2
    MarginBottom = 4
    Visible = True
    Anchor = jTextView1
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpCenterHorizontal]
    LayoutParamWidth = lpOneThirdOfParent
    LayoutParamHeight = lpWrapContent
    Text = 'Image'
    BackgroundColor = colbrDefault
    FontColor = colbrDefault
    FontSize = 0
    OnClick = jButton2Click
    Id = 8462655
  end
  object jButton3: jButton
    Left = 226
    Top = 34
    Width = 92
    Height = 40
    MarginLeft = 2
    MarginTop = 4
    MarginRight = 2
    MarginBottom = 4
    Visible = True
    Anchor = jTextView1
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpRight]
    LayoutParamWidth = lpOneThirdOfParent
    LayoutParamHeight = lpWrapContent
    Text = 'Video'
    BackgroundColor = colbrDefault
    FontColor = colbrDefault
    FontSize = 0
    OnClick = jButton3Click
    Id = 1641892
  end
  object jImageView1: jImageView
    Left = 8
    Top = 272
    Width = 304
    Height = 128
    Visible = True
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpBottom]
    LayoutParamWidth = lpWrapContent
    LayoutParamHeight = lpWrapContent
    ImageIndex = -1
    BackgroundColor = colbrDefault
    ImageScaleType = scaleCenter
    Id = 1481240
  end
  object jSurfaceView1: jSurfaceView
    Left = 6
    Top = 80
    Width = 306
    Height = 96
    MarginLeft = 10
    MarginTop = 10
    MarginRight = 10
    MarginBottom = 10
    Visible = True
    Anchor = jButton1
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = []
    LayoutParamWidth = lpWrapContent
    LayoutParamHeight = lpOneThirdOfParent
    BackgroundColor = colbrDefault
    PaintColor = colbrRed
    OnSurfaceCreated = jSurfaceView1SurfaceCreated
    Id = 3868251
  end
  object jAsyncTask1: jAsyncTask
    OnDoInBackground = jAsyncTask1DoInBackground
    OnPostExecute = jAsyncTask1PostExecute
    left = 248
    top = 224
  end
  object jImageFileManager1: jImageFileManager
    left = 136
    top = 184
  end
  object jDialogProgress1: jDialogProgress
    Title = 'Lamw: Lazarus Android Module Wizard'
    Msg = 'Please, wait...'
    left = 248
    top = 168
  end
  object jMediaPlayer1: jMediaPlayer
    OnPrepared = jMediaPlayer1Prepared
    OnCompletion = jMediaPlayer1Completion
    left = 40
    top = 168
  end
end

Thank you!
« Last Edit: July 10, 2015, 08:05:40 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android Module Wizard
« Reply #522 on: July 10, 2015, 09:29:37 am »
A little question regarding jHTTPClient: is it stateful or stateless? I mean, can I use it to simulate a browsing session? I want to create some kind of web crawler, so I need to go to certain page, do login, save cookie, then browse the login-protected pages. Save cookie is be the key, if it can, then I think it's possible to do what I want.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #523 on: July 10, 2015, 03:39:59 pm »
@Leledumbo,

At the moment  jHTTPClient is stateless ... supporting Get and Post [name=value] data
and basic authentication....

OK, I will try implement cookies!

Thank you!

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #524 on: July 10, 2015, 04:19:28 pm »
Hi All!

There is an updated revision of the "Lamw" 

ref.  https://github.com/jmpessoa/lazandroidmodulewizard

Version 0.6 - rev. 33 - 09 July 2015 -

   NEW! jSeekBar component

   IMPROVEMENTS!   
         
      jForm
         New!
            properties: // <<--- @rx3.fireproof's request and suggestion!
               PromptOnBackKey [default=True]

               TryBacktrackOnClose [default=False]

                  The form now know your [own] base... so,
                  if you close it, you will return to the form where it was created
                  [or "showed"!].  But you can try return to "main form" form using the new
                  property "TryBacktrackOnClose:= True" in all [forms] chains ...
                  [warning]the process will stop [before main from] if some form [in the way]
                  was not set "TryBacktrackOnClose:= True"

   NEW! AppSeekBarDemo1   [multiples forms demos, too]
         
   UPDATED: Demo AppTest1  [multiples forms demos]

   NEW!  Demo: AppLoadImageVideoSoundFromInternet <<--- @m4u_hoahoctro's request and suggestion!

   HINT 1: Old Projects: upgrade your projects code templates !
      Lazarus IDE --> menu Tools --> [Lamw] Android Module Wizard --> Upgrade code Templates [*.lpr, *.java]

   HINT 2:   When prompt "Read error" [Unknown Property] just choice "Continue Loading"!

Thanks to All!

Special thanks to @rx3.fireproof and @m4u_hoahoctro
« Last Edit: July 10, 2015, 04:31:21 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018