Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8860829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:20:55+00:00 2026-06-14T15:20:55+00:00

I’m doing a simple courier system using android. How do I do if at

  • 0

I’m doing a simple courier system using android. How do I do if at the end of the delivery process client have to sign on the phone as the acknowledgement that they received the courier. How do i can do this using android. Any advice, suggestion is highly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:20:56+00:00Added an answer on June 14, 2026 at 3:20 pm

    Performing a signature consume lots of space and a in phone device small area is not sufficient to take a signature from client at end of delivery process this is my idea.

    Generate a list having delivery details.

    –> at delivery time on click of delivered item a view opened.

    –> in that view client can perform signature.

    –> you can save that signature along with delivery details in DB

    –> Delete or transfer items from to Deliver list to Delivered items(Which should be your another view approach)

    This is my idea to perfor

    m that task. For taking signature you can apply paint method and signature methods ask me if you want help on that too. thanks

    package com.paintexample;
    
    import android.content.Context;
    import android.graphics.Canvas;
    import android.graphics.Color;
    import android.graphics.Paint;
    import android.graphics.Path;
    import android.graphics.RectF;
    import android.view.MotionEvent;
    import android.view.View;
    
    public class DrawView extends View {
    
        private static final float STROKE_WIDTH = 5f;
    
        /** Need to track this so the dirty region can accommodate the stroke. **/
        private static final float HALF_STROKE_WIDTH = STROKE_WIDTH / 2;
    
        private Paint paint = new Paint();
        private Path path = new Path();
    
        /** Optimizes painting by invalidating the smallest possible area. */
        private float lastTouchX;
        private float lastTouchY;
        private final RectF dirtyRect = new RectF();
    
        public DrawView(Context context) {
            super(context);
    
            paint.setAntiAlias(true);
            paint.setColor(Color.BLACK);
            paint.setStyle(Paint.Style.STROKE);
            paint.setStrokeJoin(Paint.Join.ROUND);
            paint.setStrokeWidth(STROKE_WIDTH);
        }
    
        /** Erases the signature. */
        public void clear() {
            path.reset();
    
            // Repaints the entire view.
            invalidate();
        }
    
        @Override
        protected void onDraw(Canvas canvas) {
            canvas.drawPath(path, paint);
        }
    
        @Override
        public boolean onTouchEvent(MotionEvent event) {
            float eventX = event.getX();
            float eventY = event.getY();
    
            switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN:
                path.moveTo(eventX, eventY);
                lastTouchX = eventX;
                lastTouchY = eventY;
                // There is no end point yet, so don't waste cycles invalidating.
                return true;
    
            case MotionEvent.ACTION_MOVE:
            case MotionEvent.ACTION_UP:
                // Start tracking the dirty region.
                resetDirtyRect(eventX, eventY);
    
                // When the hardware tracks events faster than they are delivered,
                // the
                // event will contain a history of those skipped points.
                int historySize = event.getHistorySize();
                Logger.debug("historySize : " + historySize);
                for (int i = 0; i < historySize; i++) {
                    float historicalX = event.getHistoricalX(i);
                    float historicalY = event.getHistoricalY(i);
                    expandDirtyRect(historicalX, historicalY);
                    path.lineTo(historicalX, historicalY);
                }
    
                // After replaying history, connect the line to the touch point.
                // Logger.debug("eventX " + eventX);
                // Logger.debug("eventY " + eventX);
                //
                // Logger.debug("lastTouchX " + lastTouchX);
                // Logger.debug("lastTouchY " + lastTouchY);
                //
                // if (eventX == lastTouchX && eventY == lastTouchY) {
                //
                // path.addCircle(eventX, eventY, 20, Path.Direction.CW);
                //
                // }
    
                path.lineTo(eventX, eventY);
    
                break;
    
            default:
                Logger.debug("Ignored touch event: " + event.toString());
                return false;
            }
    
            // Include half the stroke width to avoid clipping.
            invalidate((int) (dirtyRect.left - HALF_STROKE_WIDTH), (int) (dirtyRect.top - HALF_STROKE_WIDTH), (int) (dirtyRect.right + HALF_STROKE_WIDTH), (int) (dirtyRect.bottom + HALF_STROKE_WIDTH));
    
            lastTouchX = eventX;
            lastTouchY = eventY;
    
            return true;
        }
    
        /** Called when replaying history to ensure the dirty region includes all
         * points. */
        private void expandDirtyRect(float historicalX, float historicalY) {
            if (historicalX < dirtyRect.left) {
                dirtyRect.left = historicalX;
            } else if (historicalX > dirtyRect.right) {
                dirtyRect.right = historicalX;
            }
            if (historicalY < dirtyRect.top) {
                dirtyRect.top = historicalY;
            } else if (historicalY > dirtyRect.bottom) {
                dirtyRect.bottom = historicalY;
            }
        }
    
        /** Resets the dirty region when the motion event occurs. */
        private void resetDirtyRect(float eventX, float eventY) {
    
            // The lastTouchX and lastTouchY were set when the ACTION_DOWN
            // motion event occurred.
            dirtyRect.left = Math.min(lastTouchX, eventX);
            dirtyRect.right = Math.max(lastTouchX, eventX);
            dirtyRect.top = Math.min(lastTouchY, eventY);
            dirtyRect.bottom = Math.max(lastTouchY, eventY);
        }
    }
    

    above is draw class

    now add draw view in your activity like this.

    //Assigning Drawing Board
            drawView = new DrawView(this);
            setContentView(view);
            drawView.requestFocus();
            linearLayout.addView(drawView);
    

    you can your different methods of DrawView class for clear/paint and more enjoy

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.