Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Android App

W4WHL
W4WHL Member ✭✭
edited June 2020 in New Ideas
I started working on a Android App to go alongside my CMD micro.  I wanted a few additional feature at hands reach without having to use the mouse.

Currently the following features are working;

1.  Band Selection
2. DSP (NR.NB.ANF)
3. RX filter high/low
4.  Xit/RIT
5.  And for fun DX spots

Currently the DX spots show 5 newest spots from all bands, at some point I will update this to be 5 latest spots of the current band.  Clicking the buttons beside the spot will tune that spot.

This app is just a proof of concept and a fun project, however no scaling has been implemented.  So this will only work on the tablet I designed it for.  So sorry if you don't have a Samsung galaxy tab 4, it won't work.  This is not meant to be a published App, but maybe one day.


image

William
14 votes

Open for Comments · Last Updated

14 votes

Declined · Last Updated

«13456715

Comments

  • DH2ID
    DH2ID Dr.med. Member ✭✭
    edited March 2017
    My Tab is a Galaxy S (SM-800)...
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    That tablet has much higher resolution and would not scale.  I'm learning scaling, so maybe one day
  • W4WHL
    W4WHL Member ✭✭
    edited December 2016
    New Progress on my Android App.  This time I'm doing a ground up build in Native android vs a port.  This one will work on any 10" tablet currently, more layouts for 7" screens MAY be made eventually.  I do not plan to support phones, because the screen is just too small to be useful. The App is displaying DXspots currently, but it may go away.  It was just added to test multi threading.  I think I will replace the DXspot view with radio stats.  Who knows!  Anyway, I think it looks much better with native android widgets.

    image

    Curious what y'all think would be handy to add.  This is meant to be a companion to a midi device or flex control.  It is meant to add handy controls, not to completely operate the radio.

    William
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Got a few hours today to get some coding in.  The App is now talking to the radio and parsing data.  The only operational control is the main tune dial, which works fine.  But the hard part is over!  All the variables I need are now parsing, and the radio is connected.  Now its just a matter of mapping the buttons and dials to the appropriate functions.

    I removed the silly DX spot list, as it was pretty much useless.  I now have room for a few more buttons and knobs.

    image
  • rfoust
    rfoust Member ✭✭
    edited December 2016
    fwiw, I also have a galaxy S. 
  • rfoust
    rfoust Member ✭✭
    edited March 2017
    Neat app, good job!  I'd love to write an android app that had a full spectrum/waterfall but not sure how to do that type of graphics coding. Seems like a lot of work.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Yes that's far beyond my reach also.  I'm not even sure how to go about that.  The only way I know is to get a DAX IQ stream, and I have no idea if that is even possible on android.  I do not know what codec is used for this.  I would have to ask the developers.

    The Opus Stream (AKA Remote Audio) may very well be possible.  This is an open format which is now supported on Android 5+.   But building a waterfall based off that stream would be useless.


    Maybe one day!



  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited December 2016
    The panadapter and waterfall are standard API constructs.  SmartSDR will calculate and send all the values to you so there is really nothing to do other than draw the panadapter and waterfall and tell the SmartSDR API how large the windows are that you are displaying the values in.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Good to know, Thanks Steve!  I will play with it.  Should be fun.  And much easier code than analyzing and audio stream.

    William
  • W4WHL
    W4WHL Member ✭✭
    edited December 2016
    My biggest hurdle is I'm using Android(java), so I can't use the API directly. I made a simple java class to pull in the UDP data packet stream from the radio.  Convert it from byte[] to int [].  Here is a single packet from a x=100 y=2 stream.  But I'm not 100% sure how to interpret this.  I will dig more, but any help pointing me in the right direction for interpreting this data?

    10.0.0.4: [954728508, 1073741824, 7213, 1397522435, 0, 0, 0, 0, 100, 2, 89416, 786444, 786444, 786444, 786445, 786444, 786444, 851980, 786444, 786444, 851980, 786444, 851981, 786445, 851981, 786445, 851981, 720906, 786445, 851981, 786445, 851981, 786444, 851980, 851981, 851981, 851981, 851981, 786445, 851981, 851981, 851981, 851979, 851981, 851981, 851981, 786445, 851981, 851981, 786445, 851981, 851981, 851980, 851981, 851981, 786445, 786445, 786445, 851981, 851979, 786445, 1429851, 1566525, 1299560, 1365096, 1429801, 1566472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]


    William
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited December 2016
    I'm at the IDXC breakfast, but when I get on a plane in a few hours I'll send you the VITA-49 information class which will tell you the details. You can also look at FlexLib for the data structures in the mean time if you want.
  • W4WHL
    W4WHL Member ✭✭
    edited June 2020
    Made some progress on the Android App.  UDP discovery is now working, and I added in some new controls.  Using a touchscreen for dials can be very touchy, as your big finger is never touching a single pixel.  So I added in a sensitivity slider.  This allows you to reduce the sensitivity of the dials to your liking. 

    I also changed the Dials, I think they look better.  Not all the controls work yet, but most do.  It will just take me a bit of time to map each one.

    image

    William
  • Ken - NM9P
    Ken - NM9P Member ✭✭
    edited December 2016
    Looks really slick, William! How much harder is this than doing the MIDI controller stuff?
  • DH2ID
    DH2ID Dr.med. Member ✭✭
    edited December 2016
    Looks real good, William. Will you add a FM and Tune/ATU button?
    73,
    Alex DH2ID
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Ken,

    Its infinity harder LOL! 


  • DH2ID
    DH2ID Dr.med. Member ✭✭
    edited March 2017
    YES! The readout numbers could be a bit bigger ... ;-)
    Or is it because it's late here at 1 a.m.... Will get up at
    7 again to work VK...ZL...hopefully...good night/morning 8-)
  • EA4GLI
    EA4GLI Salvador Member ✭✭✭
    edited November 2016
    Awesome! It is looking great!
  • Ken - NM9P
    Ken - NM9P Member ✭✭
    edited December 2016
    Like it!
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Ken,

    To give you a better idea.   First your dealing with java.  Every read right operation needs to be be handled with an Exception.  You must multi thread your application.  All read write operations run in their own thread to prevent issues with the main UI thread.  This brings up a new issue of how to share variables between threads.  This is not straight foward, if you don’t understand java.  It was a major learning experience

    Then add on Android.  Android is java based, but has its own flavour.   UI objects are defined in XML files.  Layouts are built in XML then accessed in java.

    udacity.com has some good online course that help a lot. 

    My first android version I posted was actually a port from processing to android.  You can write android apps in processing, but they are very limited.  When I started writing in native android, I was overwhelmed ( and still am).  But once you get the basics, it starts to make since.  I have barely scratched the surface, but am having a blast.

    William
  • EA4GLI
    EA4GLI Salvador Member ✭✭✭
    edited November 2016
    Let me start by saying, THANK YOU. It is great to have people like yourself taking the time to write these apps. Just a couple of comments.

    I find the band buttons too large taking a considerable amount of real estate on the screen. They could even be a drop down menu or smaller.

    Not sure of the Knob sensitivity numbers refer to the STEP size, if that is the case I miss having 1K which I find more useful than 50.

    Keep up the good work! 
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    The App is really intended to be a supplement to the Flex control or midi adapter.  So the buttons give quick easy access to band changes.  A pull-down would save real-estate, but add steps to the process.

    If anything I think the tune dial should just go away, as its redundant to the flex control (or midi).  Tuning around the band on touchscreen dial is frustrating at best.  Its kind of coll, but not exactly practical.

    My thought for this App is to sit beside the Flex Control or CMD Micro midi device to provide quick access to certain features, so you didn't need to use the mouse.

    In a contest type situation, I want big buttons and dials to instantly access my features.

    I'm just throwing things in the APP to see what sticks.

    One day I want to build a complete flex control app with remote audio and waterfall.  But that's way in the future.

    William
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    They are a bit small, but on the actual tablet they are plenty readable.
  • W4WHL
    W4WHL Member ✭✭
    edited June 2020
    One more layout change.  Moved the discovery text to the title bar, and moved stuff around.

    image
  • DH2ID
    DH2ID Dr.med. Member ✭✭
    edited March 2017
    Looks great. As your App has almost all knobs to control
    SmartSDR, why not use it instead of the CMD micro
    controllers? I don't see it replacing the mouse, as you
    would still need to click SmartSDR to load profiles etc.

    Tuning should be easier with a long slider on the touchscreen
    bottom instead of a tuning knob or making tuning possible
    by pressing on the sides of the knob, the longer you press
    the faster it tunes. Do you know this page? http://www.woodboxradio.com/shop.html... I have been using FXpad for a long time to control PowerSDR.
  • Ken - NM9P
    Ken - NM9P Member ✭✭
    edited December 2016
    This looks like an even more convenient layout.  The smaller control knobs remind me of the old Globe Scout 65 that I used as a novice in 1974!

    As a matter of personal preference, I actually prefer the all silver knobs you used about three posts back...the ones without the indented rings around them.  But that is just artwork, and not important as long as it works!  

    Will you use this as a finger-touch screen, or will you use a stylus?
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Ken it uses your finger.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    I made my own dial this time, instead of what I found on the internet.  Simple, but I like them.image


  • W4WHL
    W4WHL Member ✭✭
    edited June 2020
    Ok even better, I really like this one.  Purdy!

    image

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.