background preloader

Android

Facebook Twitter

L'univers Android - Créez des applications pour Android. Cette petite section permettra à ceux fâchés avec le Java de se remettre un peu dans le bain et surtout de réviser le vocabulaire de base.

L'univers Android - Créez des applications pour Android

Notez qu'il ne s'agit que d'un rappel, il est indispensable de bien connaître le Java (ou au moins la notion de programmation orientée objet) avant de pouvoir développer pour Android. Les variables La seule chose qu'un programme sait faire, c'est des calculs. Il arrive qu'on puisse lui faire afficher des formes et des couleurs, mais pas toujours. Pour faire des calculs, on a besoin de variables. En Java, il existe deux types de variable : les primitives et les objets. Les primitives. The right way to implement a Splash Screen in Android. Android.jlelse. When your app is launched and it isn’t in memory yet, there may be some delay between when the user starts your app and when your launcher Activity’s onCreate() is actually called.

android.jlelse

During the ‘cold start’, the window manager tries to draw a placeholder UI using elements from the app theme like the windowBackground. So, rather than showing the default windowBackground (usually white or black), you can change it to a custom drawable that shows your splash screen. This way the splash screen only shows when needed and you don’t slow down your users. The key is creating a custom theme that overrides android:windowBackground, then replacing that custom theme with your standard theme before calling super.onCreate() in your Activity. Implementation In this example, I will assume your app main theme is named AppTheme, but if it’s not then you can replace all occurrence of AppTheme with the name of your app main theme.

You will have to create a new theme for the launcher. Keyboard shortcuts   Android Studio includes keyboard shortcuts for many common actions.

Keyboard shortcuts  

Table 1 shows the default keyboard shortcuts by operating system. Keep in mind, because Android Studio is based on IntelliJ IDEA, you can find additional shortcuts in the IntelliJ IDEA keymap reference documentation. Note: In addition to the default keymaps in table 1 below, you can select from a number of preset keymaps or create a custom keymap. For more about customizing your keyboard shortcuts, see Configure Custom Keymaps, below. Meet Android Studio   Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA .

Meet Android Studio  

On top of IntelliJ's powerful code editor and developer tools, Android Studio offers even more features that enhance your productivity when building Android apps, such as: A flexible Gradle-based build systemA fast and feature-rich emulatorA unified environment where you can develop for all Android devicesApply Changes to push code and resource changes to your running app without restarting your appCode templates and GitHub integration to help you build common app features and import sample codeExtensive testing tools and frameworksLint tools to catch performance, usability, version compatibility, and other problemsC++ and NDK supportBuilt-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine This page provides an introduction to basic Android Studio features. To Allow Two Way Text Chat Over Bluetooth in Android.

Objective Main objective of this post is to give an idea about how to allow two-way text chat over Bluetooth in android.

To Allow Two Way Text Chat Over Bluetooth in Android

Step 1 Get Bluetooth Service We need the Android Bluetooth service for this tutorial to work. Retrofit, a Simple HTTP Client for Android and Java. Exchanging data between a mobile app and a backend server is an essential need for many development projects.

Retrofit, a Simple HTTP Client for Android and Java

Whilst the task became simpler with Google’s Volley library, it has a steep learning curve and Retrofit aims to make the task even simpler. In this tutorial I will show you how exchange data between an Android app and a backend PHP application using the retrofit library. Top 5 Android libraries every Android developer should know about — Infinum. Here is a selection of five of our favorite ones and a list of links where you can find others. 1.

Top 5 Android libraries every Android developer should know about — Infinum

Gson Gson is a Java library used for serializing and deserializing Java objects from and into JSON. A task you will frequently need to do if you communicate with APIs. We mostly use JSON because it’s lightweight and much simpler than XML. How to Create Collapsing Toolbar Layout like Whatsapp in Android Application - Pulse7. Sign Up. MVP for Android: how to organize the presentation layer. MVP (Model View Presenter) pattern is a derivative from the well known MVC (Model View Controller), which for a while now is gaining importance in the development of Android applications.

MVP for Android: how to organize the presentation layer

There are more and more people talking about it, but yet very few reliable and structured information. That is why I wanted to use this blog to encourage the discussion and bring all our knowledge to apply it in the best possible way to our projects. Rooter Android - Passer root sur Android. Introduction aux tests Android avec Espresso. Android: Intent implicite.

Displaying Bitmaps in Your UI. This lesson brings together everything from previous lessons, showing you how to load multiple bitmaps into ViewPager and GridView components using a background thread and bitmap cache, while dealing with concurrency and configuration changes.

Displaying Bitmaps in Your UI

Load Bitmaps into a ViewPager Implementation The swipe view pattern is an excellent way to navigate the detail view of an image gallery. You can implement this pattern using a ViewPager component backed by a PagerAdapter. However, a more suitable backing adapter is the subclass FragmentStatePagerAdapter which automatically destroys and saves state of the Fragments in the ViewPager as they disappear off-screen, keeping memory usage down. Maîtriser les Ressources de Type "string" et "plurals"

Android Wear

Le Wi-Fi Direct, comment ça marche ?  Android MT. 18 Creative & Useful Ways To Use NFC Tags With Your Android Phone. Editor’s note: This post was originally published in October 2013 and has been completely updated and for accuracy and with more uses.

18 Creative & Useful Ways To Use NFC Tags With Your Android Phone

NFC (Near Field Communication) has been getting more attention by the media after becoming a technology for mobile payments and creative marketing. Most of the recent mobile devices support NFC, but most people don’t really know about or use it. NFC has a very uncertain future. The most practical, creative ways to use NFC with your Android device. NFC can be used for a lot more than just Google Wallet. Grab your NFC tags and try these creative ways to use NFC. If you think NFC (Near Field Communication) is only good for Google Wallet or MasterCard PayPass, think again. With the growing number of NFC-equipped phones, NFC tags are becoming an increasingly popular way to take advantage of this sprouting technology. Thing is, Android users aren't quite sure what to do with them.

Once you have a stack of NFC tags and have already learned how to program them , bookmark this page. Android Police - Android News, Apps, Games, Phones, Tablets. Bluetooth. The Android platform includes support for the Bluetooth network stack, which allows a device to wirelessly exchange data with other Bluetooth devices. The application framework provides access to the Bluetooth functionality through the Android Bluetooth APIs. These APIs let applications wirelessly connect to other Bluetooth devices, enabling point-to-point and multipoint wireless features. Hacked : un jeu de programmation sur mobile pour ceux qui aiment coder. Construire dynamiquement ses IHM Android.

Utilisation du web service SOAP sous Android. Getting Started with Android Studio. Before installing the Android SDK, you must agree to the following terms and conditions. Terms and Conditions This is the Android Software Development Kit License Agreement 1. Introduction 1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement.

Solutions & Astuces pour tablettes et smartphones AndroidAndroid MT. How to create a Digital Clock on Android. Android analogclock and digitalclock example. In Android, the AnalogClock is a two-handed clock, one for hour indicator and the other for minute indicator. The DigitalClock is look like your normal digital watch on hand, which display hours, minutes and seconds in digital format. Both AnalogClock and DigitalClock are UNABLE to modify the time, if you want to change the time, use “TimePicker” instead. Java - Updating clock in Android. Prise en main de AirDroid 2, pour contrôler son Android à distance.

Genymotion : un émulateur Android turbo pour PC.

Media Player

AVD. Providing GPS Coordinates Via the Eclipse Android Simulator. In most Android devices, your location-based or map applications can determine the current geolocation using either GPS (Global Positioning System), cell tower triangulation, or wifi networks. With regards to GPS, Eclipse provides a tool to simulate coordinates in a way that mimics real-life usage. It's called the GPS Emulator Control.

The tool features a Dalvik Debug Monitor Server (DDMS) that can be utilized to send your device or emulator a mock location, which is useful for testing different aspects of your application's location specific features without physically moving. Resources.openRawResource() question Android. Resources.openRawResource() question Android J'ai un fichier de base de données en res/raw/ dossier. J'appelle Resources.openRawResource() avec le nom de fichier comme R.raw.FileName et obtenir un flux d'entrée, mais j'ai un autre fichier de base de données dans le dispositif, donc pour copier le contenu de la db de la db périphérique utiliser : BufferedInputStream bi = new BufferedInputStream ( is ); FileOutputStream, mais j'obtenir une exception cette base de données fichier est endommagé.

Comment puis-je procéder ? Répondre #1 Oui, vous devriez être en mesure d'utiliser openRawResource pour copier un fichier binaire en face de votre dossier de ressources brutes à l'appareil. Basé sur l'exemple de code dans les démos de l'API (contenu/ReadAsset), vous devriez être en mesure d'utiliser une variante de l'extrait de code suivant pour lire les données de fichier db. FileOutputStream fos = new FileOutputStream ( "mycopy.db" ); fos . write ( buffer ); fos . close ();