Git Product home page Git Product logo

Comments (15)

i1E avatar i1E commented on June 7, 2024

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.

nsdonev avatar nsdonev commented on June 7, 2024

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.

Cerovec avatar Cerovec commented on June 7, 2024

Hi,
where exactly does this happen on iOS?
Can you post a screenshot which shows this?
Thanks,
Jurica.

from blinkid-cordova.

i1E avatar i1E commented on June 7, 2024

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.

talamaska avatar talamaska commented on June 7, 2024

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.

Cerovec avatar Cerovec commented on June 7, 2024

Hi,
a couple of questions:

  1. can you explain what do you mean by splash screen on iOS? We don't have it on iOS.
  2. 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.

nsdonev avatar nsdonev commented on June 7, 2024

Is there any way to just remove it ?

from blinkid-cordova.

i1E avatar i1E commented on June 7, 2024

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.

talamaska avatar talamaska commented on June 7, 2024

Untitled.zip
here is a demo of the splash screen on android

from blinkid-cordova.

Cerovec avatar Cerovec commented on June 7, 2024

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.

simulator screen shot 24 apr 2017 17 28 10

from blinkid-cordova.

i1E avatar i1E commented on June 7, 2024

Hi @nsdonev, @talamaska,

the Android splash screen is removed now, you should just update to the latest version of the plugin.

from blinkid-cordova.

nsdonev avatar nsdonev commented on June 7, 2024

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.

DoDoENT avatar DoDoENT commented on June 7, 2024

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.

nsdonev avatar nsdonev commented on June 7, 2024

I can confirm, after cloning the repo and updating its submodules with latest code splash dissapeared.
Thanks for all your help 👍

from blinkid-cordova.

Cerovec avatar Cerovec commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.