intermediates folder generated by Android Studio [closed] - android

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a fairly large viewpager app that I want to restyle to Material Design. I used Android Studio to create a brand new app that doesn't do anything other than demonstrate a working viewpager, tabs, and Material Design. The new app has a look that is exactly what I want.
Examining the new app I see that AS generated a boat load of useful resource code in the intermediates directory that enabled Material Design. So AS first generated the src/ code according to my choices in the "new project" process and then something in that code caused the build process to generate all of this useful Material Design support code.
For instance, the generated app has a styles xml that begins with...
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
If you ctrl-b on DarkActionBar it jumps to a huge file . . .
C:\Users\Gary\AndroidstudioProjects\MDShell\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.3.0\res\values\values.xml
that contains the definition. I want the build process to do that same generation for my app.
EDIT : This is the answer to my question...
Once I included the following two lines in the gradle, everything I needed got generated in my app
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'

I googled around for an hour or so but can find no documentation on how this directory gets built and included in the new project.
Everything in the build/ directory, such as build/intermediates/, is output of the build process.
I could probably copy it into my project
If "it" is build/intermediates/, please do not copy it. You are welcome to copy things from your src/ tree between projects, as well as values from your build.gradle file (e.g., dependencies).
Does anyone know where the docs regarding this might be?
There is no comprehensive set of documentation for what appears in build/, in part because depends on a dizzying array of environmental factors (what dependencies do you have? are you using JNI? are you employing annotation processors?).
Generally speaking, developers do not often look in build/.

Related

How to obfuscate a pre-built apk? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I'm a blogger and I've been publishing third party android apps and games on my website since a couple of years ago. There are some exclusive apps which I need to put some toast messages in them. I'm novice at this but my question is about something different. I just want to obfuscate a prebuilt APK app or just a particular string in the activity. There are so many articles or tutorial videos in the web in which people trying to teach this method by ProGuard in Android Studio. But I couldn't even find a single tutorial which explains How to add a prebuilt APK (NOT A NEW PROJECT) in Android Studio and obfuscate it. I tried to profile/debug an APK with Android Studio but I can not find the gradle.build to set the minifyEnable to true. I know this might be so stupid to ask, but can anyone help me with this? I just need to obfuscate a string (mostly my toast messages) or the whole classes of a Pre-built APK. Is there an easier way to do this or I have to do it by Android Studio? I would really appreciate if someone tell me how to do it in the easiest way possible. And do not consider me as a programmer or developer.
If you have an unobfuscated .apk file in a folder and want to obfuscate that, then you're out of luck.
Obfuscation works on a much lower level, and is done while the .apk file is being built from the source code.
And Proguard will not do anything at all to obfuscate your strings. Even if the .apk was obfuscated using Proguard, all strings and resources would still be in the .apk file and could easily be read by anyone with a bit of technical know-how.
Proguard obfuscates the code itself, not the resources (resources would be strings, numbers, images, etc)
There are some other methods of obfuscation (DexGuard and Arxan for examples), but those are much much harder to use, even for an experienced developer.
And you mention you want to add a toast message into a prebuilt .apk file? That requires extremely (and i do mean extremely) high knowledge of how the .apk is built, to dissamble it and rebuild it.

Beginner in Git, Starting from Android Studio [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm working in a project in Android Studio and up to now, I've copied my files in other directory to change my code for adding new improvements in my program.
And this way is very overwhelming for me.
But I heard that is a good idea use Git when developing, and I want to try it. But I have some questions:
My app is not published yet, should I use Git or other VCS?
How can I use Git from Android Studio?
Is there any risks to my app in development get messed while trying a VCS?
What is VCS and why should you use it?
There are many benefits of using a version control system for your projects.
Collaboration
Without a VCS in place, you're probably working together in a shared folder on the same set of files.It's extremely error-prone as sooner or later, someone will overwrite someone else's changes.
With a VCS, everybody on the team is able to work absolutely freely - on any file at any time. The VCS will later allow you to merge all the changes into a common version.
Storing Versions (Properly)
Saving a version of your project after making changes is an essential habit. But without a VCS, this becomes tedious and confusing very quickly:
Restoring Previous Versions
Being able to restore older versions of a file (or even the whole project) effectively means one thing: you can't mess up! If the changes you've made lately prove to be garbage, you can simply undo them in a few clicks. Knowing this should make you a lot more relaxed when working on important bits of a project.
Understanding What Happened
Every time you save a new version of your project, your VCS requires you to provide a short description of what was changed. Additionally (if it's a code / text file), you can see what exactly was changed in the file's content. This helps you understand how your project evolved between versions.
Backup
A side-effect of using a distributed VCS like Git is that it can act as a backup; every team member has a full-blown version of the project on his disk - including the project's complete history.
How to use GIT on Android Studio
Have a look here

Searching for a "PaintCode" for android [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Are there any vector drawing applications that generate native code for both iOS and Android? I'd like a tool for making UI Controls and Buttons for both iOS and Android (in Xamarin). I can make great dynamic objects with PaintCode for iOS, but then for the Android version I'd have to recreate it with some other tool for Android so I'm basically doing everything twice. I'd love to find a way to create some dynamic controls/buttons that can be used in both Xamarin iOS & Xamarin Android.
The new version of PaintCode (version 3, as of November 2016) now exports Android compatible code.
One common approach by many organisations (including mine) to deal with cross platform design is to use icon fonts.
The way it works is
create a SVG version of your icon/design
create a custom font with the svg/vector icon as a unicode character
The advantage:
It works with great many platforms, including android, ios, windows phone as well as the web.
icons are vector, hence scalable
the disadvantages:
icons cannot have gradients
icons cannot have multiple colors (can be solved by composing icon into multiple svg components and layering them in code)
I have a small project that might solve your problems:
https://github.com/almosr/android-svg-code-render
It is a tool that converts SVG files into Android drawing instructions and saves it as Java source file. Then you can simply call a method from this source with a Canvas parameter and the SVG content will be drawn directly to the Canvas.
It is massively faster than using an SVG file as input at runtime, because it doesn't need to parse the SVG file (which is an XML internally). Also eats up significantly less memory.
There are some limitations and drawbacks, though, so it might or might not be suitable to your needs. Especially interactions cannot be mapped in the output (yet).

Android Localization tool [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last month.
Improve this question
I have text resources in android, some are already translated whereas others are missing.
Is there a tool that can import e.g. the values xml file in addition to values xml file for Italian and checks what is missing and helps inserting the missing translations?
I tried OmegaT. This program imports the android resource and also writes into it. However, it did not show already translated stuff. Virtaal Translator does not support the xml files as input.
I would like to have a simple tool outside Eclipse, so that I may provide this tools to others helping to translate things.
I found POEditor.com to be the best and easiest to use for Android strings translation.
It supports Android XML strings import and I believe you can import your different files into the same translation and this will fill up your missing definitions.
The export will give you an XML with all your definitions together.
Oh, and it has also auto-translation or you can invite translators/friends to work with you only by inserting their email in that translation.
There is a project called Sequoyah. This is a special plugin for Eclipse. It does not allow you to translate automatically but you can easily see where and which translation values are missed. I've described it here.
Weblate is a an open source web-based tool by Michal Čihař which also supports Android and has a very tight Git integration.
I've been using this tool to translate several project and I also used it to translate Weblate itself, I've seen better in terms of translator friendliness but the overall experience was very good.
I just started writing this tool: https://github.com/BenoitDuffez/OAT/wiki/Gallery
It is aimed to be self-hosted, free; it supports CDATA, formatted="false", multiple xml files, and more.
Try Agama App Translator tool.
This is complete localization tool for Android with built-in google translator. It supports XML strings as well as menu XML files. You can easily add new language and let fill untranslated items with default (original) text or translate items as you need.
You should try Lokalise. There is a free plan, and you could upload almost any format from different platforms.
I've been using it myself, and there is virtually no other tool better for managing translations.

Plugins architecture for an Android app? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
THIS QUESTION HAS MOVED TO https://softwarerecs.stackexchange.com/questions/27841/plugins-architecture-for-an-android-app
I want to implement a plugin system for an Open Source app, because it has become really large, with many features that only a few users need. Releasing different apps is not a good solution, because userA wants feature7 and feature24 whilst userB wants feature39 and feature24.
Where can I find a good example of a plugin architecture?
Here is what I would like a plugin to be able to do:
Redefine the layout of a particular screen (load deflated XML?)
Redefine a method of a class (load dex class?, AOP?)
For instance, one of the plugins must add a button on a particular screen, and clicking this button increments a value in the app's database. This is not doable with Content Providers and Intents, as far as I know.
I want to avoid making the core app's code complex with tons of hooks everywhere.
The form of the plugin could be a file on the SD card, an app, or anything else.
I have done a framework that works like Robo-guice with some of its primary IoC functions. (Cut down on boilerplate codes that load views/service etc...)
But the core of which, I believe is the solution to your problem, is the ability to load separate APK "plugin" files, that includes "res" as well as <layouts>.xml files. The <layouts>.xml file can be independently inflated by the classes within that APK. That is, you can load a CustomView (that inflates its own <layout>.xml) into an originating/parent App. All this is done without the Parent App APK knowing how the UI was inflated in the plugin APK.
Example of what I mean:
I have a Mapping App, the framework will dynamically scan installed APK that matches the "contract" for a "add-on function" plugin, and loads the UI specific to it onto the App's View as a floating panel.
I would say a plugin framework for Android is do-able, as Android has most if not all of the necessary built in APIs to accomplish this.
These are your friends in this area of plugin development for Android:
PackageManager (Scan install packages, aka Plugins)
DexClassLoader (ClassNotFoundException will be a pain if you don't use the correct ClassLoader btw)
Java Reflection
Where can I find a good example of a plugin architecture?
Roman Nurik from Google has implemented a nice plugins framework in his open source app dash clock. The plugins themselves are Services that extend the DashClockExtension class in the API and are installed as completely independent APK files with their own resources. It's quite a lot of work defining the communication protocol via the AIDL, but it's nice and clean and works very well.
one of the plugins must add a button on a particular screen, and clicking this button increments a value in the app's database.
The parts of the main Layout which can be modified by the plugin will need to be pre-defined by the core app, and exposed via the communication protocol. It should be possible for the plugin to inflate an arbitrary layout, and send it to the main app, which could put that inside a pre-allocated area of it's own Layout.
If you are just going for an increase in modularity, I would recommend using a dependency injection container such as PicoContainer, Guice or Spring.
If you want a light-weight plug-in architecture, then go for Java Plugin Framework (JPF).
It allows you to define extension points, which can be implemented by your modules. The primary job of the plug-in framework is to provide a way that you can bundle these modules (as jars), which are dynamically found by the core application and given as implementations of the extension point.

Categories

Resources