I'm trying to implement the following code using inline java, but without success...
how can I implement SumUpAPI.openLoginActivity using inline java or javaObject?
what should I replace in place of MainActivity.this ?
cut code:
import android.app.Activity;
import android.content.Intent...
Hello,
The below code is checking files in a selected folder and uses the Java code I found here in the forum.
Why do I see the JavaObject contents as Items in the Log but not in the Listview?
Perhaps I'm doing something wrong, could someone point me how to fix this?
Sub GetTheFolderContents...
Hello everyone,
I would like to use OutputStream. I tested this code and it works in B4J but not in B4A.
Below is the inline Java code where I encountered the error message "Constructor not found":
Dim out As JavaObject...
Hi,
please help... I want to change background of FIRST CELL in header of tableview. With next code I can change last added column; I can not find logic how to get FIRST CELL OF HEADER in tableview. Can somebody help me? Thx...
Code:
Private Sub SetFilterStyle(Index As Int, Color As String)...
I tried with both but to no avail...
I know how to do it with class modules but the same approach doesn't work in code modules (NoSuchFieldException) despite that I can successfully iterate through the fields of the code module with the getFields method.
For each field (they are all maps) of a custom type, I want to initialize its map.
I know I can use JavaObject / Reflection to do it but I can't find out how.
Hi ,
I try to use javaobjet to call an external library for usb printer, (dont suggest me "felusb" it doesn't work for me or better worked for three years and now crash),
the library I whould like to use ia named "printer.jar"
in pure JAVA I use the following code
import...
Hello, I'm trying to access the getBufferSizeInFrames using java object. Here 's the code:
Dim joAudioRecord As JavaObject
joAudioRecord = joAudioRecord.InitializeStatic("android.media.AudioRecord")
Dim frames As Int = joAudioRecord.RunMethodJO("getBufferSizeInFrames", Null)
Log(frames)
But I...
Hi all,
I'd like to get the name of the user's device (e.g. "Dave's Note 10"), and it's proving harder than I expected.
There's a method using Bluetooth, but I'd prefer not to have to ask for BT permissions just for the device name.
There appears to be a "device_name" in Android's...
Hi, I am using this wonderful Webreader library from Informatix https://www.b4x.com/android/forum/threads/epubreader-webreader.72560/, but I need to access the onPageFinished event of the underlying Webview. What I want is to use a WAIT FOR sentence to ensure that a page is fully loaded before...
Hello,
I want to use an animation between activities, using makeClipRevealAnimation. Unfortunately, Java and Android libs are real bullshit and totally beyond understanding...
All I succeed to do is
Dim jo As JavaObject
jo.InitializeContext
Dim ao As JavaObject =...
Hi all,
in the first place: I bought B4A years ago, but because of my invalidating health, I couldn't do much with it.
Now i try to get a bit done with B4J, just as a hobby, because my health is still not ok.
I searched the forum for JavaObject and saw a few good examples.
However in my...
This Code run perfectly when call from activity.
Sub CreateFileProviderUri (Dir As String, FileName As String) As Object
Log(Dir & " : " & FileName)
Dim FileProvider As JavaObject
Dim context As JavaObject
context.InitializeContext...
Hi, I want to use a type as an enum and I don't want to set the value of each string of that type since the fieldname IS what the string value will be. How to do it with Reflector or JavaObject ?
Dim r As Reflector
r.Target = BiomeType
r.Target = r.RunMethod("getClass")
Dim...
Hi all, does anyone know how to write this code using either JavaObject or Reflection libraries, maybe both are needed?
I'm not so good and don't really understand much how to use those two libraries, i've tried several things but none of them work
try {...
Hello,
How can I use an .aar Library inside my B4A project?
I've already added #AdditionalJar, but now, I want to call the methods of the Library.
#AdditionalJar: libposdigital-1.4.0-2-release.aar
Hi All,
I have to intercept, from an Android device, an event raised from a library of the device.
I added the library with
#AdditionalJar: companyregdevicelibrary
In this library there is an "IButton" object that I initialize with JavaObject
Dim CompDevice As JavaObject...
Hi,
TabStripViewPager exposes very few attributes and I'm trying to get the height of the whole TabStrip.
I have not been able to obtain this value using code such as :
Dim r As Reflector
r.Target = tabStrip
Dim tabStripHeight As Int = r.RunMethod("getMeasuredHeight")
However I know it's in...
Hi,
I am working on multitouch in B4J and I have some questions.
Idea is to have pane same size as form, and when there is touch event on pane i get data on x, y, id of touch...
My code is here:
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub...
Hi:
I've managed to include a banner with Appbrains thanks to Erel and amidgeha. Now, i'd like to show some banners in several activities so i've created some of them in Appbrains web. The problem comes when i want to identify the banner i'm showing. I've searched in appbrains documentation and...