精华内容
下载资源
问答
  • 转自:... Android platform Androidis a software stack that includes an operating system, middleware and key applications. WhileGoogleis...

    转自:http://socialcompare.com/en/comparison/android-versions-comparison

    Android platform

    Android is a software stack that includes an operating system, middleware and key applications. While Google is the main actor which comes to mind, the Open Handset Alliance also collaborates on Android's development and release. The operating system is based on the Linux kernel, the specific versions depends on the platform version and is given in the comparison table below.

    Phones / Tablets / Smart watches / TV Player...

    The latest version of the platform is now Pie Android 9.

    Android 8 introduced an Android flavor for low-end devices the Go Edition. It aims devices with low RAM (1GB or less), slow internet connections and lower-end CPU. It comes with popular apps dedicated to this flavor: Gmail Go, Google Go, Maps Go...

    There was previously two flavors of the platform. One targeted for small screens mainly mobile phones (all versions below 3.0), and one dedicated for tablets: Honeycomb Android 3.0. However not all Android tablets support this version (some tablets use the Android 2.x).

    These two variants of the platform have been merged to a versatile and uniform platform since "Ice Cream Sandwich", which has been released in October 2011. It combines "Gingerbread" and "Honeycomb" versions in a cohesive platform for tablets and phones at the same time.

    Android 5.0 aka Lollipop target to be even more versatile to target also smart watches, TV player, Car media center... device with only 512 of RAM can support this new version.

    Note: The market share figures (Jul. 2018) are based on statistics using API level, so the percentage might gather several versions of the Android platform.

    Related comparisons:

    http://socialcompare.com/en/comparison/mobile-os-comparison-developer-view

    The following comparison chart lists the main differences between each version of the android platform using the changelog of each version. Do not hesitate to contribute or comment to make this comparison table as accurate as possible.

      Version name Key user features added Key developer features added Release date Android market share API Level
                 
    Android 9 Pie
    • User interface updates:
      • Rounded corners across the UI
      • Quick settings menu change.
      • Notification bar, the clock has moved to the left.
      • The "dock" now has a semi-transparent background.
      • New transitions when switching between apps, or within apps
      • Volume slider updated
    • Richer messaging notifications: with full conversation, large images, smart replies
    • The power options now has a "screenshot" button
    • Biometric authentication can now be disabled only once
      2018-08-09   28
    Android 8.1 Oreo
    • Show battery level in "Quick Settings" for devices connected via Bluetooth
    • Navigation buttons dim when not in use
    • UI updates to 'Power Off' and 'Restart'
    • Toast messages are now white in color with same existing transparency
    • Automatic light and dark themes
    • Emoji updates (ie: Hamburger move the cheese slice position)
    • Neural networks API for artificial intelligence
    • Shared memory API
    • WallpaperColors API
    • Programmatic Safe Browsing actions
    • Autofill framework updates
    • Go Edition: lightweight Android distribution for devices with less than 1 GB of RAM
    2017-12-05 2 % 27
    Android 8.0 Oreo
    • PIP: Picture-in-Picture with resizable windows
    • Android Instant apps
    • Improved notifications system
    • Improved system settings
    • Lock screen redesign
      2017-08-21 10.1 % 26
    Android 7.1.2 Nougat
    • Battery usage alerts
    • Nexus and Pixel specific improvements
      2017-04-04 9.6 % (7.1 - 7.1.2) 25
    Android 7.1.1 Nougat
    • Long press on the app icon enable new launch actions
    • The default keyboard allows now to send GIFs directly
    • New set of emojis
      2016-12-05 9.6 % (7.1 - 7.1.2) 25
    Android 7.1 Nougat
    • Daydream Virtual Reality mode
    • Night Light
    • Storage manager improvements
    • Performance improvements for Touch and Display managements
    • Option to enable fingerprint swipe down gesture
    • Seamless system updates
    • Shortcut manager APIs
    • Support Circular app icons
    • Keyboard image insertion
    • VR thread scheduling improvements
    • Enhanced wallpaper metadata
    • Multi-endpoint call support
    • Source type support for Visual Voicemail
    • Carrier config options to manage video telephony
    2016-10-04 9.6 % (7.1 - 7.1.2) 25
    Android 7.0 Nougat
    • Unicode 9.0 emoji
    • Better multitasking
    • Multi-window mode (PIP, Freeform window)
    • Seamless system updates (with dual system partition)
    • Better performance and code size thanks to new JIT Compiler
    • Sustained Performance Mode (SPM) API
    • Vulkan 3D rendering API
    • Daydream virtual reality platform
    2016-08-22 21.2 % 24
    Android 6.0.1 Marshmallow New emojis   2015-12-07 23.5 % (6 - 6.0.1) 23
    Android 6 Marshmallow
    • USB Type-C support
    • Fingerprint Authentication support
    • Better battery life with "deep sleep"
    • Permissions dashboard
    • Android Pay
    • MIDI support
    • Google Now improvements
    • Custom Chrome Tabs for better in app browser support
    • App Permissions management update
    2015-10-05 23.5 % (6 - 6.0.1) 23
    Android 5.1.1 Lollipop
    • Speed improvement
    • Bug fixes
      2015-04-21 16.2 % (5.1 - 5.1.1) 22
    Android 5.1 Lollipop
    • Multiple SIM cards support
    • Quick settings shortcuts to join Wi-Fi networks or control Bluetooth devices
    • Lock protection if lost or stolen
    • High Definition voice call
    • Stability and performance enhancements
      2015-03-09 16.2 % (5.1 - 5.1.1) 22
    Android 5.0.2 Lollipop
    • Performance improvements and bug fixes
      2014-12-19 4.2 % (5.0 - 5.0.2) 21
    Android 5.0.1 Lollipop
    • bug fixes, fix issues with video playback and password failures
      2014-12-02 4.2 % (5.0 - 5.0.2) 21
    Android 5.0 Lollipop
    • New design (Material design)
    • Speed improvement
    • Battery consumption improvement
    • Several new API
    • Tracking battery consumption app
    2014-10-17 4.2 % (5.0 - 5.0.2) 21
    Android 4.4.4 KitKat
    • Fix Heartbleed / OpenSSL vulnerability
      2014-06-23 9.1 % (4.4 - 4.4.4) 19
    Android 4.4.3 KitKat
    • Bug fixes
    • Enable Sprint Spark band 26 and band 41
      2014-04-14 9.1 % (4.4 - 4.4.4) 19
    Android 4.4.2 KitKat
    • Bug fixes
    • Security enhancements
      2013-12-09 9.1 % (4.4 - 4.4.4) 19
    Android 4.4.1 KitKat
    • Bug fixes
    • Enhance the camera on the Nexus 5
      2013-12-05 9.1 % (4.4 - 4.4.4) 19
    Android 4.4 KitKat
    • Screen recording
    • New Translucent system UI
    • Enhanced notification access
    • System-wide settings for closed captioning
    • Performance improvements
    • Public API for SMS management.
    • Improved memory usage
    • Security enhancements (SELinux enforcing mode, new cryptographic algorithms, VPN per user...)
    • NFC Host Card Emulation (for wireless payment, loyalty programs...)
    • Printing Framework
    • Storage Access Framework
    • Hardware Sensor Batching
    • Full-screen immersive mode
    • GLES2.0 SurfaceFlinger
    • Chromium WebView
    • Audio tunneling to DSP
    • Audio monitoring
    • Wi-Fi certified Miracast
    • New Bluetooth profile
    • IR Blasters API
    • Wi-Fi Tunneled Direct Link Setup (TDLS) support
    • Tools for analyzing memory use (procstats, on-device memory status and profiling)
    2013-10-31 9.1 % (4.4 - 4.4.4) 19
    Android 4.3 Jelly Bean
    • Dial pad auto-complete
    • Photo Sphere enhancements
    • Camera app UI updated
    • 4K resolution support
    • Ability to create restricted profiles for tablets
    • Hebrew and Arabic right-to-left (RTL) support
    • Bluetooth Low Energy (BLE) support
    • Bluetooth Audio/Video Remote Control Profile (AVRCP) 1.3 support
    • Security and performance enhancements
    • OpenGL for Embedded Systems 3.0 graphics support
    • Logging and analyzing enhancements
    • Wi-Fi scanning API
    • Improved DRM (digital rights management) API
    • VP8 encoding
    2013-07-24 0.5 % (4.3) 18
    Android 4.2.2 Jelly Bean
    • Allow toggling Wi-Fi and Bluetooth state in Quick Settings using long-press
    • Shows the percentage and estimated time remaining in the active download notifications
    • Wireless charging and low battery sounds changed
    • Gallery app updated for faster loading with new image transition
    • Performance enhancements and bug fixes (Bluetooth A2DP audio streaming fix...)
    • Secure USB debugging (allow debugging to authenticated computers only)
    2013-02-11 1.9 % (4.2 - 4.2.2) 17
    Android 4.2.1 Jelly Bean
    • Fix missing december bug in the People app
    • Add support for Bluetooth gamepads and joysticks HID devices
      2012-11-27 1.9 % (4.2 - 4.2.2) 17
    Android 4.2 Jelly Bean
    • Lockscreen widgets
    • 360 degree images with Photo Sphere
    • Gesture Typing, for faster typing
    • Wireless display with Miracast
    • Daydream to display information when idle or docked
    • Multi-user for tablets
    • vsync timing
    • Triple buffering
    • reduced touch latency
    • CPU input boost
    • Native RTL support - mirrors the display from manifest prop
    • External display support - Display Manager
    • Nested fragments
    • Renderscript Compute - run tasks on the GPU (supported devices)
    • Renderscript ScriptGroups, built-in intrinsics like blur,
    • FilterScript is a subset of Renderscript made for high performance image processing
    2012-11-13 1.9 % (4.2 - 4.2.2) 17
    Android 4.1.2 Jelly Bean
    • Enable Home screen rotation
    • Fix bugs and enhance performances
      2012-10-09 1.2 % (4.1 - 4.1.2) 16
    Android 4.1.1 Jelly Bean
    • Fix a bug on screen orientation
      2012-07-23 1.2 % (4.1 - 4.1.2) 16
    Android 4.1 Jelly Bean
    • Google Now ( http://youtu.be/pPqliPzHYyc )
    • Voice Search
    • Speed enhancements
    • Camera app improvements
    • Accessibility: gesture mode, enable braille external keyboards...
    • app stack navigation to define a parent activity in manifest for deep navigation
    • MediaActionSound class to make sounds like when a camera takes a photo
    • NFC supports large payloads over bluetooth
    • WIFI/WIFI-Direct service discovery
    • Large, detailed, multi-action notifications
    • Input manager allows you to query input devices
    2012-07-09 1.2 % (4.1 - 4.1.2) 16
    Android 4.0.4 Ice Cream Sandwich
    • stability improvements
    • better camera performance
    • smoother screen rotation
      2012-03-28 0.3 % (4.0.3 - 4.0.4) 15
    Android 4.0.3 Ice Cream Sandwich
    • Social stream API in Contacts provider to show updates associated to your contacts
    • Video stabilization and QVGA video resolution API access
    • Accessibility API refinements for screen readers
    • Calendar provider updates
      2011-12-16 0.3 % (4.0.3 - 4.0.4) 15
    Android 4.0.2 Ice Cream Sandwich Minor fixes   2011-11-28 0 % 14
    Android 4.0.1 Ice Cream Sandwich
    • Facial recognition (Face Unlock)
    • UI use Hardware acceleration
    • Better voice recognition (dictating/Voice typing)
    • Web browser, allows up to 16 tabs
    • Updated launcher (customizable)
    • Android Beam app to exchange data through NFC
      2011-10-19 0 % 14
    Android 4.0 Ice Cream Sandwich
    • New lock screen actions
    • Improved text input and spell-checking
    • Control over network data
    • Email app supports EAS v14
    • WI-FI direct
    • BlueTooth Health Device Profile
    • Low-level streaming multimedia (Khronos OpenMAX AL
    • Grid Layout
    • Spell checking service
    • Address Space Layout Randomization
    • VPN client API
    • Remote Device camera enable/disable
    • ZSL exposure, continuous focus, and image zoom
    • Flags to help control system ui elements like system bar from apps
    2011-10-18 0 % 14
    Android 3.2.6 Honeycomb Minor fixes   2012-02-15 0 % 13
    Android 3.2.4 Honeycomb Added "Pay as you go" for tablets   2011-12-15 0 % 13
    Android 3.2.2 Honeycomb Minor fixes   2011-09-30 0 % 13
    Android 3.2.1 Honeycomb
    • Android Market updates including easier automatic updates
    • Google Books updates
    • Wi-Fi improvements
    • Chinese handwriting prediction improved
      2011-09-20 0 % 13
    Android 3.2 Honeycomb
    • Optimizations for a wider range of tablets
    • Compatibility display mode (zoom for fixed-sized apps)
    • Media sync from SD card
    • Extended API for managing screens support
      • New resource qualifiers for screens support
      • New manifest attributes for screen-size compatibility
      • Screen compatibility mode which allows for phone apps to appear as if they were still on a phone
    2011-07-15 0 % 13
    Android 3.1 Honeycomb
    • UI improvements
    • Open Accessory API
    • USB host API
    • Mice, joysticks, gamepads... support
    • Resizable Home screen widgets
    • MTP notifications
    • RTP API for audio
      2011-05-10 0 % 12
    Android 3.0 Honeycomb
    • Multi core support
    • Better tablet support
    • Updated 3D UI
      • customizable homescreens
      • recent applications viewing
      • redone keyboard layout
    • Media/Picture transport protocol
    • Google Talk video chat
    • Google eBooks
    • "Private browsing"
    • System-wide Clipboard
    • HTTP Live streaming
    • contextual action bar
    • Fragments first introduced(support library now supports it as well)
    • Hardware-accelerated 2D graphics
    • Renderscript 3D graphics engine
    • Pluggable DRM framework
    • device administration
    • High performance Animation Framework
    • RTP streaming API
    • Forced rendering of layers
    • High performance WIFI lock
    • Vew network traffic stats
    • ADTS AAC and FLAC audio
    • LRU cache
    2011-02-22 0 % 11
    Android 2.3.7 Gingerbread
    • Google Wallet support for the Nexus S 4G
      2011-09-21 0.2 % (2.3.3 - 2.3.7) 10
    Android 2.3.6 Gingerbread
    • Voice search issue fixed
      2011-09-02 0.2 % (2.3.3 - 2.3.7) 10
    Android 2.3.5 Gingerbread
    • Improved network performance for the Nexus S 4G
    • Fixed Bluetooth issues on the Samsung Galaxy S
    • Gmail app. improvements
      2011-07-25 0.2 % (2.3.3 - 2.3.7) 10
    Android 2.3.4 Gingerbread
    • Voice or video chat using Google Talk
    • Open Accessory API
    2011-05-10 0.2 % (2.3.3 - 2.3.7) 10
    Android 2.3.3 Gingerbread  
    • NFC API improvements (peer to peer communication...)
    • added unsecure bluetooth sockets
    2011-02-09 0.2 % (2.3.3 - 2.3.7) 10
    Android 2.3 Gingerbread
    • Updated UI
    • Improved keyboard ease of use
    • Improved copy/paste
    • Improved power management
    • Social networking features
    • Near Field Communication support
    • Native VoIP/SIP support
    • Video call support
    • performance - concurrent garbage collection, faster event distribution, updated video drivers
    • NDK - Native Asset Manager, Native Activities + event handling, khronos api
    • audio effects api
    • VP8, WebM, AAC, AMR wideband
    • Multiple camera sensor support
    • strictmode debugging
    • media framework replaces OpenCore
    2010-12-06 0 % (2.3 - 2.3.2) 9
    Android 2.2 Froyo
    • Speed improvements
    • JIT implementation
    • USB Tethering
    • Applications installation to the expandable memory
    • Upload file support in the browser
    • Animated GIFs
      2010-05-20 0 % 8
    Android 2.1 Eclair
    • Updated UI
      2010-01-12 0 % 7
    Android 2.0.1 Eclair     2009-12-03 0 % 6
    Android 2.0 Eclair
    • HTML
    • Digital zoom
    • Microsoft Exchange support
    • Bluetooth 2.1
    • Live Wallpapers
    • Updated UI
      2009-10-26 0 % 5
    Android 1.6 Donut
    • Gesture framework
    • Turn-by-turn navigation
      2009-09-15 0 % 4
    Android 1.5 Cupcake
    • Bluetooth A2DP, AVRCP support
    • Soft-keyboard with text-prediction
    • Record/watch videos
      2009-04-30 0 % 3
    Android 1.1 Banana bread
    • "Show" & "Hide" numeric keyboard, in caller application
    • Ability to save MMS attachments
      2009-02-09 0 % 2
    Android 1.0 Apple pie
    • Download and updates via Android Market
    • Web Browser
    • Camera support
    • Gmail, Contacts and Google Agenda synchronization
    • Google Maps
    • YouTube application
      2008-09-23 0 % 1
    Android 0.9       2008-08-22 0 %
    展开全文
  • mrp冒泡社区安卓版本

    2014-01-04 18:03:40
    一款民间开发的斯凯mrp模拟器,能够在安卓系统手机上比较完美的运行斯凯MRP软件,是不是很怀念国产手机的时候。
  • 安卓版本兼容解决

    2015-04-23 11:17:58
    例:在低于API 15中使用acionbar是直接崩溃,需要加入版本兼容检测: 1、首先检查设备的编译版本 ...版本的常量进行比较。 (版本号清单可参考网页http://developer.android.com/reference/android/ os/B
         
     
    例:在低于API 15中使用acionbar是直接崩溃,需要加入版本兼容检测:
    1、首先检查设备的编译版本


    Build.VERSION.SDK_INT常量代表了Android设备的版本号。可将该常量同代表Honeycomb
    版本的常量进行比较。 (版本号清单可参考网页http://developer.android.com/reference/android/
    os/Build.VERSION_CODES.html。 )
    现在 ActionBar 代码只有在Honeycomb或更高版本的设备上运行应用才会被调用。但是程序运行依旧会崩溃
    2、禁止Lint提示兼容性问题
    很不幸,尽管我们已经处理了兼容性问题,但Android Lint却无从知晓,所以必须明令禁止
    其再提示兼容性问题。如代码所示,在 onCreate(Bundle) 实现方法前添加如下注解。



     
         
    展开全文
  • 安卓版本更新的逻辑

    2016-09-19 18:01:11
    对于安卓版本更新,相信很多人都不会陌生,它主要包括强制更新和正常提示更新,现在就对于这方面我做一个简单的小结,希望对大家有用!!! 1. 首先版本更新的操作需要在进入主页面前执行,就是说最好不在主页面执行,才能...

    对于安卓的版本更新,相信很多人都不会陌生,它主要包括强制更新和正常提示更新,现在就对于这方面我做一个简单的小结,希望对大家有用!!!

    1. 首先版本更新的操作需要在进入主页面前执行,就是说最好不在主页面执行,才能显得正常,这个页面一般就是我们说的欢迎页面WelcomeActivity

    2. 通过获取服务器端的versioncode和本地获取的eversioncode进行比较,如果服务器code>本地code,说明已经出现了新的版本,再判断服务器返回的另外一个字段foce的值判断是否需要强制更新!

    <pre style="font-family: 宋体; font-size: 11.3pt; background-color: rgb(255, 255, 255);">
    

    这个是进入欢迎页执行网络请求: 
     UpDateVersion updatever;
    
    
      updatever = new UpDateVersion(StartActivity.this);
            updatever.setNewVersionListener(new UpDateVersion.NewVersionListener() {
                @Override
                public void onNewVersion() {
                    myHandler.removeCallbacksAndMessages(null);
                }
            });
            updatever.setUpdateCancelListener(new UpDateVersion.UpdateCancelListener() {
                @Override
                public void onUpdateCancel() {
                    startMain();
                }
            });
            Runnable runnable=new Runnable() {
    
                @Override
                public void run() {
                    // TODO Auto-generated method stub
                    updatever.update();
                }
            };

    这个是执行网络请求和更新处理逻辑,里面用到了自自定义监听器和okhttp

    <pre name="code" class="java">package com.joytouch.superlive.widget.updateVersion;
    
    import android.app.Activity;
    import android.app.Dialog;
    import android.content.Context;
    import android.content.DialogInterface;
    import android.content.SharedPreferences;
    import android.text.TextUtils;
    import android.util.Log;
    import android.view.MotionEvent;
    import android.view.View;
    import android.widget.Button;
    import android.widget.TextView;
    
    import com.google.gson.Gson;
    import com.joytouch.superlive.R;
    import com.joytouch.superlive.app.Preference;
    import com.joytouch.superlive.javabean.SoftwareUpdate;
    import com.joytouch.superlive.utils.HttpRequestUtils;
    import com.joytouch.superlive.utils.MD5Util;
    import com.joytouch.superlive.utils.PackageUtils;
    import com.joytouch.superlive.utils.city.File_Util;
    import com.joytouch.superlive.utils.view.DownLoadApkTask;
    
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.HashMap;
    
    import okhttp3.FormBody;
    
    /**
     * Created by Administrator on 5/11 0011.
     */
    public class UpDateVersion {
        private final SharedPreferences sp;
        /**
         flag
         普通升级--[1]--杀进程重启后有提示(暂不升级,立刻升级),点击返回键,不退出app,不做页面跳转;
         中级升级--[2]--杀进程重启,挂起后再启动提示(暂不升级,立刻升级),点击返回键,不退出app,不做页面跳转;
         强制升级--[3]--任何方式进入app,提示升级(立刻升级);点击返回键,直接退出;
         */
        private   Context context;
        private String flag="0";//默认普通升级
        private NewVersionListener newVersionListener_;
        private UpdateCancelListener updateCancelListener_;
        private boolean isUpdate=false;
    
        public UpDateVersion(Context context) {
            this.context=context;
            sp = context.getSharedPreferences(Preference.preference,
                    Context.MODE_PRIVATE);
        }
    
    
    
        public void update(){
            String channel_b = PackageUtils.getSource(context);
            String codeVer_b = String.valueOf(PackageUtils.getVersionCode(context));
            String softname_b = Preference.softname;
            String ver_b = PackageUtils.getVersionName(context);
    
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("channel", channel_b);
            map.put("codeVer", codeVer_b);
            map.put("softname", softname_b);
            map.put("ver", ver_b);
            map.put("version", Preference.version);
            String sign = getMD5(map);
    
            FormBody.Builder build=new FormBody.Builder();
            build
                    .add("channel", channel_b)
                    .add("codeVer", codeVer_b)
                    .add("softname", softname_b)
                    .add("ver", ver_b)
                    .add("version", Preference.version)
                    .add("sign", sign)
                    .build();
            new HttpRequestUtils((Activity) context).httpPost(Preference.update_url, build,
                    new HttpRequestUtils.ResRultListener() {
                        @Override
                        public void onFailure(IOException e) {
                            //获取网络数据失败会跳转到主页面
    //                        Intent intent=new Intent(context, MainActivity.class);
    //                        context.startActivity(intent);
                        }
    
                        @Override
                        public void onSuccess(String json) {
                            Log.e("版本更新", json);
                            String json_ = File_Util.readAssets(context, "banben.json");
                            Gson gson = new Gson();
                            SoftwareUpdate Bean = gson.fromJson(json, SoftwareUpdate.class);
    
                                //本版本
                                int version_code = PackageUtils.getVersionCode(context);
                                int newVersion = 0;
    
                                String ver = Bean.ver;
                                String updateDescription = Bean.updateDescription;
                                String downloadUrl = Bean.downloadUrl;
                                String codeVer = Bean.codeVer;
                                int force = Bean.force;
    
                                if (!TextUtils.isEmpty(codeVer)) {
                                    newVersion = Integer.parseInt(codeVer);
                                }
    //                            当本地的versioncode小于服务器传来的newVersion时,并且force>0,才会提示更新
                                if (version_code < newVersion) {
                                    //后台数据force,force>1升级
                                    if (force >0) {
                                        if (newVersionListener_ != null) {
                                            newVersionListener_.onNewVersion();
                                        }
                                        setUpdate(Bean);
                                    } else {
                                        updateCancelListener_.onUpdateCancel();
                                    }
                                    //本地保存一个forcr_,用于判定是哪种类型的更新
                                    sp.edit().putInt("updateversion",force).commit();
                                }else{
                                    //force_==4,表示不属于任何一种更新
                                    sp.edit().putInt("updateversion",4).commit();
                                    updateCancelListener_.onUpdateCancel();
    //                                ((Activity) context).finish();
                                }
                        }
                    });
        }
    
        private static Dialog dialog;
    
        private void setUpdate(final SoftwareUpdate bean) {
            dialog = new Dialog(context, R.style.Dialog_bocop);
            dialog.setContentView(R.layout.updateversiondialog);
            dialog.setCanceledOnTouchOutside(false);// 设置点击屏幕Dialog不消失dialog
            dialog.setCancelable(false);
            TextView tvtv=(TextView)dialog.findViewById(R.id.tvtv);
            tvtv.setOnTouchListener(new View.OnTouchListener() {
                @Override
                public boolean onTouch(View v, MotionEvent event) {
                    return true;
                }
            });
            TextView tv_title = (TextView) dialog.findViewById(R.id.tv_title);
            TextView tv_content = (TextView) dialog.findViewById(R.id.tv_content);
            tv_content.setVisibility(View.VISIBLE);
            tv_title.setText("升级提示");
            tv_content.setText(bean.updateDescription);
    
            Button btn_cancel = (Button) dialog.findViewById(R.id.btn_cancel);
            Button btn_submit = (Button) dialog.findViewById(R.id.btn_submit);
    
            //强制升级,force=3;
            //中等升级,force=2;
            //普通升级:force=1;
            //不升级,force=0;没有提示,>0都有提示
            if ("3".equals(bean.force+"")) {
                btn_cancel.setVisibility(View.GONE);
            }
            btn_cancel.setText("暂不更新");
            btn_submit.setText("立刻下载");
    
            btn_cancel.setOnClickListener(new View.OnClickListener() {
    
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    dialog.dismiss();
                }
            });
            btn_submit.setOnClickListener(new View.OnClickListener() {
    
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    isUpdate = true;
                    new DownLoadApkTask((Activity) context, "update.apk", bean.downloadUrl).execute();
                    dialog.dismiss();
                }
            });
    
            dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
                @Override
                public void onDismiss(DialogInterface dialog) {
                    // TODO Auto-generated method stub
                    if (!isUpdate &&updateCancelListener_ != null) {
                        if ("3".equals(bean.force+"")) {
                            //强制,后台挂起与杀进程都会提示,且退出程序
                            System.exit(0);
                        }else if ("2".equals(bean.force+"")){
                            updateCancelListener_.onUpdateCancel();
                            //中等更新,杀进程,后台挂起都会提示
    
                        }else if ("1".equals(bean.force+"")){
                            updateCancelListener_.onUpdateCancel();
                            //普通更新,只有杀进程才会提示
    
                        }else{
                            updateCancelListener_.onUpdateCancel();
                        }
    
                    }
                }
            });
    
            dialog.setCanceledOnTouchOutside(true);
            dialog.show();
    
        }
        private static String getMD5(HashMap<String, String> map) {
    
            ArrayList<String> keyList = new ArrayList<String>();
            for (String key : map.keySet()) {
                keyList.add(key);
            }
            Collections.sort(keyList);
    
            StringBuffer buffer = new StringBuffer();
            buffer.append(Preference.key_f);
            for (String key : keyList) {
                buffer.append(map.get(key));
            }
            buffer.append(Preference.key_b);
            return MD5Util.md5(buffer.toString());
        }
    
    
        public void cancel() {
    
        }
    
        public interface NewVersionListener {
            public void onNewVersion();
        }
    
        public interface UpdateCancelListener {
            public void onUpdateCancel();
        }
    
        public void setNewVersionListener(NewVersionListener newVersionListener) {
            newVersionListener_ = newVersionListener;
        }
        public void setUpdateCancelListener(UpdateCancelListener updateCancelListener) {
            updateCancelListener_ = updateCancelListener;
        }
    
    
    }
    

    
    okhttp网络请求工具类
    

    package com.joytouch.superlive.utils;
    
    import android.app.Activity;
    import android.view.View;
    import android.view.animation.Animation;
    import android.view.animation.LinearInterpolator;
    import android.view.animation.RotateAnimation;
    import android.widget.ImageView;
    import android.widget.LinearLayout;
    
    import com.joytouch.superlive.R;
    
    import java.io.File;
    import java.io.IOException;
    import java.util.concurrent.TimeUnit;
    
    import okhttp3.Call;
    import okhttp3.Callback;
    import okhttp3.FormBody;
    import okhttp3.MediaType;
    import okhttp3.MultipartBody;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.RequestBody;
    import okhttp3.Response;
    
    /**
     * Created by yj on 2016/4/22.
     * 使用方式:
         FormBody.Builder build=new FormBody.Builder();
         build.add("token", "AFAF2806-5AE1-3D90-4C18-0050AF2DE2D")
         .add("phone", "1")
         .add("content", "helougewei")
         .add("version", "4")
         .add("zb_id", "41622")
         .add("show_type", "chat")
         .build();
          new HttpRequestUtils(ChargeActivity.this).httpPost("http://www.qiuwin.com/I/v1.php/SuperLive4/ChatClient.json", build,
          new HttpRequestUtils.ResRultListener() {
            @Override
            public void onFailure(IOException e) {}
            @Override
            public void onSuccess(String json) {
            Gson gson = new Gson();
            BaseBean  bean = gson.fromJson(json, BaseBean.class);
            Log.e("测试",bean.message);}
            });
     * okhttp请求封装累
     */
    public class HttpRequestUtils {
        private OkHttpClient httpClient;
        private Call call;
        private Activity activity;
        private long timeout = 10;
        private LinearLayout loadingfailed;
        private LinearLayout refreshll;
        private ImageView refresh;
        private View view;
        private boolean isloading = false;
        private String type;
        public HttpRequestUtils(Activity activity,View view,boolean isup) {
            //创建okhttp对象
            httpClient = new OkHttpClient();
            httpClient.newBuilder().connectTimeout(timeout, TimeUnit.SECONDS)
            .readTimeout(timeout,TimeUnit.SECONDS)
            .writeTimeout(timeout, TimeUnit.SECONDS);
            this.view = view;
            this.activity = activity;
            if(!isup) {
                loadingfailed = (LinearLayout) view.findViewById(R.id.loading_failed);
                refreshll = (LinearLayout) view.findViewById(R.id.refreshll);
                refresh = (ImageView) view.findViewById(R.id.refresh_logo);
                isloading = true;
            }else{
                isloading = false;
            }
    
    
        }
        public HttpRequestUtils(Activity activity) {
            //创建okhttp对象
            httpClient = new OkHttpClient();
            httpClient.newBuilder().connectTimeout(timeout, TimeUnit.SECONDS)
                    .readTimeout(timeout, TimeUnit.SECONDS)
                    .writeTimeout(timeout, TimeUnit.SECONDS);
            this.activity = activity;
            isloading = false;
        }
        //取消请求
        private void cancel(){
            if(call!= null){
                call.cancel();
            }
        }
        //get请求
        public void httpGet(String url, final ResRultListener resRultListener){
            //创建一个请求
            final Request request = new Request.Builder().url(url).build();
            //创建一个呼叫请求
            call = httpClient.newCall(request);
            //创建一个异步请求
            call.enqueue(new Callback() {
                @Override
                public void onFailure(Call call, IOException e) {
                    if(resRultListener !=null){
                        resRultListener.onFailure(e);
                    }
                }
    
                @Override
                public void onResponse(Call call, Response response) throws IOException {
                    final String json = response.body().string();
                    activity.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            if (resRultListener != null) {
                                resRultListener.onSuccess(json);
                            }
                        }
                    });
    
    
                }
            });
        }
        //post的请求
        public void httpPost(final String url , final FormBody.Builder builder,final ResRultListener resRultListener){
    
            RequestBody body = builder.build();
            Request request = new Request.Builder()
                    .url(url).post(body).build();
            String bodycontent = "";
            int length = builder.build().size();
            if(LogUtils.isOpen()) {
                for (int i = 0; i < length; i++) {
                    bodycontent = bodycontent + builder.build().encodedName(i) + "=" + builder.build().encodedValue(i)+"&";
                }
            }
            LogUtils.e("builder", bodycontent);
            if(isloading) {
                loading();
            }
            //创建一个呼叫请求
            call = httpClient.newCall(request);
            //创建一个异步请求
            call.enqueue(new Callback() {
                @Override
                public void onFailure(Call call, final IOException e) {
    
                    activity.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            if(resRultListener !=null){
    
                                resRultListener.onFailure(e);
                                if(isloading) {
                                    loadingFailed(url,builder,resRultListener);
                                }
    //                            LogUtils.e("exception", e.getMessage());
                            }
                        }
                    });
                }
    
                @Override
                public void onResponse(Call call, Response response) throws IOException {
                    final String json = response.body().string();
                    LogUtils.e("json",json);
                    activity.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            if (resRultListener != null) {
                                if(isloading) {
                                    loadinSuccess();
                                }
                                resRultListener.onSuccess(json);
                            }
                        }
                    });
    
    
                }
            });
    
        }
    
        //post的请求上传单张图片
        public void httpPostImage(String url ,String filekey,String filePath,String imageName,final ResRultListener resRultListener){
            File file = new File(filePath);
            MultipartBody.Builder builder = new MultipartBody.Builder();
            builder.setType(MultipartBody.FORM);
            builder.addFormDataPart(filekey, imageName, RequestBody.create(MediaType.parse("image/png"), file));
            Request request = new Request.Builder()
                    .url(url).post(builder.build()).build();
            //创建一个呼叫请求
            call = httpClient.newCall(request);
            //创建一个异步请求
            call.enqueue(new Callback() {
                @Override
                public void onFailure(Call call, final IOException e) {
                    activity.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            if (resRultListener != null) {
                                resRultListener.onFailure(e);
    
                            }
                        }
                    });
    
                }
    
                @Override
                public void onResponse(Call call, Response response) throws IOException {
                    final String json = response.body().string();
                    activity.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            if (resRultListener != null) {
    
                                resRultListener.onSuccess(json);
                            }
                        }
                    });
    
    
                }
            });
    
        }
    //请求结果回调
    public interface ResRultListener{
        void onFailure(IOException e);
       void onSuccess(String json);
    }
        public  void loading(){
            if(this.view == null){
                LogUtils.e("sssssssssssss","///");
            }
            view.setVisibility(View.VISIBLE);
            loadingfailed.setVisibility(View.GONE);
            refreshll.setVisibility(View.VISIBLE);
            RotateAnimation an = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
            an.setInterpolator(new LinearInterpolator());//不停顿
            an.setRepeatCount(-1);//重复次数
            an.setFillAfter(true);//停在最后
            an.setDuration(600);
            refresh.startAnimation(an);
    
        }
        public void loadingFailed(final String url , final FormBody.Builder builder,final ResRultListener resRultListener){
            loadingfailed.setVisibility(View.VISIBLE);
            refreshll.setVisibility(View.GONE);
            refresh.clearAnimation();
            loadingfailed.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    LogUtils.e("loadingfailed", url);
                    httpPost(url, builder, resRultListener);
                }
            });
    
        }
        public void loadinSuccess(){
            refresh.clearAnimation();
            view.setVisibility(View.GONE);
            loadingfailed.setVisibility(View.GONE);
        }
    
    }
    

    在使用Android studio时需要的build.gradle文件

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.github.ctiao:DanmakuFlameMaster:0.4.6'
        compile files('libsbammsdk.jar')
        compile files('libs/universal-image-loader-1.9.4-SNAPSHOT.jar')
        compile files('libstpmime-4.1.3.jar')
        compile files('libs/gson-2.2.1.jar')
        compile files('libs/jpush-android-2.1.0.jar')
        compile files('libs/mta-sdk-1.6.2.jar')
        compile files('libs/open_sdk_r5509.jar')
        compile files('libs/SocialSDK_QQZone_3.jar')
        compile files('libs/SocialSDK_tencentWB_1.jar')
        compile files('libs/SocialSDK_WeiXin_2.jar')
        compile files('libs/wkimageloader.jar')
        compile 'com.umeng.analytics:analytics:latest.integration'
        compile 'com.squareup.okhttp3:okhttp:3.2.0'
        compile 'com.android.support:support-v4:22.2.1'
        compile 'com.zhy:flowlayout-lib:1.0.1'
        compile 'com.qiniu:happy-dns:0.2.7'
        //主播特点标签
        compile 'com.android.support:recyclerview-v7:24.0.0-alpha1'
        compile 'com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE'
        compile 'com.flyco.dialog:FlycoDialog_Lib:1.1.0@aar'
        compile 'com.flyco.animation:FlycoAnimation_Lib:1.0.0@aar'
        compile 'com.nineoldandroids:library:2.4.0'
        compile files('libshttpserver-0.1.2.jar')
        compile files('libshttputils-1.4.0.jar')
        compile files('libsio-1.6.0.jar')
        compile files('libstils3.1.8.jar')
        compile files('libs/SocialSDK_tencentWB_2.jar')
        compile files('libs/commons-codec-1.4.jar')
        compile files('libs/pldroid-player-1.2.2.jar')
        compile files('libs/alipaySDK-20150610.jar')
        compile files('libs/commons-codec-1.4.jar')
        compile files('libs/pldroid-player-1.2.2.jar')
        compile files('libs/support-v13-13.0.0.jar')
        compile files('libs/pldroid-camera-streaming-1.7.1.jar')
        compile files('libs/armeabi/BaiduNaviSDK_3.2.0.jar')
        compile files('libs/armeabi/httpmime-4.1.2.jar')
        compile files('libs/BaiduNaviSDK_3.2.0.jar')
    }



    展开全文
  • 这里主要剖析下自动版的,这里仅介绍安卓版本。 整体的结构 脚本的整体结构还是比较简洁的,如下图所示。 手机连接PC,PC通过adb命令对手机游戏界面进行截图; PC通过adb命令将该截图拷贝回PC; PC端通过python...
  • 由于想要在任意时刻都能snap到第一个子View,所以在LayoutManager中用了比较讨巧的方法去设定scroll的最大值。 使用方法 gradle引入compile 'com.stone.vega.library:VegaLayoutManager:1.0.6' java文件中设定Layo
  • 今天刷的时候,手动选择安装包的时候,提示我 验证失败 当前版本与卡刷包的安卓版本不一致于是上MIUI论坛找,上面的人都说,是什么系统版本不一样云云,但是我之前在同一个手机上是成功刷过的,而且也找不到低版本...

    最近公司手机需要刷root,于是选择了小米来做这个设备(比较小米对开发者还是很友好的)

    之前刷过几台,卡刷。

    今天刷的时候,手动选择安装包的时候,提示我 验证失败 当前版本与卡刷包的安卓版本不一致

    于是上MIUI论坛找,上面的人都说,是什么系统版本不一样云云,但是我之前在同一个手机上是成功刷过的,而且也找不到低版本的开发版的包了,于是我就在思索。

    突然看到一个不起眼的话,就是,一个开发包只能使用一次,使用过就不能再使用了

    我用的电脑是Mac,每次下载完后会自动解压,虽然刚刚解压我就关闭了,不过也是打开了,然后用adb把包导入手机。

    于是,我就用手机上官网下,再重复卡刷的流程,就可以刷机了。

    在网上没有看到这个方法,因此写下这个文章,希望能对你们产生帮助。


    关键点:一个刷机包只能使用一次,一旦解压,就不可再继续使用  ,直接手机上官网下载即可。

    展开全文
  • Android 内部更新 各安卓版本适配 一:前言 在国内,app在线更新是一个必须要求。新版本发布时。用户进入我们的app,就会弹出更新提示框; 二:开发 在线更新分为以下几个步骤: 1:通过接口获取线上版本号 ...
  • 从低版本到高版本安卓更新文件位置修改部分!
  • <div><p>node_modules可能会被删除,导致配置失效 我不懂安卓开发 是否有方法放在ios类似AppDelegate中 这样似乎比较好</p><p>该提问来源于开源项目:jpush/jpush-react-native</p></div>
  • 安卓版本更新

    2017-12-28 09:09:05
    第二步,通过接口拿到的版本号和本地的版本号进行比较,如果拿到的版本号比本地的版本号大,那就进行版本升级 第三步,版本升级分为三种情况: 1、非wifi情况下,弹出版本更新提示框,用户点击“立即升级”按钮...
  • 安卓学习

    2020-08-02 11:07:52
    由于之前下载的安卓版本比较老,系统打开一直就提示Update,于是开启了菜鸟的更新之路。 在官网下载了最新的版本,安装,删除了原来的版本,SDK版本。。。。 然后开始运行了第一行代码 “Hello World!” 成功!!...
  • 瑞星小狮子只添加了个别的动画,不是全部的,素材全是帧动画,实现使用服务实现的,现在实现的是入场,出场,双击动画,再就是随机动画现在只添加了3个动画,其余没时间。代码写的比较烂勿喷!
  • 安卓网络框架比较

    2018-10-30 15:11:09
    目前网络请求框架也比较多,本文针对封装的比较完善的Volley,Okhttp,Retrofit研究比较了,才知道选择哪个最适合。基础HttpUrlConnection,android-async-http,httpclient(高版本废弃),xUtils3(作用广泛而不精),不...
  • 安卓6.0版本下悬浮窗实现

    千次阅读 2017-03-20 15:04:13
    悬浮窗在安卓中实现起来还是比较容易的,这几天在网上温习了相关资料,运行在我安卓6.0手机上才发现,原来在6.0手机上不是行的。 第一反应肯定是权限相关问题,做了相关处理后,果然让悬浮窗原形毕露了。直接贴代码...
  • 不包括第一区块) 字典暴力破解 格式化标签至出厂状态 写特殊的Mifare Classic卡片制造商块 创建、编辑、保存和共享密钥文件(字典) 编码解码Mifare Classic价值块 编码解码Mifare Classic的访问条件 比较转储(比对...
  • 713版本其实安卓这一块主要就是24和devicetoken,就是3个ccd加devicetoken,而devicetoken需要从微信哪里去拿,安卓的24已经有85个字段了,其中78字段中的FSID值是比较特殊的。24里面的东西可以自行构造,最后判断的...
  • 最近遇到一个问题,用 Vue 开发的项目在最近两年新出的安卓手机上没问题,在三四年前的旧...网上的文章大部分是 Vue-cli 2.x 版本的解决方案,但 Vue-cli 3 跟之前的版本还是有很大差异的,可能是我比较菜,看了 n 篇文
  • 写下这篇文章目的:当我学习的和百度看看如何获取网络状态 发现都是一些比较老的方法 API23已结过时 所以在此写下记录 ,我不明白国内为什么那么少那么我们来看看旧方法package com.chengxinet.bobo.utils;import ...
  • 713版本其实安卓这一块主要就是24和devicetoken,就是3个ccd加devicetoken,而devicetoken需要从微信哪里去拿,安卓的24已经有85个字段了,其中78字段中的FSID值是比较特殊的。24里面的东西可以自行构造,...
  • 接触Kotlin也算是有一段时间了,但是都没有利用Kotlin输出点什么东西来,于是就有了此项目《玩安卓Kotlin版本的Wandroid》,当做学习Kotlin的练手项目。 部分参考 wanandroid ,感谢。基本上都是自己瞎设计的。项目...
  • 经过版本比较,发现Android 6.0的版本都非常流畅,7.0以上版本才会卡。 开始以为是live2d贴图太大引起的。删除了所有的live2d,发现依然卡顿严重。 然后排除法,删除所有音频播放,再次测试,竟然不卡了!!!怎么也...
  • 结论:由于安卓7.0后,用户安装的证书不被信任,导致无法使用charles等抓包...在安卓7.0及以上的版本,即使安装了charles证书,也会导致抓取https包失败 如图https包出现unknow报错 为什么这样 Android6.0网络默认...
  • 比较两个版本的源码我们可以发现Notification.java在SDK23中比SDK 22中多了一行注释 “@removed”,这意味着如果你的工程是用SDK 23的那么此方法用不了,如果想用的话将编译版本换成 SDK 22即可。 另一个警告是 ...
  • //安卓在8.0对通知有比较大更新,旧的API在8.0以上版本失效,下面封装工具类方便使用 /** * @author zhudaihao * @date 2020-10-13 * 通知工具类 */ public class NotificationUtils { /** * 创建渠道兼容...
  • 使用了TSINGSEE青犀视频产品的小伙伴都知道,EasyNVR、EasyDSS内都集成了EasyPlayer.JS版本。 当然了,EasyPlayer-RTSP、EasyPlayer-RTMP也经受了众多用户的使用考验,表现出了强大的播放和调用性能。 我们比较...
  • 市面上好用的手机浏览器层出不穷,令人眼花缭乱;Chrome无论是PC端还是手机界,一直都是业内老大,这点...近日,Alook终于推出了其安卓版本,关键还是全免费,(IOS版本是收费的)今天就为大家分享一下这款Alook手机浏...
  • 安卓推送方案及比较

    2013-03-15 11:36:22
    安卓推送方案及比较 经常有朋友困扰于Android上面实现推送的技术,希望知道各种方案的优缺点、性能、开发难度等,于是特意写了这篇文章。 方案一: Google官方的服务: 但,通过对比研究发现C2DM机制存在以下缺点...
  • 使用了TSINGSEE青犀视频产品的小伙伴都知道,EasyNVR、EasyDSS内都集成了EasyPlayer.JS版本。 当然了,EasyPlayer-RTSP、EasyPlayer-RTMP也经受了众多用户的使用考验,表现出了强大的播放和调用性能。 我们比较...
  • 调用系统相机拍照是安卓比较常见,也比较简单的功能。那么拍照后得到的照片,我们有两种处理:第一种,我们只把它们显示出来(不保存在文件中,但是这种只能显示缩略图)。第二种,我们将照片写入到文件中,即保存...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 967
精华内容 386
关键字:

安卓版本比较