• 5,741,185
    REGISTERED
  • 49,867
    ONLINE NOW

Posts Tagged: library

android-sharing

There is an almost infinite wealth of app development knowledge housed within Google’s Developer Pages. However, not every solution presented by Google is the most optimal, and there is still plenty of room for some improvement. A good example is the ShareActionProvider class that is responsible for the share option within apps. You’ve undoubtedly encountered this in apps like Gallery, for example.

XDA Recognized Contributor nikwen noticed that data sharing isn’t done dynamically, so it consumes more time. This is because the application need to identify the file type. Then, it creates the correct sharing activity. Nikwen decided to improve this library by creating his own open source replacement, capable of handling sharing dynamically. This saves a lot of time and removes all limits from Google’s implementation. This can be seen in practice in XDA Senior Member SimplicityApks‘s previously covered FunctionCapture application.

The developer shows that even great solutions can be improved upon, and that’s the beauty of Android. If you are interested in the project and develop your own applications, head over to the original thread to learn more about adding DynamicShareActionProvider to your work.

python

When you get a new Android device, you are undoubtedly extremely excited. More than likely, one of your buddies told you about these so-called “ROMs,” root access, and so on. But you need to start somewhere, and this is how your journey on XDA begins.

For most of you, using ADB is simple like making tea. However, some of less experienced folks may struggle with installing a fully working ADB and fastboot, especially on Linux. Android Debug Bridge is a must when you want to get a log of your device or simply to root it sometimes.

Inspired by JDroidLib, XDA Senior Member zantekk wrote a python equivalent to make the communication between your phone / tablet and Linux PC easier. This library is still in early development stage, so not many things work. However, you can install the ADB binary on 64-bit version of Linux as well as reboot your device to bootloader and recovery. It can also execute the shell commands needed to do things such as changing permissions. The only requirements are a (64-bit) Linux machine and Python 3 installed.

If you are new to Android world or simply looking for some tools to make your life easier, head over to the development thread and find some more details about the AndroPy open source project.

 

 

Advertisment
device-2013-12-05-115925

XDA is the place where many amazing projects start. We have seen the first Android builds for the HTC HD2, first root on many devices, and many other epic projects. That’s why we are calling XDA a place for developers, by developers. A few days ago we talked about about JDroidLib, which was meant to improve the communication between PC and phone. Now it’s time to highlight another amazing piece of work.

XDA Recognized Developer AChep (Artem Chepurnoy) wrote a library to replicate the effect seen in Google Music and other Google applications. In these apps, the image visible on top of the screen becomes less visible while scrolling down. Achep was kind enough to demonstrate the functionality of his library on YouTube in order to allow everyone to see the library in action. You can also download a sample app to check it on your own.

This library can be used to improve the aesthetics of Android apps. The library is available for Android 4.0+ (master branch) and 2.1+ (android-support). Now it’s up to app developers to see Header2ActionBar in action.

The library is an open source project and doesn’t contain a binary file. If you are interested in the project, go to the original thread to learn more. You can also contribute to the project by submitting a pull request.

JDroidLib

Over a year ago, we talked about AndroidLib, the .NET assembly library written in C# that easily handles communication between a connected Android device and your program. It’s a great and innovative project, but it is unfortunately limited to Windows systems, as .NET works only with C#, F#, Visual C++, Visual Basic, Visual C++, and Visual C++, rather than the cross-platform Java.

Inspired by the AndroidLib idea, XDA Senior Member Beatsleigher started a project to rewrite the project in Java. The idea is simple. This project can now be used with Unix-like systems such as Linux or MacOS. So far, this projects allows users to easily install ADB on every supported platform. The same thing can be done with fastboot. It can ease the efforts for some less tech-savvy users, as installing ADB and fastboot manually isn’t exactly the easiest task. The developer plans to add tons of handy features, and we wish him good luck with the project.

The binary is not distributed, but it can be compiled from source. More information regarding project can be found in the original thread, so make your way there and give it a try.

Capture

If you’re creating certain types of apps in Java that are geared towards Windows users, you may run into some difficulty accessing and making changes to the Windows registry from within your app. Unlike .Net, which has provisions specifically to allow this, Java doesn’t inherently support this type of operation. This is initially what XDA Senior Member Beatsleigher discovered when porting one of his existing applications to Java, but thankfully it didn’t stop him.

When faced with the challenge of porting over one of his applications to Java, he initially found difficulty in accessing the registry. After doing research into what is needed and taking bits of code from various sources, he went ahead and created a Java Class Library intended to bring this functionality to any Java app developer easily. The library lets you view and modify the Windows registry from within your application, without manually finding and modifying the registry files directly.

If you’re a Java app developer and you wish to modify the Windows registry, Beatsleigher’s library may be a real time saver. To learn more, make your way over to the library thread.

music

Recently, we featured a guide by XDA Senior Member Dr.Alexander_Breen aimed at bringing lockscreen-like music controls to your app. However, the method was overly complicated for many users. So in order to make the process easier, Dr.Alexander_Breen has created the open source library Remote Metadata Provider. And since it’s licensed with Apache 2.0, you can use in your projects (commercial or not).

Remote Metadata Provider allows you to create your own remote media controls, which behave similarly to the lock screen music controls described in the developer’s previous guide. However, usage of the Remote Metadata Provider library is much simpler than the last. You first add the library to your development project as an external JAR. Then, you follow a clear guide with example code listed within the thread’s main post.

Currently, there is a bug on HTC Sense devices, where you lose lock screen controls after calling RemoteMetadataProvider#acquireRemoteControls(). There is also (temporarily) a bug when using Android 4.3. However, this will be fixed in a future version.

Head over to the library and tutorial thread to get started.

example

One week ago, we featured a guide by XDA Senior Member marty331 posted in our App Development forums aimed at helping application developers create in-app usage tutorials using transparent demo overlays atop application activities. However, not everybody is a designer able to create aesthetically appealing overlays. Luckily, XDA Senior Member nikwen discovered the open source ShowcaseView library by Alex Curran, which makes it easy to generate Holo-themed demo overlays with ease.

In addition to describing the Apache 2-licensed library, nikwen also put together a quick guide that teaches developers how to showcase views, views in fragments, and parts of the action bar. He also describes how to add listeners to the library to trigger the event, as well as add animations such as a virtual finger that performs a gesture.

As we stated before, one of the keys to getting users comfortable and happy with your application is to show them how to use it. Head over to the guide thread to get started.

Capture

In our continuing coverage of the App Development forums here at XDA, we’ve featured various open source libraries that  enable you to quickly add in functionality into your app-in-progress without having to reinvent the wheel. These libraries have streamlined app development in topics ranging from UI design and data visualization  to application updates and everything in between.

Now, thanks to XDA Senior Member klinkdawg, there is an open source library for SMS and MMS messaging. After gaining knowledge while creating his own messaging app, klinkdawg released his library with the intention of helping other developers create their own SMS and MMS apps.

In addition to simply sharing the code, the developer has also written a brief guide in the thread that should cover basic usage. Currently, Google Voice is not supported, but that is on the way in a future revision. Additionally, this library is in beta, and uses non-final APIs.

Despite the beta status, this library could be of use if you’ve been planning on adding text messaging to your app. Head over to the library thread and knlinkdawg’s Github to get started.

ss-main-window

Are you a developer using Mono for Android to develop pseudo-cross platform code using C# or .Net? If so, you may wish to save a few keystrokes for commonly executed commands.

XDA Senior Member ScatteredHell has created a DLL that works with Mono for Android to execute various commands. Originally, it supported obtaining system uptime, as well as some commonly used root-level commands such as mounting and unmounting the system as Read/Write and Read-Only, Rebooting, Setting Permissions, and Playing a Boot Animation. Now in its second version, it adds Get Date, Get Time, and Get Folders in a Specified Path to the list of supported commands. Example code is also given in the thread, demonstrating its usage.

While these shortcuts won’t save you massive amounts of time, the shortcuts will add up over time. Head over to the original thread to get started and streamline your Mono usage.

Capture

If you’re creating an application that displays a list, you will likely want to use a ListView. Now if you wish to make it look nice with animations and additional features such as different view types and expandable items, you would ordinarily have to do the hard work and add in the functionality yourself.

Thankfully, XDA Forum Member Niekfct shared his latest library for application developers in our relatively new App Development forums. So what functionality is available with this library? Currently, it offers list- and grid-view animations, and it also supports swipe to dismiss, expandable data points, and more. And to ensure compatibility with older devices, the library uses the NineOldAndroid library on devices running versions of Android older than Honeycomb.

If you wanted to easily add a ListView in your app and want it to have some snazzy animations, head over to the library thread to get started. Naturally, the library is open source, with the code available at the developer’s Github. Example code is available on the developer’s project page.

about-proxy-server

Over the years, the process for connecting Android devices to proxy servers has changed dramatically. Originally only supporting global configuration, now configurations can be set on a per access point basis. Furthermore, applications such as OpenVPN can work globally on devices running Ice Cream Sandwich and later.

So what do you do if you’re building an application and you want your to know a user’s proxy configuration? Up until now, this would be a pretty difficult task. Luckily, XDA Forum Member lechuckcaptain has already gone through the hassle so that you don’t have to. He has created a library to do this for you, regardless of the user’s Android version supporting from 1.x through 4.x. The library began with determining current proxy configuration, but has now grown to also ascertaining proxy status and other relevant information.

Head over to the library thread and visit lechuckcaptain’s Github to get started.

device_dialog_small

Think back to all those times when your non-tech savvy parents have called you over for free computer tech support. What’s one unifying theme from all of these instances? If your loved ones are anything like mine, it’s a horde of uninstalled updates awaiting approval. This is unfortunately all too common, as most of the technologically illiterate simply ignore update notifications, without realizing that these updates often patch vulnerabilities and add important features.

Luckily on Android, updates can be set to automatically install if the app’s permissions haven’t changed. However, not everyone has auto-update enabled, and even those with the option enabled may not take the time to manually update applications with changed permissions in the app manifest. In these instances, users need a little bit of prodding to get them to be a man and do the right thing—update their applications.

As a developer, not having users on the latest version of your app can be problematic. After all, who wants users complaining about broken features that have already been fixed two versions ago? Thankfully, XDA Senior Member rampo created a library to help with this problem in your own app. So how does the library work? Simple. UpdateChecker is a class that when called checks to see if the app is updated to the latest version available in the Play Store by parsing your app’s desktop Play Store listing. If there is a newer version available, the user is then prompted to update.

Head over to the library thread to prod your users to update.

Capture

We’ve featured plenty of tools in the past that allow an end-user to modify his or her own build.prop. We’ve also featured a set of tools for app developers to incorporate that allow applications to modify the file. These (obviously) all require root access, as you’re modifying system settings. However, to date we haven’t featured a method of reading the build.prop from an app.

There are plenty of reasons why an app developer would want read-only access a device’s build.prop. Be it to know about its software or hardware configuration, or simply to peek into some system settings, looking into this treasure trove of information is potentially quite useful for an app developer. However, requiring root access to do so is unnecessary from both user hassle and security standpoints.

In a quest to access the build.prop from his own app without resorting to root, XDA Forum Member torpedo mohammadi wrote a couple of lines of code and shared it with the community. The way he goes about it can be summarized in his explanation:

1. Make a process which executes “getprop” from the “/system/bin/getprop” directory and initialize the String which we want to get (ro.board.platform in example).
2. Make a BufferedReader which gets the value (String) by retrieving the data from a inputStreamReader().
3.Convert the BufferedReader to String.

Head over to the original thread to get started, copy the code, and get it implemented into your app.

Advertisement

XDA TV: Most Recent Video

Buy/Sell on Swappa

  • Nexus 5 (Unlocked) buy | sell
  • Galaxy Note 3 (T-Mobile) buy | sell
  • HTC One M7 (Verizon) buy | sell
  • Galaxy S 5 (Unlocked) buy | sell
  • Nexus 7 2013 buy | sell
  • Swappa is the official marketplace of XDA