Comments (15)
Hi @nsdonev,
to achieve that, you have to modify the phonegap plugin. You should update BlinkIdScanner.java as you did but instead of intent.putExtra(ScanCard.EXTRAS_SPLASH_SCREEN_LAYOUT_RESOURCE, fakeR.getId("raw", "test"));
you should add this line of code:
intent.putExtra(ScanCard.EXTRAS_SPLASH_SCREEN_LAYOUT_RESOURCE, fakeR.getId("layout", "test"));
This assumes that there exists test.xml
layout resource file in the res/layout
folder of the deployed app. To copy your custom layout for splash screen, create blinkid-phonegap/BlinkID/src/android/res/layout
folder and put your test.xml
layout file inside.
Next step is modifying the plugin.xml file. You should declare new source file that will be copied, after this line add the following one:
<source-file src="src/android/res/layout/test.xml" target-dir="res/layout" />
Run initCordovaDemoApp.sh
or initIonicDemoApp.sh
script again and splash screen should be updated.
Best regards
from blinkid-cordova.
Hello @i1E,
Thank you for the fast response! Could you please provide me an example of test.xml
content ?
Also is this possible in IOS , i am building ionic hybrid app and i am not really experienced both in Java and Swift.
Thank you
from blinkid-cordova.
Hi,
where exactly does this happen on iOS?
Can you post a screenshot which shows this?
Thanks,
Jurica.
from blinkid-cordova.
Hi @nsdonev,
here is an example for test.xml
content:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
tools:ignore="Overdraw">
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/logo"
android:background="@color/transparent"
tools:ignore="ContentDescription"/>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1"
android:layout_centerHorizontal="true"
android:layout_marginTop="18dp"
android:text="@string/loading"
android:textColor="#FF000000"
android:textSize="24sp"
android:background="@color/transparent"
tools:ignore="UnusedIds"/>
</RelativeLayout>
If you reference your own drawable resource (or some other resource file) in this layout file, you have to declare it in the plugin.xml file, like you did for test.xml
.
from blinkid-cordova.
Also maybe it will be great to know how to control the splash screen on iOS as well.
I would like to add more questions to this thread, as they are related to the splash. I have a requirement to make the splashscreen go away faster, how can I change this?
from blinkid-cordova.
Hi,
a couple of questions:
- can you explain what do you mean by splash screen on iOS? We don't have it on iOS.
- the splash screen duration on Android is related to the time it takes to open the camera. It cannot be open faster - it's related to the hardware.
If you believe you have some issue and that it can be opened faster, please attach a video which shows the current state of your app.
from blinkid-cordova.
Is there any way to just remove it ?
from blinkid-cordova.
Hi @nsdonev,
yes, you can remove splash screen by creating layout resource which is completely transparent. That layou resource you should pass through intent extras to scan activity as I have described in previous response.
from blinkid-cordova.
Untitled.zip
here is a demo of the splash screen on android
from blinkid-cordova.
Hi Talamaska,
On Android, this screen can be removed by the code Ivan shared with you.
You can remove splash screen by creating layout resource which is completely transparent. That layou resource you should pass through intent extras to scan activity as I have described in previous response.
Did you try this approach? If yes, where did you experience problems?
On iOS, if you're referring to the screen attached, this screen is part of the demo app, and not a part of the SDK. Once you add the plugin to your app, you won't see this screen.
If you're referring to some other screen, please attach an image.
Best,
Jurica.
from blinkid-cordova.
Hi @nsdonev, @talamaska,
the Android splash screen is removed now, you should just update to the latest version of the plugin.
from blinkid-cordova.
Hi @i1E . I downloaded zip with the latest change. Also deleted plugin folder just to be sure when i build, it will be with the latest code. However there is no change and the logo is still there. I checked every line that you added in all changed files and everything matches. Am i missing something else obvious ?
from blinkid-cordova.
Hi @nsdonev! Please make sure that you are using the latest master branch. Also make sure that you have re-inited your cordova app after updating the plugin.
If the splash screen still appears, please record and send us a short video which shows how splash screen is being displayed.
from blinkid-cordova.
I can confirm, after cloning the repo and updating its submodules with latest code splash dissapeared.
Thanks for all your help 👍
from blinkid-cordova.
If your issue has been resolved, please close it.
@talamaska - if the splash screen can be reproduced on iOS - you can open another issue specifically for this.
from blinkid-cordova.
Related Issues (20)
- not able to install plugin for ios HOT 4
- Not able to catch timeout HOT 2
- Not able to get face image while face image is true and full document is false HOT 1
- App getting crashed with One plus one device HOT 1
- Get the back image of the scanned USDL HOT 2
- Support for vertical USDL HOT 2
- Cant run plugin HOT 1
- cordova plugin : verification failed related to Unsupported Architectures, while submission to apple HOT 3
- Conflict with cordova-plugin-camera on Android HOT 1
- secondSideSplashMessage does not show up on iOS HOT 3
- Upgrade the plugin from 1.5.0 to latest (5.5.0) getting invalid license HOT 1
- Back side of US DL HOT 7
- Build 5.7.1 fails to install HOT 9
- Failed to detect if front and back side match in iOS HOT 4
- Build "MicroBlink.framework" failed. on xCode Version 12.x (macOS Big Sur) HOT 4
- Orientation does not match device when initialized horizontally HOT 4
- unable to get face image HOT 4
- Is there a way to turn off intro tutorial HOT 1
- In iOS, after scanning front and back, all images are undefined in BlinkIdMultiSideRecognizer.result HOT 1
- Fail to install in IOS platform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blinkid-cordova.