想找到手機上安裝了甚麼apk : (get package-name)

adb shell pm list packages

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

 

我們可以開啟混淆用來混淆生成的java code防止他人反編譯你的程式碼

自動刪除沒有Resources文件 來達到給APK瘦身的目的

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

1.Declare intent name in Manifest file:

<action android:name="com.yourdomain.youapp.SETTING_UPDATE" />

2.Define intent name:

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

  //1 minute = 60 seconds
    //1 hour = 60 x 60 = 3600
    //1 day = 3600 x 24 = 86400
    public void printDifference(Date startDate, Date endDate){

        //milliseconds
        long different = endDate.getTime() - startDate.getTime();

        System.out.println("startDate : " + startDate);
        System.out.println("endDate : "+ endDate);
        System.out.println("different : " + different);

        long secondsInMilli = 1000;
        long minutesInMilli = secondsInMilli * 60;
        long hoursInMilli = minutesInMilli * 60;
        long daysInMilli = hoursInMilli * 24;

        long elapsedDays = different / daysInMilli;
        different = different % daysInMilli;

        long elapsedHours = different / hoursInMilli;
        different = different % hoursInMilli;

        long elapsedMinutes = different / minutesInMilli;
        different = different % minutesInMilli;

        long elapsedSeconds = different / secondsInMilli;

        System.out.printf(
            "%d days, %d hours, %d minutes, %d seconds%n", 
            elapsedDays,
            elapsedHours, elapsedMinutes, elapsedSeconds);

    }

out put is :

startDate : Thu Oct 10 11:30:10 SGT 2013
endDate : Sun Oct 13 20:35:55 SGT 2013
different : 291945000
3 days, 9 hours, 5 minutes, 45 seconds

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

List<MarkerCustom> myList=new ArrayList<MarkerCustom>();
MarkerCustom entry1=new MarkerCustom(myInt, myString, myBitmap);
MarkerCustom entry2=new MarkerCustom(myInt, myString, myBitmap);

myList.add(entry1);
myList.add(entry2);

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

 TextView TV = (TextView)findViewById(R.id.mytextview01);
 Spannable word = new SpannableString("Your message");        

 word.setSpan(new ForegroundColorSpan(Color.BLUE), 0, word.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

 TV.setText(word);
 Spannable wordTwo = new SpannableString("Your new message");        

 wordTwo.setSpan(new ForegroundColorSpan(Color.RED), 0, wordTwo.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
 TV.append(wordTwo);

 

BackgroundColorSpan => For background color!

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

  1. Open Terminal.

  2. If you haven't already done so, run this command:

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

AAR 是甚麼?

Android Archive (AAR) file that you can use as a dependency for an Android app module. Unlike JAR files, AAR files can contain Android resources and a manifest file, which allows you to bundle in shared resources like layouts and drawables in addition to Java classes and methods.

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

for file in apk/*; 
do 
./adb install $file; 
done

 

如果是找不到adb , 就先在Terminal打下面的code, 把android studio sdk 先加到PATH就可以了。

文章標籤

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

出行前準備

□辦理好籤證

lionlionchopper 發表在 痞客邦 PIXNET 留言(0) 人氣()

1 234
找更多相關文章與討論