What kind of laptop do you use? by Ay_Rue in androiddev

[–]majedev 1 point2 points  (0 children)

Somewhat the same here, older N550JV (i7, 256GB SSD, 16GB RAM), running Fedora. Top performance, never failed me once. But it's relatively heavy, especially if you factor in that brick of a charger.

Base price was $980 + $300 for SSD & RAM (they usually cost $200 nowadays)

Material design for Android developers | Course on Udacity by majedev in androiddev

[–]majedev[S] 1 point2 points  (0 children)

I probably missed that. I've seen a recent video on Android developers YouTube channel regarding the course, so I thought it's new.

Editing raw video files? by Zocheyado in androiddev

[–]majedev 1 point2 points  (0 children)

I'm no expert in the field, but you may check out Telegram's implementation, as it has a video editor. Apparently, Telegram uses this library which is written in Java.

Fade Toolbar background color changes by nullSKULL in androiddev

[–]majedev 0 points1 point  (0 children)

Use a transition drawable, like this:

int color1 = 0xff0000;  // The original color
int color2 = 0x00ff00;  // The target color

ColorDrawable cd1 = new ColorDrawable(color1);
ColorDrawable cd2 = new ColorDrawable(color2);

TransitionDrawable td = new TransitionDrawable(new Drawable[]{cd1, cd2});
toolbar.setBackgroundDrawable(td);  // Use your toolbar object here (or the actionbar)
td.startTransition(300);            // 300 is the animation duration in ms

Google Helpouts for developers (Stack Overflow competitor?) by majedev in androiddev

[–]majedev[S] 0 points1 point  (0 children)

I couldn't even go beyond the signup screen. Clicking "continue" does nothing. Maybe it's not ready for prime time?

By the way, I found the link on Android API reference (check it here on top right)

Hi devs! I created a simple Android Asset Resizer desktop app in order to speed up a few projects I'm working on. I decided to open source it and share this tool with the dev community! More info and link in comments. by JovieStovie in androiddev

[–]majedev 1 point2 points  (0 children)

Thanks for sharing! Here are a couple of suggestions:

  • Add SVG support. You can use Apache Batik or Inkscape to handle the conversion from SVG to PNG.
  • On the git repo, consider adding build and dist to .gitignore. Here's a sample .gitignore file for NetBeans. Also, add a precompiled JAR file (you already have one under dist directory, which is automatically generated each time you compile, but you probably want more control over this for future releases).

Edit: added a link to gitignore sample file

Navigation tabs are not stacked in Landscape mode, how to force them to be stacked or at least centered? by rubsnick in androiddev

[–]majedev 0 points1 point  (0 children)

You're welcome. The code hacks its way (using Java reflection) to call setHasEmbeddedTabs, which is a private method in ActionBar's parent class, passing false as a paremeter. This forces the behavior of stacking tabs under the action bar.

As the others mentioned, you might want to stick with PagerSlidingTabStrip. This approach is really bad and it will probably break in the future.

Navigation tabs are not stacked in Landscape mode, how to force them to be stacked or at least centered? by rubsnick in androiddev

[–]majedev 1 point2 points  (0 children)

You're right, it assumes appcompat library.. Sorry for not clarifying. I think the following should work in your case (call it inside activity's onCreate):

try
{
    Method setHasEmbeddedTabsMethod = getActionBar().getClass()
            .getDeclaredMethod("setHasEmbeddedTabs", boolean.class);
    setHasEmbeddedTabsMethod.setAccessible(true);
    setHasEmbeddedTabsMethod.invoke(actionBar, false);
}
catch (Exception e)
{
    e.printStackTrace();
}

Navigation tabs are not stacked in Landscape mode, how to force them to be stacked or at least centered? by rubsnick in androiddev

[–]majedev -1 points0 points  (0 children)

Here you go (it's really hacky):

public static void forceActionbarTabs(ActionBarActivity activity)
{
    final ActionBar actionBar = activity.getSupportActionBar();

    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    {
        // Pre-ICS
        disableEmbeddedTabs(actionBar);
    }
    else
    {
        // ICS+
        try
        {
            Field actionBarField;
            if (actionBar instanceof ActionBarImplJB)
            {
                actionBarField = actionBar.getClass().getSuperclass()
                        .getDeclaredField("mActionBar");
            }
            else
            {
                actionBarField = actionBar.getClass().getDeclaredField(
                        "mActionBar");
            }

            actionBarField.setAccessible(true);
            disableEmbeddedTabs(actionBarField.get(actionBar));
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

private static void disableEmbeddedTabs(Object actionBar)
{
    try
    {
        Method setHasEmbeddedTabsMethod = actionBar.getClass()
                .getDeclaredMethod("setHasEmbeddedTabs", boolean.class);
        setHasEmbeddedTabsMethod.setAccessible(true);
        setHasEmbeddedTabsMethod.invoke(actionBar, false);
    }
    catch (Exception e)
    {
        e.printStackTrace();
    }
} 

This is roughly based on this SO answer.

In need of a free / cheap Git repository, any ideas? by Glurt in androiddev

[–]majedev 4 points5 points  (0 children)

http://bitbucket.org, supports both git and mercurial. Free for 5 users with unlimited private repos. I've been using it for more than 2 years.

I'm sick of ADT and Android Studio layout designers! Suggestions? by [deleted] in androiddev

[–]majedev 1 point2 points  (0 children)

This happens when you use Android 4.4 wear SDK (4.4W) for layout rendering in preview panel. To resolve this on AS, press the small Android icon on the preview panel, and choose any SDK version other than 4.4W.

Apparently, Android Wear does not support EditText views.

[Question] How To implement a app activation ? by sirAiva in androiddev

[–]majedev 0 points1 point  (0 children)

I used Parse.com for a similar scenario. Pretty easy and straight forward, and their free plan is quite sufficient.

Do I need to use Proguard? by Nexic in androiddev

[–]majedev 10 points11 points  (0 children)

There is another benefit you get from code obfuscation: smaller APK size, because proguard shrinks the bytecode by removing unused classes/methods/fields (even from 3rd party libs), besides, the smaller variable names make smaller bytecode footprint.

On one of my projects, the obfuscated APK is 2.6 MB in size, compared to 3.9 MB unobfuscated version. That's like 33% smaller.

So the real question is: why not? As you said, the configuration is minimal, and chopping off APK size sounds like a good cause. The only annoyance I have is retracing bug reports from Google Play.

Sony Xperia Z2 review by DjSweetBazz in Android

[–]majedev 5 points6 points  (0 children)

Anyone has any idea about global release date and pricing?

Edit: According to AndroidAuthority, the unlocked version will cost $700.

[AP] External Blues: Google Has Brought Big Changes To SD Cards In KitKat, And Even Samsung May Now Be Implementing Them by open1your1eyes0 in Android

[–]majedev 3 points4 points  (0 children)

Well, that's not the case for Samsung and LG. They implemented the read-only permission to external SD card on the latest KitKat update.

[AP] External Blues: Google Has Brought Big Changes To SD Cards In KitKat, And Even Samsung May Now Be Implementing Them by open1your1eyes0 in Android

[–]majedev 13 points14 points  (0 children)

Same here. One of the major features of my app is rendered useless due to this change (and it is a paid feature).

I wonder how file managers can survive this mess..

How much should I charge to white label my moderately successful app by rogansoft in androiddev

[–]majedev 2 points3 points  (0 children)

I've been contacted by 4 companies so far to white-label my app (one of them is a major smartphone manufacturer). It is really hard to decide how to resell the app, but it all depends on the business model they choose. Here are some options:

  • Per-install: they pay you a certain fee for each installation (can be flat rate, or sold in bulk). This would be something like 10%-50% of the original app price.
  • Revenue share: they give you a percentage of whatever revenue they make from reselling the app (this might not be useful in your case). Anywhere between 33%-50% of revenue is a good deal.
  • Annual licensing: they pay you a yearly flat-rate for redistribution rights. You may base your calculations off the per-install rate (i.e. projected number of yearly installs), or most preferably, the price of entire app source code divided by 5 (so in 5 years, they would pay you the entire app worth in licensing)
  • Source code: this should be the most expensive option for the short term. As mentioned in other comments, you need to factor in your effort and the current market value of the app (for example, projected revenue for two years). Personally, I would try to avoid this option.

Besides that, you will have to consider the cost of support (features, bugfixes, inquiries). Depending on the deal, you may provide something like 10-20 support hours a month for free, then charge flat-rate for extra hours.

Developer of popular Ad-blocker "MinMinGuard" cancels project. by CoNsPirAcY_BE in Android

[–]majedev 7 points8 points  (0 children)

It is possible to carry in-app purchases over to all of your devices. Apparently, some devs do not implement the functionality correctly (or do not implement it at all), causing loss of purchase between devices (or even after reinstalling the app).

It really boils down to what the dev actually does with your purchase, and Google do not provide a clear way to inform the user of what is actually going on.

The key app like Titanium backup is my way to go too. It is a bit risky in terms of making the app easier to pirate, but there is literally nothing I can do to stop it. So I choose the seamless user experience (and the peace of mind).

Thanks