How to backup relevant files? - android

My app is getting to the point where I will be highly perturbed if I lose the source somehow. This is a personal / single developer project, so something like Subversion might be overkill. I'm thinking more along the lines of the "Backup" agent that is a part of the GExperts add-on in the Delphi world. Is there such a thing (that would backup all the .java, .xml, sqlite, etc. files) specifically for or suitable for the Android platform?

In my opinion using a version controll system is not overkill at all. You can keep hand on changes all the time. Making features that you don't even know whether to include or not into main branch. Not only features but every complicated task also, for example refactoring. With VCS that's no problem to make fast fix to released product during development of a huge task which is incomplete.
I can't imagine working without any VCS. I prefer Git because is fast and easy.

Related

multiplatform or android platform alone and desktop alone for Kotlin

i am trying to make a project that is designed for a business and a customer where the business will be on the desktop side and the customer will be on the android side.
i was wondering since both the platforms will have unique UI(tabs/services/actions... etc.) that serves their needs:
should i use Kotlin multiplatform and use as much shared code as possible or build a standalone app that works separately on each platform and then share information by servers?
are there even other ways to accomplish my goal?
so far here are the most important pros and cons of multiplatform:
+reduce time consumed
+ability to share code which reduce bugs and possible errors.
still in alpha version (experimental) which means not enough libraries in support .
to be honest the only thing that is stopping me from choosing multiplatform is the "experimental " warning sign and if i chose to make desktop app alone might as well make android/IOS app altogether( since the sharing code ability between android and IOS is very much reliable) and in that way i would have gained an extra platform for my phone app in return for the added time of development
i really need an answer from any experienced Kotlin developer and thank you in advance :)
What the KMP thought for is sharing business logic between platforms.
If you have different business logic(business/customer sides) not sure how much you’ll be able to share, but the least you can do is data objects: you can share same objects between business/client/server to make sure your json parsing is stable and doesn’t require changes in many places.
You’ll be able to share a lot of stuff if you choose to share android business logic with iOS, but note that there’re some pitfalls you need to learn, so I’d say you’ll spend 2x time for two platforms in first 1-3 month (same time as if you would do for two separate apps), and then your’ll be able to make two apps with average speed of 1.5x time.
Don’t forget that all UI part will take same time as for a separate app, so it won’t be “free”
Still if your project is big enough, it should pay off.
What’s about KMP being experimental: as for me it’s already stable enough and I’m using it in my current project for sharing code between ios/android/server.
It’s in active development phase so most of problems you face will be fixed fast, or you’ll get a workaround on the youtrack
For the JVM part you almost loose nothing: you had to use Native frameworks but if you need to using jvm dependencies in the shared module, you had to provide alternative code for an each other platform(ios, etc) using expect/actual
It has some limitations for iOS platform. The main one, I think, is that you had to work with a specific memory model: you can’t modify objects from different threads, but if you choose your architecture wisely it won’t be a big problem.
I think your decision should depend on how much logic code you need to share between different platforms, and if there's a lot - KMP is a good solution.

Working on a project at the same time on separate computers

I'm building an app with android studio with another developer. Is there any way in which I can make it so that both my partner and I can work on the project at the same time on different computers (both Windows computers)? I know there is a similar question, but I am looking for a more detailed explanation on how to do it.
My suggestion: Use Version Control preferably git.
This will help both of you to develop Apps without any problems of copying & pasting and manually making changes in all files one-by-one.
Note: Want to use git but do not want to open source your code (since Github allows creating private repository but with some Payment), then use Bitbucket, you can create private repositories for FREE!
EDIT: Github now provides unlimited private repositories.
Hope it helps!
Take a look at git. I will help you and your partner to work on the same project on a different computer (Windows, Mac, Linux...).
https://www.atlassian.com/git/tutorials/comparing-workflows
As others have indicated, you should use a version control system like git for this. This will give you the following features (among others):
The ability to share code between people
Essentially keeps a backup of your code on an external server
Keeps a history of revisions to files (so you can "back out" changes if you need) as well as differences between your local file and the version on the server
Allows you to merge changes between you and people working with you
How you do this will depend on which version control system you use, but some version control providers will allow you to also set up what's known as "Continuous Integration" - basically, if you or your partner check code in, it'll immediately start a build. If this is available to you, I strongly recommend using it. The advantage of that is that it'll give you quick feedback if you did something that'll prevent it from building for the other person (e.g. if you forgot to check in a file or something). This'll prevent a lot of frustration and wasted time. (This happens a lot more often than you'd think; you don't want the other person to have to spend half an hour trying to get the app to build again when they download your code only to find out that you forgot to check in a file).
I also strongly recommend integrating your stuff with each other as often as possible as well as practicing regular "re-baselines" (i.e. downloading each others' stuff and merging it with what you have locally). The longer you wait to integrate your stuff with each other the more complicated it'll become, and waiting too long greatly increases the risk of introducing bugs when merging or forcing unnecessary rework.

Suggest for working together with a shared project

i am working in an app for my self, nothing big,nothing for customer.i am working with 2 friends and we d like to know the best way to share the project in order to work in the meantime. We are using dropbox,but we are not sure is the best way because some times it gets errors.
we putted all of the file system in dropbox. Then in local everyone imported the file from dropbox so we can have changes in real time. I mean i work in an activity while my friend is setting the layout ecc. The problem is that sometimes some files are missing or not sync properly.
GIT (github.com,bitbucket.org) for version controlling and code management its the best
trello if you want to discuss on some bug issue , feature etc... its free too...
Redmine is a free and open source, web-based project management and issue tracking tool. It handles multiple projects and subprojects
Azendoo some use Evernote/Google Drive/Dropbox , but I have teammates who prefer other platforms. Azendoo works as a central hub and lets everyone use the storage system they have support for email for similar concept
Podio on the other hand also adds support or customer relationship managament (CRM)
WunderList in general a to do list doing stuff collaboratively
As dragon born said, Git is a must-use !
Dropbox, is a quite good software for image / document sharing but not for code.
SugarSync is good too.
For project management, there are a lot of software such as WunderList, Trello, Azendoo, Redmine, Podio and much more. So try some and see which one you like.
Version control
What you are looking for is version control. You might wonder why you need version control. Version control stores the code at a central place for all in your team to access it. This allows you to make sure that everyone in the group is using the latest version of the code.
Version control also allows you to store changes to file. Let say you and your friend change the same file at the same time and then you both upload it to a server like dropbox that you have tag. What happens is that the last person how uploaded will overwrite the code of the first person so that persons code will be lost. Version control handles this by keeping track of the changes and if two people change the same file it will try to resolve this by merge both changes in the file. This can not always be done automatically so most version controls will ask the last party at this point how you want the changes to be merge, but no code is just lost.
Version control creates a snapshot for every committed change so you can always go back to an earlier version if something goes wrong this is useful if some party merges a file incorrectly, or you want to try something you are not sure will work.
What version controls are there?
There are many different version controls to use.
git
svn
Mercurial
How to create a version control project.
As you may have notice by now all of this software require a server of some sort. You can either host it on a server you own or you can use a free service. There are a few to choose from.
github
google code
This are just a few example of the most popular, there are a lot more option out there if you look. Read up on them and choose the one that fits you the best.
Use git for code management and easy to share.

Github service hook for community translation webservice

I am taking care of an open source project: mixare. It's an augmented reality browser released under the GPLv3.
The source code of the project is on github and I would like to hook the localization part to some web-service a-la pootle. If necessary I can install my own instance of a translation service on our server, but also an hosted solution would be fine. So I would like to know:
Is there a preferred translation web service that syncs using github's service hooks? Any best practice to share?
Thanks a lot!
Git integration is one of major reasons why I started to write Weblate. It also supports remote trigger for git pull using URL, so it nicely integrates with Github (you just need to put the URL there).
PS: I've just noticed that Android string resources are not supported by backend I use for loading translations (translate toolkit), so it probably won't work for you...
While I appreciate your wish for git support, shouldn't you primarily be looking for a solution that will give you many and good translations?
To get many translations I'd recommend Translatewiki, unfortunately their manual setup takes some time though.
Apart from Translatewiki, transifex seems to be one of the better and not least bigger (counting translators) services. They've made their own client that take care of importing and merging translations. For gettext translations it can also pull in updated template (pot) files automatically from github, I don't know if that's also possible with Android style translations.
Both Translatewiki and Transifex are 100% free and open source software.
I've been through the same "nothing good out there" phase, so I've started writing my own, as a symfony2 bundle. Maybe it's of use to you: https://github.com/tvogt/translator-bundle
Why? Because I couldn't get weblate or pootle to work, you probably have to be familiar with all the pip and python and ve and whatever stuff. Translatewiki is only for free software. Transifix is commercial.
In 2020, with GitHub Actions (hooks executed on GitHub side), you now have GitLocalize
GitLocalize is a continuous localization tool built for communities and teams that want to simplify their workflow when translating their content.
GitLocalize automatically keeps translations up to date by syncing with your repository.
That won't apply to the OP's project github.com/mixare/mixare, which was moved to GitLab in 2018.
But it can help other projects with a similar need.
You can have a look at Amanuens - it's able to sync with any Git repository, including Github. It's totally free for open-source projects (contact support for details). Disclaimer: it is my company's service.

Best practices for forking an Android application/project

An Android application that I am interested in (OpenSudoku) has become unmaintained by the original author, who last updated the application just under a year ago, in addition they have rejects offers of help from others to contribute directly to the hosted SVN repository.
I am interested enough in the project to seriously consider forking it (I am already familar with many arguments for and against forking in general), but I do have a couple of questions related to best practice with forking Android applications, specifically:
I understand that I will have to change the package name/namespace, is there an easy method I can use to do this (without breaking the Eclipse project files and associated references)?
Is there a way to help users that may want to migrate to the new application, recover settings/data from the original application? (My understanding is that the permissions model that Android enforces would make this impossible)?
Are there any other issues that I should be aware of that comes with forking an Android application that I would need to plan for?
AndroidManifest.xml, various build system files, layouts that use your own views, each Java source file, and the directory tree. That's what you have to change. I use vim -p glob glob glob for changes like this, and mv, which is easy enough.
Not unless the old application cooperates, which it likely doesn't. Perhaps your fork could detect an OpenSudoku install and prompt the user to install, off-market, an 'update' for it that just repackages its preferences for your consumption. I don't know if that works, updating a Market app with a non-market APK. Although, you said "settings/data". If 'data' includes e.g. sets of puzzles on the sdcard, yes, you can load that kind of data without any trouble -- FAT32 offers no security.

Categories

Resources