This project provides the official Huazhirong integration method and steps as well as key points to note, helping access personnel to quickly integrate.
integrated-sdk-demo for NEWPOS Android
for Android(Kotlin) (project)
- JDK 11+
- Android SDK
- Install prerequisites
- Clone the repo using
git clone https://github.com/newposstoresupport/integrated-sdk-demo.git
compileOnly(files("external/sdk_example.jar"))
- 1.If you put the sdk.jar in the regular libs folder, even if you use
compileOnly(files("libs/sdk_example.jar"))
there will be problems if you have
implementation fileTree(include: ['*.jar'], dir: 'libs')
in your configuration.
- 2.sdk.jar is only involved in compilation and not in packaging
<application
android:name=".MainApplication">
...
<uses-library android:name="com.pos.device" android:required="false"/>
<activity>
...
</activity>
...
</application>You need to add the shared library configuration under the application node of the manifest so that the Android system can help the app load the corresponding shared library.
import com.pos.device.SDKManager;
import com.pos.device.SDKManagerCallback;
SDKManager.init(context, new SDKManagerCallback() {
@Override
public void onFinish() {
Log.w("SDK", "init sdk success");
}
});- 1.If you initialize in your application, be sure to apply the application to the manifest.
- 2.Or you can initialize it before calling any interface. We recommend initializing it in the application to facilitate building an integrated project.
Copyright 2025 NEWPOSTech Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.