Posts Tagged Android

Including Apache HTTP Client on Android Studio

 

Android Studio - Apache HTTP Client

In order to use Apache HTTP Client (httpclient y httpmime) in Eclipse I used to download the Android port and then include the dependencies specifying the jar files: /home/lgallard//Android/libs/httpcore-4.3.2.jar /home/lgallard//Android/libs/httpmime-4.3.5.jar I kept this practice after migrating my projects to Android Studio, but I used Gradle to resolve the remaining libraries. Then to uniform everything, I did a research on how to include them. Just add the following lines to your app’s build.gradle file:


apply plugin: 'com.android.application'

android {

    dependencies {
        compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
        compile (group: 'org.apache.httpcomponents' , name: 'httpmime' , version: '4.3.5') {
        exclude module: 'org.apache.httpcomponents:httpclient'}
    }

    android {
        useLibrary 'org.apache.http.legacy'
    }

}

Then sync gradle and compile your project again.

Reference: Apache HttpClient Android (Gradle)


,

18 Comments

It’s back…

Luis’ Blog is back after some months in pause, and thanks to a friend of mine who is hosting the site. Several people asked me about the blog or information that only can find in my blog, therefore I decided to reactivate again. I hope it helps you, you learn something new or just be a way to change information. Enjoy it!

, , ,

2 Comments

How to enable the Web UI on qBittorrent

If you want to manage your qBittorrent server using a web interface, follow these steps:

  1. On the menu bar, go to Tools > Options qBittorrent WEB UI
  2. In the new window, choose Web UI option
  3. Check Enable the Web User Interface (Remote control) option
  4. Choose a port (default 8080)
  5. Set username and password (default username: admin / password: adminadmin) WEB UI
  6. Click on Ok to save settings.

Now in a browser you can check your qBittorrent server if you put your server’s IP address and port, example: 192.168.1.100:8080 as show below: qBittorrent Web UI You can also access it from your Android device by installing qBittorrent Client or qBittorrent Client Pro: qBitttoren Client Pro

, ,

No Comments

Programming Mobile Applications for Android Handheld Systems course

Programming Mobile Applications for Android Handheld Systems

Coursera just sent me the certificate for completing with distinction the course Programming Mobile Applications for Android Handheld Systems. This course is endorsed by the university of Maryland and lectured by Dr. Adan Porter.

Something worthy to mention about this Android course is that it’s really well structured, and the good quality of the videos and assignments. It makes me recall my time at college because the projects are very organized with clear objectives. In fact project’s evaluations are done automatically with JUnits. But the final project is evaluated by other peers (4 in total).

For this course I took the Signature Track, which is the paid option where the identity is checked by a keyboard pattern recognition software and verified by checking  the student’s photo (at the end of the course some assistants check those pics). With these validations they grant a certificate that can be verified using the following links:

If you are interested in this course, you can see the course’s content follow the above link.

,

6 Comments

Course Creative, Serious and Playful Science of Android Apps

Coursera androidapps101 2014 Computer Science and Programming Badge

Recently I received the awards for the Android course Creative, Serious and Playful Science of Android Apps lectured by Lawrence Angrave from University of Illinois at Urbana-Champaign. The course was designed to learn Android programing from scratch, therefore if you are interesting in developing for this platform this is a good starting point. The video lectures were made in English, but there are subtitles for Spanish and even English, so language is not barrier.

The Awards

The awards I earned were these:

  • Statement of Accomplishment:  This is a sort of of certificate which you earn when accomplishing 70% or higher. I got 94.6%
  • Computer Science and Programming Badge: This is a kind of badge they gave you also when you accomplished 70% or higher.

This awards are not part of the Signature Track, which let you share and validate this grade,  but you have to pay $49 for this feature.

,

No Comments

qBittorrent Controller for Android

Download application

If you are interested in this application you can install it from Google Play or download qBittorrent Controller apk on your device. Also you can download the code from GitHub because it was released as LGPL.

Features

  • See two panel view (fragments), for torrent list and details in the same window
  • Drawer menu for switching between All, Downloading, Completed, Paused, Active and Inactive torrent list
  • Pause or resume all torrents from the selected list
  • Auto refresh torrent list after performing an action on a torrent (pause, resume, or delete)
  • Add URL directly or by clicking the torrent link on your device’s browser
  • Pause, resume, delete or delete individual torrents with its downloaded data
  • Set and save a connection account

Phone’s view



Tablet’s view


,

6 Comments

Samsung Galaxy Tab P1000 with Android 4.3 – CyanogenMod 10.2

CyanogenMod 10.1 - Android 4.2.1 - Samsung Galaxy Tab 7 CyanogenMod 10.1 - Android 4.2.1 - Samsung Galaxy Tab 7 CyanogenMod 10.1 - Android 4.2.1 - Samsung Galaxy Tab 7

One more time I wanted to give another breath to my Samsung Galaxy Tab 7, because prices here in Venezuela are not encouraging, so I decided to install Cyanogenmod 10.2 con Android 4.3, thanks to HumberOS. This upgrade is valid only for the Latin American model, I mean Samsung Galaxy Tab 7 P1000N (o P1000L). Here I leave all you need to do so, and some tips.

Considerations

  • Remember that only you are responsible of what you do to your tablet. Although I followed this method, I won’t take any responsibility if you brick your tablet.
  • Backup your current rom and any data. This will help you to go back if something goes wrong.
  • Do this procedure with at least 75% of battery charge.
  • This rom ONLY works on P1000N / P1000L.

Requisites

  • To have installed a Recovery  capable of loading updates ( like CWM Recovery)

Installing

  1. Download and copy into internal o external sdcard’s root directory files cm-10.2-20130921-HumberOS-p1.zip, and gapps-jb-20130813-signed.zip. The first one is the ROM and the second one are the Googles’ apps for this Android version.
  2. Turn off the tablet and then turn it on in the CWM Recovery by pressing Power On + Volume Up buttons at the same time. When it boots you should see a screen like this one:

     CyanogenMod 10.1 - Android 4.2.1 - Samsung Galaxy Tab 7

  3. Make wipe data / factory reset and wipe dalvik cache on the wipe menu.
  4. On the  Install menu go to choose zip from internal sdcard (or choose zip from external sdcard if it’s your case). Choose  the cm-10.2-20130921-HumberOS-p1.zip file to flash it to the tablet.
  5. Later you must install the Google’s apps. To do so you have to go one more time to choose zip from internal sdcard option and choose the file gapps-jb-20130813-signed.zip.
  6. Once installed, go to reboot menu and reboot the tablet by choosing reboot system. The tablet will boot with the CyanogenMod’s logo. It will last quite a few, don’t turn off the tablet. Be patient.
  7. When it had finished, follow the tablet’s settings wizard, and enjoy it!

IMEI no valid

If you reboot your tablet and got the Invalid IMEI error as show below, I recommend you to got to the Stock ROM 2.3.3, and the update with the HumberOS’s kernel qith grants you root permission,  and finally do the above steps for upgrading to 4.3:

IMEI issue

The process can be a little tedious but it must be done to use a fresh operating system so it can recognize the device’s IMEI.

, , , ,

12 Comments

My first application on Android: BatteryReporter

batteryreporter

From a while I wanted to learn how to develop Android applications and when I saw that open a course at Coursera for developing Android appslications so I took the chance to learn. I must confess that it not  a piece of cake, I mean, it just not “copy and paste” code (although you can find example codes out there) and you must learn new concepts, because although you have programmed before (even Java) now you must learn how to do it the “Android’s way”.

After following the video lectures, read and read a lot, I build my first application, which in deed is part of the first assignment for the course. It’s a simple application which reads the device’s battery, and reports if it is charging or discharging, as well as the percentage of charge of the device.

For those interested in try my first application, or just take a look to the code for learninf, here I leave the apk file and the main code.

The code (MainActivity.java)

Here you can take a look to the code for the application:

package com.lgallardo.batteryreporter;
import android.os.BatteryManager;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.view.Menu;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
public class MainActivity extends Activity {
@Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 }
@Override
 public boolean onCreateOptionsMenu(Menu menu) {
 // Inflate the menu; this adds items to the action bar if it is present.
 getMenuInflater().inflate(R.menu.main, menu);
 return true;
 }
public void getStatus(View view) {
TextView statusValueTextView, chargingValueTextView, levelValueTextView;
 ImageView iconImageView;

 String charging = "";
int level, scale;
 float batteryPct;
// Get resources reference
 Resources res = getResources();
// Get values TextViews
 statusValueTextView = (TextView) findViewById(R.id.statusValue);
 chargingValueTextView = (TextView) findViewById(R.id.chargingValue);
 levelValueTextView = (TextView) findViewById(R.id.levelValue);

 // Get ImageView (icon)

 iconImageView = (ImageView) findViewById(R.id.imageView1);

 // Get battery's status
 IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
 Intent batteryStatus = registerReceiver(null, ifilter);
// Check if the battery is charging or is charged?
 int status = batteryStatus.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
 boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING
 || status == BatteryManager.BATTERY_STATUS_FULL;
// Update UI status
 statusValueTextView.setText(Integer.toString(status));
// Update UI charging
 if (isCharging) {
 charging = res.getString(R.string.yes);
// Get charging method
 int chargePlug = batteryStatus.getIntExtra(
 BatteryManager.EXTRA_PLUGGED, -1);
 boolean usbCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_USB;
 // boolean acCharge = chargePlug ==
 // BatteryManager.BATTERY_PLUGGED_AC;
if (usbCharge) {
 charging = charging + " " + res.getString(R.string.usb);
 } else {
 charging = charging + " " + res.getString(R.string.ac);
 }

 iconImageView.setImageResource(R.drawable.charging);
 } else {
 charging = res.getString(R.string.no);
 iconImageView.setImageResource(R.drawable.discharging);
 }
chargingValueTextView.setText(charging);
// Update UI level
 level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
 scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
 batteryPct = 100 * level / (float) scale;
levelValueTextView.setText(Float.toString(batteryPct)+"%");
}
}

,

2 Comments

Installing CWM-Based Recovery for Samsung Galaxy Ace S5830

Android System Recovery - 3e CWM-Based Recovery v5.0.2.6

The Recovery Menu (or boot menu) that comes with the Stock ROM 2.3.6 for the Samsung AceS5830 doesn’t let to install a custom ROM, so if you want to try another ROM but the original ones you must upgrade the Recovery. Here I leave how to install  the  CWM-Based Recovery for this phone model.

Considerations

  • Remember that only you are responsible of what you do to your phone. Although I followed this method, I won’t take any responsibility if you brick your phone
  • Backup your current rom and any data. This will help you to go back if something goes wrong
  • Do this procedure with at least 75% of battery charge
  • This rom ONLY works on  Samsung Galaxy Ace S5830 / S5830L

Procedure

  1. Download  CWM-Based recovery, and copy it to the SD card. You can do it by connecting your phone to a PC.
  2. Turn off the phone and turn it on in the Recovery mode. You can do that by pressing the power button, wait the Samsung logo to show and immediately press the central button + the volume up button at the same time. You must see something similar to the first image shown above..
  3. You will see a menu con different options. There choose Install zip from SD card
  4. Browse your SD card and choose the file named recovery-clockwork-5.0.2.6-galaxyace-fix.zip. You will see a confirmation screen. Say “yes”.
  5. After applying the changes reboot the phone by choosing the Reboot system now option on the main menu
  6. When your phone is booting, enter to the recovery mode as explained in the first step. You must see the  CWM-Based Recovery as shown in the second image.

Now you can isntall other rom like Cyanogenmod on your Samsung galaxy Ace S5830 / S5830L.

References

,

17 Comments

Android 2.3.6 upgrade fro Samsung Galaxy Y Duos

SGYD - Stock ROM

A friend bough ta Samsung Galaxy Y Duos phone on Amazon but when it arrived to Venezuela she realized the phone doesn’t have with Spanish as Language, only English and other ones like Arabic. I told to my friend that maybe there was a ROM from other country which includes Spanish as language, and in deed I found a rom for Spain, so this article it’s for leaving the rom here and explain how to upgrade the phone to version 2.3.6

Considerations

  • Remember that only you are responsible of what you do to your phone. Although I followed this method, I won’t take any responsibility if you brick your phone.
  • Backup your current rom and any data. This will help you to go back if something goes wrong.
  • Do this procedure with at least 75% of battery charge.
  • This rom ONLY works on Samsung Galaxy Y Duous 6102.

Requistes

  • Downlaod Odin 3.v1.84 which is compatible for this phone. Extraxt the content into a directory on your PC.
  • Download  the ROM 2.3.6. This is a Stock ROM, I mean, it has not operator’s branda. Extract the file on your PC. You must have three files: CSC_S6102_OXXLD3.tar.md5, MODEM_S6102_XXLE3.tar.md5 and PDA_S6102_XXLE3.tar.md5.
  • Have installed the  Windows drivers for Samsung phones.

Procedure

  1. Turn off the phone and turn it on in the Download mode. You can do that by pressing the power button + the central button + the volume up button at the same time. On this menu you must choose Wipe data factory reset and Wipe cache partition. Then you must choose the Reboot system now option.
    SGYD - Recovery
  2. Turn off the phone and turn it on in the Download mode. You can do that by pressing the power button + the central button + the volume down button at the same time. You can do this buttons combination after rebooting your phone in the previous step.
  3. Launch Odin (better as administrator) and plug in the phone to the PC. If Odin recognizes the phone a yellow box should appear as it’s shown in the following picture:
    Odin 1.84 -Parameters
  4. In Odin set the parameters as shown in the above picture, meaning,  PDA=PDA_S6102_XXLE3.tar.md5, PHONE=MODEM_S6102_XXLE3.tar.md5, CSC=CSC_S6102_OXXLD3.tar.md5
  5. Click on the Start button to begin the upgrade. The time of the procedure is show just below the System box and the details in the Message box .
  6. When it has finished, the phone will reboot with the new ROM and Odin will show the message PASS:
    Odin

Reference: [Stock][ROM][Odin] Galaxy Y Duos S6102 flashable

50 Comments