Android Question The Basics - How to use the Android Support Library

Cass

New Member
Licensed User
Longtime User
Hi there,

Firstly, I must apologise. I am a programmer from way back, but Android is a new sphere of interest for me. Your help in the following would be appreciated. Try not to cringe at my total lack of knowledge.

Just bought the B4A software and getting to grips with it... slowly. I am just trying initially to add in the stock standard Android Navigation Drawer and StdActionBar, which I believe should be available in one of the Android API extra libraries. However, I am having a little difficulty, despite all the research and books and tutorials I have searched. It seems like there are a couple of strategic points missing...

So, I have the Android SDK, where I have downloaded the /Extra/Android Support Library v 19.0.1. I have also created a folder separate from the B4A folder for extra libraries, and configured the path in the software to point to it.

Hence, I have folders: -

C:\Android\android-sdk\extras\android\support (this is where I want to grab the libraries from)
C:\Android\b4aExtraLibraries (this is where I am meant to put in the extra libraries)

So, the way I understand it, I am meant to copy in the .jar and .xml files from the extra libraries to my extra library location. But, I only see .jar files, as follows: -

android-support-v4
android-support-v7-appcompat
android-support-v7-gridlayout
android-support-v7-mediarouter
android-support-v13

I copied those to my b4aExtraLibraries, and then... Okay, so is the B4A IDE now meant to see these library extras; do I have to do something; copy something else; select some menu item? Orrrr, have I totally got this all wrong? In addition, once I have the libraries in there, if it is actually possible to do, how do I know how to access the various objects, methods and properties (they are likely not the right terms...), some reference to them somewhere I guess; Google?

Any step A, B, C type help, or a pointer to some other enlightening post would be most appreciated.

Cheers,
Cass.
 

NJDude

Expert
Licensed User
Longtime User
B4A libraries require an XML and a JAR file, which you will have to copy to your additional libraries folder, sometimes, depending on the library, it might require an extra JAR from other source, in this case, you just need the JAR from android-support-v4, so, to have the whole working set you need the B4A XML, JAR and the Support JAR.
 
Last edited:
Upvote 0

Cass

New Member
Licensed User
Longtime User
Hi there NJ,

Thanks for the reply. Your reply still leaves me with no real clue as to where to get these files .xml and extra .jar file from. Plus, no answer on what needs to be done once the files are in the extra folder; how does the IDE know they are there?

Now, additionally, according to the post called 'AHNavigationDrawer - Native Google Navigation Drawer', which uses the Android Support API to refine the stock Navigator Drawer, it says one only needs to copy the .jar file to my B4A extras folder.

As confused as ever. With so many people having used the Android Support library to make their own libraries, I would think that someone out there has a definitive step-by-step answer...?
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
Cass .. not saying this will solve your problem but It might help ..
This Library uses the android-support-v4.jar library which is part of the Android SDK. You have to install it with the Android SDK Manager. In the SDK Manager please add/download the "Extras/Android Support" package. Then you will need to copy the android-support-v4.jar file from <SDK root folder>\extras\android\support\v4 to your B4A custom libs folder!

all additional downloaded library files are sent to my default b4A install libraries folder.
C:\Program Files\Anywhere Software\Basic4android\Libraries

from what I see quoted .. you have to download and copy the AH Navigation library files (.jar & .xml) ... AND the v4.jar file mentioned above to this folder or your custom Additional b4A libraries folder.
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Ok, let me rephrase what I said on my previous post, in this case what you need to do is to unzip the Navigation Drawer library and copy the XML and JAR to your C:\Android\b4aExtraLibraries, then from the <SDK root folder>\extras\android\support\v4 directory you copy the 'android-support-v4.jar' to your C:\Android\b4aExtraLibraries.

The B4A IDE only needs to know the location of your additional libraries, you must copy the all the necessary library files there.
 
Upvote 0

Cass

New Member
Licensed User
Longtime User
Hi there MJ and NJ,

Thanks for your replies. From your collective advice, I finally managed to get it. I guess what was throwing me was that I was expecting each .jar file to have a corresponding .xml file. However, in this case, I see that this is only true of the 'wrappers' created for B4A, where as the .jar file supplied from the Android SDK is on its own. Thus, as you both said, I ended up with two .jar files and one .xml file for this particular library addition.

Many thanks. Now all I have to do is figure out how to use all these extra libraries...

Cheers and no doubt we'll be talking again,
Cass.
 
Upvote 0
Top