Remodel-AR
  • Overview
  • ios guides
    • iOS Quick Start
    • iOS Walkthrough
      • SwiftUI Walkthrough
        • Section 1 - Setting up Remodel-AR in SwiftUI
        • Section 2 - Add a color picker
        • Section 3 - Add Export Features
        • Section 4 - Add Textured Paints
      • UIKit Walkthrough
        • Setting up Remodel-AR in UIKit
        • Adding a Color Picker
        • Getting to know Lidar scanning
        • Getting to know Legacy
        • Getting to know Floorplan
        • Getting to know Shader Paint
        • Section 2 - Add a color picker
        • Section 3 - Add Export Features
        • Section 4 - Add Textured Paints
    • iOS Library Documentation
      • Classes
        • ARController
        • ARStateModel
        • RemodelARLib
        • PassioConfiguration
      • Structures
      • Enumerations
      • Protocols
  • android guides
    • Android Quick Start
    • Android Walkthrough
      • Setting up Remodel-AR in Android
      • Paint Approaches
      • Getting to know Legacy
      • Getting to know Floor Plan
      • Getting to know Shader Approach
    • Android Library Documentation
      • Classes
        • PaintARActivity
        • OnCornerPlaced
        • GetWallPatchInfos
        • GetSavedImage
        • GetRawCameraImage
        • PassioSDKStatus
        • WallPatchInfo
    • ❔FAQs
Powered by GitBook
On this page
  1. android guides
  2. Android Walkthrough

Getting to know Legacy

PreviousPaint ApproachesNextGetting to know Floor Plan

Last updated 1 year ago

In this tutorial, you will learn how to paint walls using the Remodel-AR framework's Legacy approach.

Before starting this tutorial, make sure you've completed .

Step 1:

You shall wait for callbacks from the configure() method, Once you get callback in onPassioSDKReady()

Step 2:

By default Legacy approach would be selected, To start Legacy approach, you can simply call startLegacyApproach(), it will do required configuration for Legacy approach.

Step 3:

First let us supply the color and/or texture that we want to paint the wall with, you can pass any color hex in this format '''#RRGGBB', optional metadata can also be supplied with it using below code:

var metaData = HashMap<String,String>()
metaData.put("aMetaData", "Testing")
metaData.put("aMetaData2", "Testin2")

var path = externalCacheDir?.absolutePath + "/internal-transfer/texturex.jpg"

changeColor("#ff0000", texturePath, metaData)

It is also possible to set color/texture individually using this methods:

//apply texture
pickTexture(mBitmap)
//apply color
pickColor("#1FCCDE")

with pickTexture() you can directly pass bitmap as texture.

Step 4:

Let us take a button and on click of it call below code

placeGrid(null)

One can also pass parameter to get callbacks for first and second point selection by user like this

placeGrid(object:OnCornerPlaced {
    override fun onFirstCornerSelected(){}
    override fun onSecondCornerSelected(){}
})

Once the button is clicked while keeping the phone horizontal, It will generate a grid in front of the phone.

User can select two points on grid, Painted area will be generated in between those points.

If at any point you need help from the Passio team, please reach out to us at support@passiolife.com

Setting up Remodel-AR in Android