javaobject

  1. Lucas Siqueira

    Android Question Help implementation java inline or javaObject

    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...
  2. S

    B4J Question Items from Javaobject in Log but not in Listview

    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...
  3. Soheyl

    Android Question Inline Java - Constructor not found

    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...
  4. DarkoT

    B4J Question TableView - change background of first column

    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)...
  5. TelKel81

    B4J Question How to get the value of a field declared in a code module using Reflection or JavaObject ?

    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.
  6. TelKel81

    Android Question Initializing the field of a custom type with reflector or javaobject

    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.
  7. F

    Android Question javaobject, use class that require handler in it's constructor

    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...
  8. N

    Android Question Access AudioRecord Methods

    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...
  9. Dave O

    Android Question getting device name using Settings.Global?

    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...
  10. Javier Alonso

    Android Question Webview onPageFinish event

    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...
  11. A

    Android Question makeClipRevealAnimation

    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 =...
  12. Arie van Wingerden

    B4J Question JavaObject issue

    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...
  13. K

    Android Question Service Contenxt Error at CreateFileProviderUri

    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...
  14. TelKel81

    Android Question SetField of a Type with Reflector or JavaObject ?

    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...
  15. walterf25

    Android Question JavaObject or Reflection Code

    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 {...
  16. Chianca

    Android Question Using .aar library with JavaObject

    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
  17. L

    Android Question Third part library - JavaObject

    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...
  18. TelKel81

    Android Question Using JavaObject or Reflector to get height of TabStripViewPager ?

    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...
  19. I

    B4J Question Multitouch

    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...
  20. F

    Android Question AppBrains AdId

    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...
Top