Using Tasker for Android (link: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) and a widget-composing tool, Zooper (link: https://play.google.com/store/apps/details?id=org.zooper.zwpro ) I have automated my Android phone to automatically register certain data whenever the phone enters or leaves certain WLAN-covered areas or connects/disconnects to certain BlueTooth devices.
The registered data is kept in simple Tasker-variables and a widget simply displays (some of) the contents of those variables to the user - it is really that simple.
Together this system works like an ever running background application with an always-updated (simple) user interface (the widget).
I am so happy with what this system does that I now want to convert the whole thing into a real, yet very tiny Android app that can be download and installed from Google Play.
However, I never developed an Android app before (and not an IOS app either!). But being a professional C# developer (and former C++ developer) for Windows desktop applications and Windows services for many years now, I feel confident that I can also learn how to make such a simple Android app, even if it involves programming languages with which I’m not so confident by now (Java for example).
What I need is a few directions to get me started the right way:
Which tools do I need for making such a simple app?
Can it be done in Visual Studio, or do I need to use Eclipse or
Xamarin?
Can it be done in C# or must it be done in Java?
Do I need to buy licenses for development tools (other than Visual
Studio) or can it be done with free software?
How would you go about the whole thing?
Any input will be much appreciated!
Related
Is it possible to make an Android application only in C++? I don't know Java. I've tried Visual Studio 2019 approach but I guess my computer isn't good enough for emulating Android phone.
You can write code for Android in C++, if you have the appropriate programming tools. You'll need a cross-compiler and linker for the appropriate architecture. These are readily available in Google's Native Development Kit:
https://developer.android.com/ndk/
I don't know if these tools can be used with Visual Studio -- I suspect it will be fiddly to set up.
The problem with programming in C or C++ for Android is that it's hard to integrate the application with the regular launcher and, even if you can do that, it's hard to provide a regular Android graphical user interface. Android simply does not provide a C API for the user interface.
I write/port a lot of command-line stuff for Android, so the lack of a graphical user interface doesn't bother me. However, most developers provide the user interface in Java and, if parts of the app needs to be in C or C++, it gets integrated with the app in the form of a native library.
Android Studio and similar tools know how to manage a project that has a mixture of C or C++ and Java code. Using well-established Android tools for developing complex, mixed-code apps like this is way simpler than trying to figure it all out yourself using a hodge-podge of tools from different places.
I recently purchased a Yuneec Breeze quad-copter drone that uses an Android and iOS app with its own WiFi connection as a controller.
I am looking to write a Java application that performs the functions of the Android app with Game Controller support (the Breeze Cam app uses the touchscreen which means my big thumbs cover the streaming video) but am running into a roadblock.
While being proficient in Java, including network functions, I find myself woefully uninformed as to how to capture and read the network traffic between my phone and my drone. Its simply a skill I never needed until now.
Any place to help me get started?
OR -
Since I'm writing this in Java would de-compiling and hacking away at the Android source be a more viable option?
If so what decompilers are recommended?
In my experience these apps tend to be written in proprietary code. Android may be an open-source project, but the apps written for it don't have to be. It's unlikely you'll be able to write your own code to control the drone unless Yuneec provides an API/SDK to do so.
A quick Google search yields this thread on their forums: https://yuneecpilots.com/threads/api-sdk.745/
It's not much info, but it looks like you're SOL. Sorry.
I am trying to port an Android application to BlackBerry 10 and make it look naitive. I have written all the QML for the app but I cannot seem to get the code to work. Do I need to translate the Java into C++ and if I do, do I have to do it manually or would an automatic one do?
Also my application has many different classes which I am not sure how to integrate with the BlackBerry layout.
I am trying to port the open source messenger Telegram, if that's any use. http://telegram.org/source/
Assuming you want to do a proper port and know C++ and Java, a full rewrite would be best. You can probably copy a lot of code from the Java source, but there's no way an automated converter or direct copy would ever work in C++.
Most of the processes in BlackBerry are the same as in Android, all you'd really need to do is rewrite all the UI code and handlers to fit the BlackBerry Native SDK
I have a great idea for an Android app, but as I'm only familiar with php/js, I'm uncertain of which approach I should choose for creating it. The app will be based on a google map with a lot of position markers. There won't be any fancy animations or other heavy resource-demanding activities.
As I see it there are three different options:
Read up on Java and program the whole thing in Java
Create the map activity in Java as a mapview and then use webviews for the other activities (which can easily be scripted as html5 webpages.)
Script everything as a webapp (not really an option, as this is not a real mobile app imho.
I'm most keen on using no. 2 as I'm quite familiar with html/php/js/mysql. Have to read up on the html5 specifics, though. Questions:
I need access to GPS and camera hardware. Is that acheivable in webviews?
How complicated is it to pass variables between js in webview activities and java in other activities?
How big a difference in performance can I expect if I use option 1 vs option 2?
Other thoughts?
Kind regards,
Anders
You can choose number 2, but as we are talking about an android phone, you might want to get really accurate coordinates for your map, and you can only achieve this by accessing your phone GPS, through webviews the best you can get is the location trought the device internet IP adress, wich doesnt lead to a very accurate geo position.
The best choice is a 100% java application in my opinion.
1) Yes it's possible, but as commented it will be less accurate and probably slow.
2) Not complicated. Painful if you need loads of interaction between a webview and native app. Using a Javascript Interface that can be set up from the native app. You can basically inject javascript in a webview's html.
3) Heterogeneity of performance depending on device. Because your implementation will be based on the device's browser you can expect to get really sluggish behavior for older devices. Anything to do with HTML events (Dragging, Tabbing...) will have a knock on most devices, from my experience.
4) As #vodich comments there are other party frameworks. My benchmarking on PhoneGap and other js-based options is that they're a waste of time if you are looking at developing a professional app. I haven't developed on Adobe AIR but find a pain the need to be installing plugins to get native functionality (access to sensors, camera, etc) Mobile is all about fast, responsive behaviour. HDI is your finger, user is fast, so app needs to be fast.
EDIT: So hell yeah! Java FTW!
Albert.
4.Other toughts?
Yes, if you really want to make a great Android app, you should be using only Android and specific Android UI components, and give it a native look and feel. And regarding 1,2 yes it is possible, I would say not so complicated to just integrate them, but I think you'll eventually get in big problems.
Learn Java and write your application natively.
Webviews might allow you to use your php skills to present something to the user, but it's entirely one-way - you'll not be able to interact with what's inside.
The Android developer site offers fantastic documentation and jumping from PHP to Java isn't greatly difficult, though you'll need to get used to strict typing and "real" OOP.
Other thoughts? Don't go down the PhoneGap/Cross platform toolkit road - it might allow you to write applications for multiple platforms and using your current skills, but in the end you get a subpar app that doesn't feel right on either platform and doesn't fair well as future versions of iOS and Android are released.
I've been thinkin about games on android and was thinking - isn't it EASIER to make a game in flash than in android using Java with android SDK ? I've only experience with Flash/AS3 and it's quite easy to create user interface, animations, layout and to write scripts.
As of Flash CS3 there are motion detection objects, so we can create really interactive games.
However I've not seen any flash game related for a phone( I mean with orientation and so ). Is there something I am missing like flash too slow on a android enabled phone?
This applies to applications too. I would like to hear opinions about Flash vs Android :)
you can create game in flash and adobe air will convert it in apk. adobeAir is version where you can create any game and just 2 or 3 step that convert it in apk.so you can publish it or play it in your android phone
Flash is not supported on Android 2.1 and lower, and some manufacturers no longer provide software updates for their older devices. I think Flash will also probably be slower (which may not be an issue if your game isn't very computation/graphics heavy) and consume more battery. It also doesn't take advantage of multi-core processors right now, but that may change in the future.
On the other hand, if you write your game in Java for Android, you will be limited to one platform.
As a compromise, you could try something like Haxe, which allows you to compile your code into flash, Java and C++, among others.