Skip to content

Archive for

4
Feb

How to start building Android apps on your Android phone using AIDE


DSCN0182I love being able to work on the move. With my Universal Folding Keyboard, the Arc Mouse and my Galaxy 6 Edge+, I have an entirely pocketable little productivity station that allows me to bash out articles anywhere. If I’m going on a night out in another part of the country, I can even work on the train and then put everything in my pocket once I get to the bar or club – no one needs to know.

I totally do that all the time by the way… But while this is fine for writing, there’s no way I can make apps on a phone. Or is there?

AIDE stands for ‘Android IDE’ (i.e. Android Integrated Development Environment) and is an app that actually lets you build other apps on the fly. It’s not going to replace Android Studio any time soon and it certainly has its limitations in terms of work flow, but it supports the full Android SDK and for making simple tools or testing ideas it’s actually pretty neat.

In fact, it even has some advantages over desktop IDEs. For example, it allows you to test your apps right there on your own device instead of having to use an emulator. It’s an easy way to learn Android development and it comes with built in lessons and tutorials. So let’s take a closer look.

Getting started with Android development using AIDE

To get started, you can download AIDE from the Play Store or head to the official website. Either way, you’re then going to enjoy one of the simplest and easiest ‘Hello World’ experiences out there.

There’s no need to install the Android SDK or Java, there’s no virtual machine, no telling the IDE where to find certain files… it’s all just done for you.

When you boot up AIDE, you’ll be presented with a few options. You can either ‘Learn’ or ‘Code’. Under the ‘Code’ heading, you only have one option which is to code in Android ‘for experts’. The documentation on the AIDE website refers to this as ‘Expert Mode’.

AIDE select

Select this option and you may have to agree to ‘Unlock Features for Free’, which is sponsored by Intel. You can go ahead with that – I did and I haven’t been inundated with spam just yet…

Next up, you can select either a ‘New Android App’ or one of several other options. You’ll notice that you have some samples here that you can reverse engineer and there’s even the option to create mobile games or smartwatch apps. For the purposes of playing along with this post and getting acquainted thought, choose the first option and then enter a name for your app and a package name.

AIDE First App

Now click ‘Create’ and you are ready to go. Better yet, AIDE has gone to the trouble of setting up the ‘Hello World’ code for you. Told you it was easy!

To test this app, simply click the play icon up top and it will install and run. Lo and behold, you have your basic app that says ‘Hello World’.

AIDE Hello World

Important Note: In order to test and run the apps you build on your device, you need to ensure that you tick the box in your device settings to allow installations from unknown sources. Otherwise, the installation will be blocked because it didn’t come from the Play Store.

But that’s really the only fiddly bit you’ll need to do…

Compare this to a moment with the article we posted recently on starting Android development with Android Studio and you’ll be able to see just how much easier this really is. There’s no need to install the Android SDK or Java, there’s no virtual machine, no telling the IDE where to find certain files… it’s all just done for you.

Finding your way around the IDE

Okay, so now you’ve seen that this thing works, let’s rewind a little and take a look around the interface.

So when you first launch your app, you’ll see you have MAIN.XML and MAINACTIVITY.JAVA tabs open along the top. As those with experience will know, the XML file is going to define the layout of your app’s UI, while the java is where you’ll input the code and the actual behaviour of your views.

AIDE Xml

In the top right, you have a few icons. Here is the ‘Play’ button that we’ve already tested, a gallery-type icon, a pen and a menu.

Moving from left to right, that gallery icon is actually your designer. Click this and you can see what your UI will look like when you compile and run the app.

AIDE Designer

Now this is where a limitation in the free version comes in. In order to use the designer to edit, you will need to pay a small monthly fee. It really is pretty reasonable but if you’d rather skip that, then you can do everything manually by editing the XML.

If you do go the paid route, you can click on the text to make changes to it in this mode. Try doing that and scroll down to where it says ‘Text’. Now you can change the writung on the text view to something else. I’ve gone for a less certain ‘Hello?’.

Alternatively, go back to your XML file and simple change the text where it says “@string/hello_world” to “Hello?”. Head back to your designer and you’ll see that it has nicely changed for you.

Continuing along the buttons at the top of the main view, you have the pen which lets you swap between an edit mode and a view mode and you have your menu. Hit the menu icon and you’ll be presented with a few options. The one you’ll use most often though is ‘View’ which will then let you choose which additional windows you want to show in your IDE.

For instance, you can opt to view your files, in which case you’ll be able to see your whole file structure just as you would with other IDEs like Android Studio. Here you can do things like adding new XML or Java Files. What you’ll also notice is that you can see where the directory is on your device, which means that you can use a file explorer such as ES File Explorer in order to add images to the res folder for instance. The view menu is also where you’ll be able to find errors, your debugger etc.

(As a side note, AIDE automatically creates Git repositories each time you create a new project.)

Creating a very basic app

Okay, so now you have an idea of what AIDE is all about, let’s try doing something very simple with it.

We’ve already changed the ‘Hello World’ text to ‘Hello?’. Now let’s add a button that we can use to interact with the app. To do this, we’re simply going to add the following code to the XML file:
<Button
android: layout_width=“wrap_content”
android: layout_height=“wrap_content”
android: layout_margin=“10dp”
android:text=“Hello!”
android:id=“@+id/button” />

This should go just below the text view section and just above </LinearLayout> and will look like so:

AIDE Add Button

As you type, you’ll notice that suggestions come up can save you typing things out if you don’t have a keyboard.

Now if you click the designer button, you should see that you have the same layout, except there’s also a button there next to your text.

It would be nicer if that button went underneath instead, so this is another good learning opportunity! Head back into your code and change the word ‘LinearLayout’ for ‘RelativeLayout’ in both instances.

Next, add that ‘id’ line to your TextView and give it the id ‘hello’. Now add this additional line to the button layout:
Android:layout_below=“@id/hello”

It should look like this:

AIDE Relative Layout

‘Relative layout’ means that you’re going to be defining the positions of elements on the screen based on how they relate to one another. In this case, we’re simply stating that the button should go underneath the text.

Finally, we want to make it so that our button actually does something. Thus, you need to head back to the Java file and enter some more code. This time it’s going to go just below ‘setContentView(R.Layout.Main);’ and will go a little something like this:
Button b = (Button) findViewByID(R.id.button);
b.setOnClickListener(new OnClickListener()
Public void onClick(View p)
Toast toast = Toast.makeText(getApplicationContext(), “Goodbye!”, Toast.LENGTH_SHORT);
Toast.show(); finish();

);

AIDE OnClick Listener

Notice again that as you type, suggestions come up. And when you type ‘findViewByID’, you should see the two views you created as options. You’ll also see a lot of red underlining as errors are detected and if you click the red cross at the top of the screen, it will let you know what the issue is. You’ll need to be a little patient with AIDE as it can take a while to figure out what you’re trying to do. If there’s a lot of red underlining, give it a minute and you should find it all calms down.

So, what we’ve done is to create an ‘on click listener’ which means the button is now actively listening out for interactions. When that happens, the ‘onClick’ function is called and this then shows a ‘toast message’ (this is just the name for the small grey text boxes you’ll have seen in other apps) and then closes the app.

Compile and run and when you click the ‘Hello!’ button, it will say ‘Goodbye!’ and leave. It reminds me of a Beatles song.

No doubt this is the start of something incredible. Skynet is becoming a reality. You can develop this app further if you wish but just consider the ethical implications of toying with such powerful AI…

More cool things you can do with AIDE

As you can see then, AIDE is actually a pretty cool tool for toying around with Android development that can make life a bit easier as a beginner. And there’s more under its sleeve as well.

For instance, if you choose ‘Learn’ when booting up, or by selecting it through the menu, you can run through different tutorials. Each one gives you an estimated completion time and you have the option to have sound and voice as well if you find that helpful. What’s so good about this is that it will actually walk you through each step and let you test and run your apps as you’re building them, which makes life a lot easier.

AIDE Lessons

There are also courses here for Android Wear, Android game development and general Java skills. Each comes with sample code you can run and edit right away, the game for example is a somewhat botched endless runner.

AIDE Endless Runner

And yes, when you’re ready you can also publish projects this way. Just click the top menu, then navigate to ‘More… > Project > Publish Project’. If you were so inclined, you could even go ahead and publish the app we just made. Though I wouldn’t recommend charging that much! :-)

Anyway, have a play around and see what you can learn. It might just be a good ‘in’ for somewhat to get to grips with Android development!

4
Feb

Apple Music now lets Android users save music to an SD card


Apple doesn’t often make Android apps, but when it does, it’s either to secure more iPhone users or give people access to Apple Music. Now that the streaming app has eclipsed one million downloads, the company has begun outfitting it with features that are native to Google’s mobile OS. In its most recent update, Apple Music has gained the ability to download tracks to an SD card, allowing users to store more of their chosen beats offline.

It’s a welcome addition for Apple Music users who may own a smartphone or tablet with limited built-in storage, but also those who may own a flagship device and want to travel with up to 128GB of music in their pocket. On top of that, the company now includes a full schedule of Beats 1 shows in the app and lets subscribers browse tracks by composers and compilations, making it easier to find and listen to new music.

Source: Apple Music (Google Play)

4
Feb

Google engineer finds holes in three ‘secure’ browsers


It appears no anti-virus or security software is safe from Google Project Zero researcher Tavis Ormandy. After recently exposing holes in products from Trend Micro and AVG, the bug hunter has recently gone public with three issues found in software offered by security firms Avast, Comodo and Malwarebytes that allow attackers to access unsuspecting users’ PCs.

For Avast, Ormandy identified that its Avastium browser (a fork of Google Chromium) allowed an attacker to “read any file on the filesystem by clicking a link.” The exploit involved using a specially-crafted JavaScript web page that could bypass built-in checks and potentially allow a malicious party to read cookies and email. The issue was first disclosed on December 8th, but Avast released a patched version of its browser on February 3rd.

It’s a similar story for Comodo’s Internet Security software and its Chromodo browser. When users install the software suite, their existing Chrome installation is replaced with Comodo’s own. It was meant to be “private,” but it wasn’t. When it’s executed, “all shortcuts are replaced with Chromodo links and all settings, cookies, etc are imported from Chrome. They also hijack DNS settings, among other shady practices,” notes Ormandy.

While Chrome operates a same-origin policy, which ensures that only scripts from the same website can access from each other, Chromodo disabled that protection and left users open to having their private data sniffed by malevolent websites. However, eWeek reports that the fault wasn’t with the browser, but an add-on. Comodo director Charles Zinkowski says the company released a new version of the browser without the add-on on February 3rd, which has fixed the issue for all users.

In the case of Malwarebytes, Ormandy found that its Anti-Malware browser wasn’t downloading updates securely, which could leave users open to a man-in-the-middle attack. An attacker could mimic the company’s built-in checks and run their own code on a user’s machine. The issue was severe enough for Malwarebytes CEO Marcin Kleczynski to address it on the company blog, but it could take up to four weeks for them to fix it.

Google’s Project Zero discloses vulnerabilities from companies that use the Chromium browser to launch their own secure browsers. The browsers tend to ship alongside anti-virus software and the temptation for vendors is to overwrite users’ existing settings to better protect them. As you can see, those methods often disable protections within the browser, leaving some users more vulnerable than before they installed the security tool.

Source: Avast, Comodo, Malwarebytes

4
Feb

ICYMI: Underground AI delivery, sea life discovery and more



ICYMI: Underground AI Delivery, Sea Life Discovery and More

Today on In Case You Missed It: The Xenoturbella deep sea creature doesn’t have a brain, eyes or functional gut, but its genetics prove it is one of the oldest forms of ocean life. Also, it looks like a discarded purple sock.

Switzerland is hoping to cut back on urban congestion by constructing an underground truck delivery tunnel about 50 meters underground.

Firebox is selling a ‘home cinema theater’ in cardboard box form, that goes over your head. It’s $36 of white elephant gift money well-spent. Our final story is more of a proper product, since for roughly $160 you can rig a computer and video to drum without having to actually invest in a physical drumset.

As always, please share any interesting science or tech videos, anytime! Just tweet us with the #ICYMI hashtag to @mskerryd.

4
Feb

Amazon’s Echo can now play music directly from Spotify


Playing Spotify music on the Amazon Echo is now as easy as saying three words: “Alexa, Play Spotify.” The e-retailer-slash-device-maker launched voice control for the app and two other music services in late January. But, you still had to stream music to the speaker via Bluetooth with a phone or a tablet. Now that Spotify is baked in, Echo can play music from the service directly. The catch? You can only take advantage of the feature if you have a Premium account in the US.

Spotify offers 30 days of free Premium membership if you want to give it a try. In case you decide that being able to quickly play Spotify music on the Echo isn’t all that important, though, you can always just continue streaming from your phone. Besides this new feature, Echo can also read books aloud on request, play Jeopardy! with you and even make it easy to order pizza during Super Bowl.

4
Feb

SYNEK’s countertop draft system will soon put growlers on tap


SYNEK’s countertop draft beer system is one of many Kickstarter success stories. However, due to alcohol laws in states like North Carolina and Virginia, breweries and retailers couldn’t fill the company’s cartridges. In those two states (and others), containers must be rigid and hold 64 oz. max. SYNEK’s first solution is a bag-like container that holds 128 oz. which meant eager drinkers in a few locales haven’t been able to use the device. That’s about to change, though, as the company is working on an adapter that will allow you to connect a glass growler to the compact draft system.

If you’re sippin’ suds on the regular, chances are you already have one of these from a brewery nearby, so this is a much more attractive option for many. There’s a new version of the original cartridge bags too, with a pressure rating that’s 50-percent higher. Perhaps best of all, you no longer have to pre-order the beer-serving appliances, so you can expect it to arrive faster. SYNEK promises $329 setup (or $399 bronze option) will keep those stouts and IPAs chilled and pressurized for 30 days or more, and this beer drinker is looking forward to testing that claim when the growler adapter arrives this spring.

Source: SYNEK

4
Feb

GoPro is axing budget Hero line, confirms ‘connected’ Hero5


GoPro had its most challenging year yet in 2015, after a less than successful Hero4 Session launch, a slump in share price, and a swelling product line that confused some customers. To rectify that, the company is pruning back its camera range to just thee models (again): The Hero4 Session, Silver and Black. GoPro CEO Nick Woodman also confirmed the next camera will be the “the most connected and convenient GoPro ever made. Hero5.” Not a Hero4+ or new Hero4 Session. The entry-level Hero line is being axed in April, the Hero5 will arrive “later this year,” Woodman said during the company’s latest earnings call.

Woodman also explained how GoPro will release an “entirely new” video editing experience that will enable users to make “strikingly good” video edits in minutes. A problem that GoPro (and others) have been eager to resolve for some time. GoPro’s awards program, for example, is an attempt to incentivise users to upload and share better GoPro videos on their social networks. These tools will make that easier. Both the new cameras and the software will come ready for forthcoming cloud services, with GoPro’s desktop content management application being slated for release in March.

Right now, the GoPro line-up includes three “Hero” models, the Hero, Hero+ and Hero+ LCD. These cameras were meant as cheaper options for those looking to get a GoPro without the premium cost. For some, it made it choosing the right camera confusing. In particular when the Hero4 Session launched, as it cost the same as the Hero4 Silver ($399), but with a much more limited feature set. GoPro would later slash the price of the Session to $199 (half the original asking price). Now it will replace the Hero line as the entry-level model.

Woodman already confirmed to Engadget that the company is planning to continue with the Session model, or at least its smaller, square form factor during an interview at CES. Woodman also confirmed on the earnings call, that the Hero5 will be “the most connected and convenient GoPro ever made. Though what this actually means is open to interpretation. It’s likely that simpler controls like the Session, and tight integration with the mobile, desktop, and cloud tools will be key, rather than a boos in resolution or camera quality. Though 4K in a Session-sized camera is also likely.

In previous years, GoPro introduced the Hero3+ and Hero+ models as more modest upgrades similar to how Apple launches “S” models every other year. But, with no Hero4+, it looks like we might see the lines between the Session and the Black and Silver become less pronounced. At least for now, if you were in the market for the cheaper Hero models, there’s a good chance a bargain could be on the way.

Source: GoPro

4
Feb

Apple Pay Coming Soon to Crate & Barrel, Chick-fil-A and Au Bon Pain


Apple-Pay-250x434 (1) copyApple Pay is now available at more than 2 million retail locations, with merchants such as Crate & Barrel, Chick-fil-A and Au Bon Pain set to accept the system in stores imminently, reports The Business Times.

Online clothing retailer Zappos.com also added Apple Pay to its iPhone and iPad apps on Tuesday, following a number of requests from customers to use the feature.

The announcement by Apple comes alongside news that the mobile payment service exceeded the company’s goal to make it available at 1.5 million locations by the end of 2015. In-app purchases using the service also more than doubled in the last six months of 2015 compared with the first half, says the company.

Despite the upbeat announcement, Apple still has work to convince U.S. customers to use Apple Pay at retail stores. According to a survey by consumer researcher Pymnts and InfoScout, 16.6 percent of people who own newer iPhones tried Apple Pay in October, an increase from 9 percent in November 2014.

Apple Pay is set to expand to China early this year, making it the fifth country to adopt the payments service since its U.S. launch in October 2014. The service expanded to the United Kingdom in July 2015, followed by Australia and Canada last November in partnership with American Express. Hong Kong, Singapore and Spain are also expected to gain support later this year.

Related Roundup: Apple Pay

Discuss this article in our forums

4
Feb

IRS expects its e-file tax system to be back online today


If you’re desperate to get tax refund cash via the IRS’s e-file system, a server crash may delay it, though not by much. The agency said that it’s “stll assessing the scope of the outage,” but thinks any disruptions will be minimual, adding, “we continue to expect that 9 out of 10 taxpayers will receive their refunds within 21 days.” This year, the IRS launched a new version of the Free File system aimed at consumers that earned $62,000 or less, a jump of $2,000 over last year.

The system has new security safeguards that the IRS implemented in conjunction with its 13 tax software providers. That follows an embarrassing breach that resulted in the theft of data from 100,000 taxpayers, which the IRS blamed on Russians hackers.

Customers can still file returns, since they’re first sent to companies like Intuit, H&R Block and other members of the Free File alliance via free software. However, the glitch has blocked providers from sending the returns to government since yesterday. Filing has been open since January 19th, so if you’ve already submitted your return, the crash shouldn’t affect you.

Via: AP

Source: IRS

4
Feb

All-In-One Converter; good enough to take on Google?


Rarely do you see an app come along that can go toe-to-toe with a Google equivalent and come out on top. When I first saw this particular app, I have to admit I was very skeptical what it could provide that Google Unit Converter does not already do – and in the form of an app-less service, no less.

And honestly, All-In-One Converter really doesn’t hold up. There are some spelling errors, a force-close error within the Currency menu, and Google simply offers more options, in an app-less environment, that can be typed into the search bar that’s at the top of nearly every Android device’s homescreen.

In one area, though, All-In-One Converter managed to surprise me. It offers many of the same features as Google Unit Converter, and adds one more; clothing sizes. Brilliant, really. Since different regions of the world have their own sizing charts, it stands to reason that one might need a converter for them. The clothing unit converter has options for both men and women, including shirts, coats, suits, skirts, pants, dresses, sweaters, even swim suites [sic].

Screenshot_20160203-210453
Screenshot_20160203-210458 

The shoe size converter isn’t quite a converter so much is it an answer to the question “what size do I wear?” Essentially, one measures his or her foot in length and the app spits out what size that is in various parts of the world. Unfortunately, this doesn’t take into account width or gender. Pants-size only goes up to a US 40 (which, in a country that’s suffering from an obesity problem, is rather…optimistic, we’ll say). One thing I note that is blatantly missing is a bra-size calculator, which, for anyone that is, or has ever shopped with a woman knows, is often a confusing endeavor.

The app is free and ad-supported, and there is a paid “Premium” version which removes the ads. The ad usage within this app is rather odd; they are placed in the middle of the screen, between categories of conversions. It really breaks up the app. I feel like placing the ads at the top, bottom, or both of the screen would be a much more aesthetically pleasing design choice.

At the end of the day, it comes down to whether or not you need a dedicated app to house all your conversions. If you’re comfortable simply typing them into the Google search bar, I would recommend doing that. If you need a dedicated app, you can do a lot worse than All-In-One Converter.

What I like:

  • Clothing conversions!

What I dislike:

  • Redundant with Google’s app-less solution.
  • Spelling errors.
  • Currency currently forcecloses.

Google Play Store – All-In-One Converter

The post All-In-One Converter; good enough to take on Google? appeared first on AndroidGuys.