Search results

  1. agraham

    Android Question objects

    <PEDANT WARNING !> 'Cast' not 'Casted' for 'can be ...' Erels's English has improved leaps and bounds since I first 'knew' him back in 2007 but he still slips up occasionally which is why I'm here to help šŸ˜ </PEDANT WARNING !>
  2. agraham

    B4A Class Bluetooth ESC/POS Printer Class

    It's done as an easy way to reset the printer to a default state so that any setup done for the previous demo/test will be reset for the next one.
  3. agraham

    B4A Library [Lib] Accelerated surface

    If you mean the link Download the latest version (1.12) in the first post then it has just worked fine for me though you may get a security warning - ignore it and keep the file.
  4. agraham

    Android Question How to create PlugIn for b4a application in Android?

    Do you want the users to be able to write some code? There's a Basic interpreter library in this on-device IDE you could use together with the IDE editor. https://www.b4x.com/android/forum/threads/basicide-suite-4-now-even-further-improved.134964/#content
  5. agraham

    B4J Question Hex to int with ByteConverter

    Check the length of b(). You only seem to be specifying two bytes but ByteConverter needs four bytes to create an Int as it divides the length of the byte array by 4 to know the length of the Int array to create for the conversion so you are getting a zero length i() array. As an aside I wrote...
  6. agraham

    B4J Question How correctly to destroy a class instance ?

    As @Daestrum says above, there is no need to explicitly destroy class instances in Java. As long as you have no references to it stored anywhere then the Java Garbage Collector will take care of reclaiming its memory - that's what it is designed to do!
  7. agraham

    Happy 60th birthday Basic!

    https://arstechnica.com/gadgets/2024/05/the-basic-programming-language-turns-60/?comments=1&comments-page=1
  8. agraham

    Android Question [Solved] unexpected error

    You are writing to a network port from the main thread and recent versions of Android don't like that. You should be using AsyncStreams in the RandomAccessFile library.
  9. agraham

    Wish: Widget support

    Oooh! - you big tease you! :icon_clap:
  10. agraham

    Http download .csv UTF-8

    "FF FE" is a little-endian UTF-16 BOM! "22 00" is the UTF-16 quote character which might be expected to be the first character in a csv file.
  11. agraham

    Http download .csv UTF-8

    Perhaps the UTF-8 encoded data starts with a Byte Order Mark which case Asc(data.CharAt(0)) will be code 65279. I don't see why you would see two diamonds though. :confused:
  12. agraham

    Force Close

    There's a null pointer exception being thrown in a Timer object. It's probably be due to this Timer bug. Setting the interval starts the Timer ticking and if this is done before the Timer is Initialized then a null pointer error occurs when the Timer tick occurs. EDIT:- Strictly the exception...
  13. agraham

    Beep like function?

    I suspect that the content pointed to by the DEFAULT_NOTIFICATION_URI field does not exist on the emulator.
  14. agraham

    Beep like function?

    Ahem! actually ... Sub Btn1_Click Dim Obj1 As Reflector Obj1.Target = Obj1.CreateObject("android.provider.Settings$System") Obj1.Target = Obj1.GetField("DEFAULT_NOTIFICATION_URI") Dim args(2) As Object args(0) = Obj1.GetContext args(1) = Obj1.Target Dim types(2) As...
  15. agraham

    Android Tutorial Two activities example

    Why can't you just do myvar.width if myvar contains a reference to the Panel you want? You can make myvar a Panel or a View variable and assign any Panel object to it.
  16. agraham

    B4A Library Dialogs library

    I'm afraid that it is an Android "feature" when using keyboard entry into a dialog. There is nothing that can be done about it.
  17. agraham

    Android Tutorial Two activities example

    Depending upon what you want your commands to do you might be able to use my BasicLib interpreter or, for expression evaluation only, it's ExpressionEvaluator subset.
  18. agraham

    Android Tutorial Two activities example

    Every library comes with an XML document that (more or less depending upon the author) documents it. The XML may beviewed with my off-line viewer or the same information can be seen online here.
  19. agraham

    Android Tutorial Two activities example

    Android does not actually support modality. Basic4 android implements it's own form of modality for Msgbox. Look at my Dialogs library for a set of modal dialogs that use the Msgbox modality mechanism, including a couple of custom dialogs that accept a Panel that can contain other views. If you...
  20. agraham

    Share My Creation Device Basic language IDE

    There are at least two ways to achieve this. Both should be easy to implement using the existing main activity of BasicIDE as a starting point. One way would be to make a new project, include the .src as a resource (Files tab) and change the main activity of BasicIDE to load this from...
Top