Package Name
All code is organized under the shipedge.rep package. This is the main package containing all Activities, models, and utilities.
Shipedge Warehouse Pro uses a hybrid architecture that combines traditional Android patterns with modern MVP (Model-View-Presenter) architecture. Understanding the code structure helps developers navigate the codebase, locate features, and maintain consistency when adding new functionality.
This guide explains:
All code is organized under the shipedge.rep package. This is the main package containing all Activities, models, and utilities.
The project uses both legacy Android patterns (Activities + AsyncTasks) and modern MVP architecture. MVP is used in newer modules like Cycle Count and Load & Move.
The main package contains 229 Java files organized by feature and responsibility. Most legacy features are in the root package, while MVP modules have their own subdirectories.
Android resources (layouts, strings, images) are organized in the standard Android res/ directory structure with 171 layout XML files.
pro/├── AndroidManifest.xml # App configuration, permissions, activities├── build.gradle # Dependencies and build configuration├── gradle.properties # Gradle properties (AndroidX, Jetifier)├── project.properties # Target SDK configuration├── proguard-project.txt # ProGuard obfuscation rules├── lint.xml # Lint rules├── src/ # Source code├── res/ # Android resources├── libs/ # Local JAR libraries└── release/ # Release APKspro/src/shipedge/rep/├── [Main Activities] # Core feature Activities├── [MVP Modules] # Modern MVP architecture modules├── [API Classes] # Server connection classes├── [Data Models] # POJOs and data classes├── [Adapters] # ListView adapters├── [Utilities] # Helper classes and services└── [Other Components] # Additional componentsThese Activities handle the main warehouse operations:
Entry Point:
ReplenishmentActivity.java - Login screen and app launcherMain Menu:
AppMenu.java - Main navigation menu showing available featuresCore Operations:
MyRep.java - Replenishment operations (4133 lines, largest file)PickActivity.java - Picking and packing operationsQualityControl.java - Quality control operationsBinesActivity.java - Bins managementReturnActivity.java - Returns processingTransfers.java - Transfer operationsTimeTrack.java - Time tracking by projectBlindCount.java - Blind count operationsWall.java - Wall moduleHardware Integration:
CameraActivity.java - Camera usage for barcode scanningMyWebView.java - WebView componentAll server communication classes follow naming patterns:
Legacy Pattern:
ConnectToDataBaseServer*.java - Main API connection classesConnecToDataBaServer*.java - Variant naming (legacy)ConnectToDataBaseServer*Async.java - AsyncTask-based connectionsExamples:
ConnectToDataBaseServerLoginAsync.java - Login authenticationConnectToDataBaseServerReplenishment.java - Replenishment APIConnectToDataBaseServerReturn.java - Returns APIConnectToDataBaseServerToPickAsync.java - Picking APIConnectToDataBaseServerTimeTracker.java - Time tracking APIModern Pattern (MVP Modules):
CycleCountAPI.java - Cycle Count API clientLoadMoveBinAPI.java - Load & Move API clientPOJOs (Plain Old Java Objects) represent data structures:
Core Models:
Users.java - User information and session data (static class)Order.java - Order data structureProduct.java - Product informationBin.java - Bin/location dataAccount.java - Account/customer dataLocation.java - Location dataLpn.java - License Plate Number dataReplenishment.java - Replenishment request dataOther Models:
Device.java - Device informationLogPick.java - Pick logging dataLogProject.java - Project logging dataMultibox.java - Multi-box packaging dataListView adapters follow the pattern MyAdapter*.java:
Common Adapters:
MyAdapter.java - Base adapterMyAdapterListOrder.java - Order list adapterMyAdapterListBinToReple.java - Replenishment bin listMyAdapterQC.java - Quality control adapterMyAdapterSerialList.java - Serial number listMyAdapterTimeTrack.java - Time tracking adapterTotal: 45+ adapter classes for various ListViews
Hardware Services:
Datasource.java - Bluetooth scanner data handlerMySocket.java - Bluetooth socket managementConnectDevice.java - Bluetooth device connectionUtility Classes:
utils/UtilService.java - General utility methodsutils/HttpResponse.java - HTTP response handlingutils/VibratorService.java - Vibration serviceOther Services:
NotificationService.java - Notification handlingConnector.java - Generic connectorVerifyNet.java - Network verificationTwo modules use modern MVP architecture: Cycle Count and Load & Move.
Location: cycleCountActivity/
Structure:
cycleCountActivity/├── mainModule/ # Main screen module│ ├── view/│ │ ├── CycleCountActivity.java│ │ ├── CycleCountView.java│ │ └── adapters/│ ├── model/│ │ ├── CycleCountInteractor.java│ │ └── CycleCountInteractorClass.java│ ├── presenter/│ │ ├── CycleCountPresenter.java│ │ └── CycleCountPresenterClass.java│ ├── events/ # Event callbacks│ └── response/ # Response POJOs├── detailModule/ # Detail screen module│ ├── view/│ │ └── CycleCountDetailFragment.java│ ├── model/│ │ └── CycleCountDetailInteractor.java│ └── presenter/│ └── CycleCountDetailPresenter.java├── common/ # Shared components│ ├── dataAccess/│ │ ├── CycleCountAPI.java│ │ └── CycleCountService.java│ └── params/ # Request parameters├── dto/ # Data Transfer Objects└── pojo/ # Plain Old Java ObjectsMVP Pattern:
Location: loadAndMoveActivity/
Structure:
loadAndMoveActivity/├── mainModule/│ ├── view/│ │ └── LoadAndMoveActivity.java│ └── uiMain/ # UI components├── blockedBinModule/ # Blocked bins feature│ ├── view/│ ├── model/│ ├── presenter/│ └── events/├── putAwayModule/ # Put away feature│ ├── view/│ ├── model/│ ├── presenter/│ ├── events/│ └── pojo/├── putAwayDetailModule/ # Put away detail│ └── awayOptionsModule/├── refilModule/ # Refill feature├── common/ # Shared components│ ├── dataAccess/│ │ ├── LoadMoveBinAPI.java│ │ ├── LoadMoveBinService.java│ │ └── LoadMoveBinDB.java│ ├── events/│ └── params/└── dto/ # Data Transfer ObjectsFeatures:
LoadMoveBinDB.java)Structure:
Activity → AsyncTask → API Class → Server ↓ SQLite DatabaseCharacteristics:
Example: MyRep.java, PickActivity.java, QualityControl.java
Structure:
View (Activity/Fragment) ↓Presenter (Business Logic) ↓Interactor (Data Operations) ↓API Service → Server ↓Database HelperCharacteristics:
Example: cycleCountActivity/, loadAndMoveActivity/
Location: pro/res/layout/
Total: 171 XML layout files
Naming Convention:
activity_*.xml - Activity layoutsfragment_*.xml - Fragment layoutsitem_*.xml - ListView item layoutsdialog_*.xml - Dialog layoutsExamples:
activity_replenishment.xmlactivity_app_menu.xmlfragment_cycle_count_detail.xmlitem_order_list.xmlLocation: pro/res/values/strings.xml
Usage:
getString(R.string.resource_name)@string/resource_nameImportant: Always check strings.xml for exact UI terminology when documenting features.
Values:
arrays.xml - String arrays for spinners and listsdimen.xml - Dimension valuesstyles.xml - App themes and stylescolors.xml - Color definitionsDrawables:
drawable-mdpi/, drawable-hdpi/, drawable-xhdpi/, etc. - Images by densitydrawable/ - Vector drawables and XML drawablesMenus:
menu/ - Menu XML filesActivities:
*Activity.java - Main Activities (e.g., PickActivity.java)*Fragment.java - Fragments (e.g., CycleCountDetailFragment.java)API Classes:
ConnectToDataBaseServer*.java - Server connection classes*API.java - Modern API clients (MVP modules)*Service.java - Retrofit service interfacesModels:
Order.java, Product.java)Adapters:
MyAdapter*.java - ListView adaptersMyAdapterListOrder.java)Presenters (MVP):
*Presenter.java - Presenter interface*PresenterClass.java - Presenter implementationInteractors (MVP):
*Interactor.java - Interactor interface*InteractorClass.java - Interactor implementationMain Package:
shipedge.rep - Root packageSubpackages:
shipedge.rep.utils - Utility classesshipedge.rep.cycleCountActivity.* - Cycle Count MVP moduleshipedge.rep.loadAndMoveActivity.* - Load & Move MVP moduleshipedge.rep.providers - Content providersEach class should have a single, clear responsibility:
Good:
ConnectToDataBaseServerReplenishment.java - Only handles replenishment API callsMyAdapterListOrder.java - Only adapts order data for ListViewAvoid:
Legacy Features:
shipedge.rep)MVP Features:
common/ subdirectoryLarge Files:
MyRep.java - 4133 lines (legacy, needs refactoring)MVP Modules:
// In ActivityAsyncTask task = new ConnectToDataBaseServerReplenishment(uomBarcode);task.execute();// Handle response in callback or check result// In Presenterinteractor.getData(params, new EventCallback() { @Override public void onSuccess(Data data) { view.showData(data); }
@Override public void onError(String error) { view.showError(error); }});Legacy:
SQLiteDatabase db = openOrCreateDatabase("database_name", MODE_PRIVATE, null);db.execSQL("CREATE TABLE IF NOT EXISTS ...");MVP:
// Database helper classLoadMoveBinDB db = new LoadMoveBinDB(context);db.insertBin(bin);// Post eventEventBus.getDefault().post(new CycleCountEvent(data));
// Subscribe@Subscribepublic void onEvent(CycleCountEvent event) { // Handle event}When adding new features, use the MVP pattern like Cycle Count and Load & Move modules. It provides better separation of concerns and testability.
Use established naming patterns: ConnectToDataBaseServer* for API classes, MyAdapter* for adapters, *Activity.java for Activities.
Group related classes together. For MVP modules, use feature-based subdirectories with clear module boundaries.
Each class should have a single responsibility. Avoid “God classes” that mix UI, business logic, and data access.
Always use strings.xml for UI text. Never hardcode strings in Java code or XML layouts.
Add comments for complex business logic, especially in legacy code. MVP pattern makes code self-documenting through clear separation.
When refactoring legacy features to MVP:
Create Module Structure:
mainModule/, common/, dto/, pojo/ directoriesExtract View:
Create Presenter:
Create Interactor:
Update API:
Test:
Total Java Files: 229 in main package
By Type:
File Sizes:
MyRep.java (4133 lines)Architecture: