Android

You mention it is Sunday, so this must be a home network. 10 devices would place some significant load on it. Apart from trying to disconnect some of them, you can also try to change the WiFi's channel to improve performance. There are apps like WiFi analyzer (Android) for that.

Taggings:

The solution was to connect an actual android device, or to use a laptop or pc with more calculation capacities.

Technology:

If you have installed the mobile version of Chrome on your device with Android or iOS, you can enter the web in question and ask to see the desktop version from the browser menu. To do so, on either device, open Google Chrome and the page you want to visit. Once there press on the menu (on iOS there are three horizontal lines on top of each other and on Android they are three points, both are on the right corner) and look for the option "See as on a computer" that you can mark to that stays permanently and applies to each website you visit

OperatingSystem:

Technology:

Andyroid emulator

The solution for the problem is to install an Android emulator in your computer.
Andy is one of the best emulator. It can be download here: http://www.andyroid.net/
After installed you can enjoy all your Android application on you windows machine

Taggings:

Install Custom ROMs on Android devices

If you don't want to buy a new smartphone, your best solution is to install an unofficial Android firmware on it.

Android is open-source, so it’s possible for Android users to take its source code and roll their own operating systems – known as a custom ROM – for their smartphones. CyanogenMod is the most popular community-developed ROM for Android. Don’t worry you can choose any other update as long as you are ensuring that the system is stable and without bugs or things that aren’t working properly.

To upgrade, users usually have to back up the original operating system and then "root" the phone, or disable the security settings that protect its OS from being modified. Keep in mind that installing the system incorrectly could render the phone inoperable, and that running an unofficially supported OS could void the phone manufacturer's warranty.

1. Install at your own risk
2. Choose your custom ROM
3. Root your phone
4. Back up your current firmware and phone
5. Prepare Google’s default android apps for installation
6. Install the custom android firmware
7. Enjoy your new android phone!

Each phone can have its own unique steps for doing this, so you should follow instructions for your specific model. You'll find them on the Custom ROM webpage or some Android forum.

Taggings:

SSHDroid, AirDroid

As Google decided to remove USB mass storage support from recent android-versions (starting with version 4.0 - "Ice Cream sandwich") the phone can only be connected via PTP or MTP support. AFAIK this works quite well with Windows and Mac but unfortunately not very well with Linux.
There are however other methods to connect the phone. Two of them I used are:

Both can be obtained from the Google App Store.
SSHDroid sets up an SSH-Server on the Android phone. File transfer can be done via every ssh-able client (command line, explorer, nautilus...).
AirDroid is far more advanced. It sets up a Web server on the Android phone and lets you connect via a standard Web browser to the Android phone. Besides transfer of video, audio or picture files it allows access to standard moblie phone functionalities, like SMS writing (or reading) or camera.
For detailed descriptions of how to set up the tools please refer to the links.

Taggings:

Create android application with phonegap using HTML5, CSS3, JavaScript

PhoneGap allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms' native development language. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's sensors, data, and network status.
Since the front end of the application is built using web technologies, a PhoneGap application with the exact same source code can be deployed across different platforms. It should be considered that phonegap has also some limitations as the front end of the application is built in JavaScript. A large number of applications rely on background threads to provide a smooth user experience, but as PhoneGap APIs are built using JavaScript which is not multi-threaded background processing is not supported. In addition a number of native APIs are not yet supported by PhoneGap’s APIs

A "Hello World" application can be created as follows:

1. Install SDK + Cordova

Download and install Eclipse Classic (Eclipse 3.4+) from http://www.eclipse.org/downloads/
Download and install Android SDK from http://developer.android.com/sdk/index.html
Download and install ADT Plugin http://developer.android.com/sdk/eclipse-adt.html#installing
Download the latest copy of PhoneGap from "http://phonegap.com/download" and extract its contents. We will be working with the Android directory.

2A. Setup your PATH environment variable on Mac OS

Open the Terminal program (this is in your Applications/Utilites folder by default).
Run the following command

touch ~/.bash_profile; open ~/.bash_profile

This will open the file in the your default text editor.
You need to add the path to your Android SDK platform-tools and tools directory. In my example I will use "/Development/android-sdk-macosx" as the directory the SDK is installed in. Add the following line:

export PATH=${PATH}:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools

Save the file and quit the text editor.
Execute your .bash_profile to update your PATH.

source ~/.bash_profile

Now everytime you open the Terminal program you PATH will included the Android SDK.

2B. Setup your PATH environment variable on Windows

From the Desktop, right-click My Computer and click Properties.
Click Advanced System Settings link in the left column.
In the System Properties window click the Environment Variables button.
Select the PATH variable from the System variables section.
Select the Edit button.
You need to add the path to your Android SDK platform-tools and tools directory. In my example I will use "C:\Development\android-sdk-windows" as the directory the SDK is installed in. Append the following text into the text box:

;C:\Development\android-sdk-windows\platform-tools;C:\Development\android-sdk-windows\tools

Save your edit. Close the Environment Variables dialog.
Additionally, you may need to include %JAVA_HOME%\bin to your PATH as well. To check to see if this is required, run a command prompt and type java. If the program can not be found add %JAVA_HOME%\bin to the PATH. You may need to specify the full path instead of using the %JAVA_HOME% environment variable.
Finally, you may need to include %ANT_HOME%\bin to your PATH as well. To check to see if this is required, run a command prompt and type ant. If the program can not be found add %ANT_HOME%\bin to the PATH. You may need to specify the full path instead of using the %ANT_HOME% environment variable.

3. Setup New Project

In a terminal window, navigate to the bin directory within the android subfolder of the Cordova distribution.

Type in ./create then press "Enter"

is the path to your new Cordova Android project
is the package name, e.g. com.YourCompany.YourAppName
is the project name, e.g. YourApp (Must not contain spaces)

Launch Eclipse, and select menu item New Project
Select the directory you used for
Click Finish.

4. Hello World

Create and open a new file named index.html in the assets/www directory. Paste the following code:

Cordova

Hello World

5. Deploy to Emulator

Right click the project and go to Run As > Android Application
Eclipse will ask you to select an appropriate AVD. If there isn't one, then you can create one as follows from the Android Virtual Device Manager:
- click "New" button from the Android Virtual Device Manager
- fill up the required information and click OK

6. Deploy to Device

Make sure USB debugging is enabled on your device and plug it into your system. (Settings > Applications > Development)
Right click the project and go to Run As > Android Application

The instalation tutorial can be found also under:
http://docs.phonegap.com/en/2.2.0/guide_getting-started_android_index.md...

Taggings:

Simple Hello-World-App on Android

Let's start with what you need first.

  • An Android phone, e.g. Samsung Nexus S or Galaxy Nexus
  • An IDE. Use Eclipse for Java EE.
  • The Eclipse ADT plugin (Android Dev Tools), available from Eclipse's own Package Installer.
  • The Android SDK-Tools, available from here

Install all software named in the upper list in this order. At one point, you'll be asked which Android versions you want to develop for. It is always a good idea to be on top of things, but don't forget to be compatible (more about this later). After you've done this, check whether any Android SDK-components are missing: In Eclipse, open "Window", "Android SDK Manager", and check whether the Android versions chosen by you are there.

The next step is to create the Hello-World-program. For this, in Eclipse: Open "File", "New", "Android Application Project" (might be hidden in "Other" the first time you open it). In this window, you'll have to make two important choices: What SDK-Version should be the "Minimum Required SDK"? What is the oldest Android phone you want your Hello-World-App to be compatible with? And: What is the "Target SDK"? For which SDK-Version do you want to develop this specific app.

Some words to Android-App-anatomy (or physiology): Every App consists of a number of "Activities", which interact wich each other by "Intents" and "Handlers". A lower layer, consisting of the "Service" and "AsyncTasks", is here to bring order to the chaos. Activities can be paused and resumed. Views are defined by XML-Files.

Now to the Hello-World-display: First, create a view in Eclipse. You should see an Android display. Name the resulting XML-file e.g. "activity_main.xml". Drag a Text-Field into the display of the phone. In the code, you should see an XML-particle, like:

< Text View
android:layout_width="wrap_content"
[..]
android:text="Hello World!" />

In the java-File of your main activity, be sure to set the view you've just created to be displayed on start-up. For this, you'll have to add a line of code to the activity's onCreate-method:

protected void onCreate(Bundle savedInstanceState) {
[..]
setContentView(R.layout.activity_main);
[..]
}

That's it. Plug in your phone, if you haven't already, and run the code in Eclipse. It should automatically deploy it to the phone - where an app symbol should appear. Run it, voilà!

Taggings:

How to implement autoresize/autorotate of Android Player?

To be able to change the View of the player depending on the rotation of the device we have to use the MediaPlayer-Class instead of the VideoView-Class.

So first you have to extend the SurfaceView and to catch the event when the size of the view is calculating. This event is called "OnMeasure" (From Android Documentary: OnMeasure - Called to determine the size requirements for this view and all of its children). So every time the view was changed and has to be drawn again or when the device rotates, this event will be called. This is the moment where we have to calculate the size of our surfaceView. Therefore we need to know the orientation of the device.

To be able to handle the orientation-changed-event we have to set a flag in the AndroidManifest class.
So for the activity, which will contain the mediaplayer, we have to set android:configChanges="screenSize|orientation". Now we can handle this event without a restart of our activity and pass the new orientation to our surfaceview.

@Override
public void onConfigurationChanged(Configuration _newConfig) {
if (mSurfaceView != null)
mSurfaceView.setConfiguration(_newConfig);
super.onConfigurationChanged(_newConfig);
}

Now our surfaceview is able to change the size depending on the orientation. To add it to our activity-layout we can add it to the xml as followed:

LinearLayout ...
package-name.AutoResizeSurfaceView
android:id="@+id/mediaplayer_surfaceview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" /
...
/LinearLayout

So actually that's it. A possible implementation of the custom surfaceview is attached to this solution. The final step is to implement the mediaplayer, which uses our custom surfaceview.

The implementation of the mediaplayer is documented here:
http://developer.android.com/guide/topics/media/mediaplayer.html

And a really good example-project can be found in the platforms-examples which are part of the Android SDK.

Taggings:

Subscribe to Android