Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Smartphone Programming

Smartphones run using a variety of operating systems -- Android, iOS and Windows Mobile most commonly -- and an even wider variety of programming languages, including Objective-C, Java, Visual C#, C++ and .NET, not to mention HTML5 and JavaScript, and cross-platform frameworks such as PhoneGap.

Share tech news, updates, or what's on your mind.

Sign up to Post

Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
0
Enroll in October's Free Course of the Month
LVL 10
Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
0
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
2
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do. Apple is very particular when they review appstore submissions.
7
A short article about problems I had with the new location API and permissions in Marshmallow
0
Launchers compared
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
1
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
Hmmm... I have Marshmallow on my S5 and the Now launcher isn't standard (which I take to mean is included by default).
Here's what my home screen looks like.
Marshmallow Home screen (click for larger)
By the way, you should try to embed the comparison shot in the article, as the title totally obscures it when viewed on handheld devices. (Going to check it on my laptop, next.)
0
 
LVL 30

Author Comment

by:Thomas Zucker-Scharff
Comment Utility
I didn't have much trouble going to the Now launcher and recommend it.  I like it better.  I now have a Note 5, so it doesn't matter anymore.
0
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
10
 
LVL 7

Author Comment

by:Yashwant Vishwakarma
Comment Utility
Hi Footech,
Thank you for your suggestion. I will keep it in mind and will try to make articles better in future.
Yes earlier grammatical mistakes was there but lherrou ( Expert Exchange Editor ) already fixed.
And yes I am not good at English but from all of your support I can learn better.

Have a great day ahead :)
0
 
LVL 41

Expert Comment

by:footech
Comment Utility
I appreciate the effort that goes into making an article, especially in English when that is not your first language.

I don't think that "there are billions of billions users using android OS worldwide" (bold added by me for emphasis).
There aren't that many people in the world.  :)
The last statement I saw (claiming it came from a Google head) said that there are now one billion Android users.
0
Android System Updating
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, because one time I did this and I essentially had a bricked phone. Such is the price for being on the bleeding edge. Anyway, the morning of July 8, 2015, I received a push update of the OS on my Verizon Samsung Galaxy S5. It indicated that I needed a total of 800mb to do the update. I figured why not and went ahead with it. It was only after it had started, that I got nervous.

When I saw this screen...

2015-07-08-05.52.47.jpg... there was a similar screen when my device imploded, so I started to worry. It didn't help that according to one of my apps, I have 661 apps; I was hoping that this meant it wasn't optimizing built-in apps. Last time it counted all the way up to the second number and then reset and had a different number (fewer). But this time everything SEEMED to go smoothly. The system finished optimizing and rebooted. I was able to access most of my apps although some insisted that they didn't exist. I wasn't able to investigate any further, because at that time the device decided to reset. It hadn't warned me that it would take a long time on the Verizon screen after boot up, so I was a little worried when it had been booting on that screen for between 5 and 10 minutes. …
6
 
LVL 9

Expert Comment

by:Brandon Lyon
Comment Utility
Optimizing apps normally happens when doing an OS update for major versions. This is especially true for the Lollipop update due to Google's major code refactoring.

How does one acquire that many apps...? My phone doesn't even have 100 apps and I use it for hours every day.
0
 
LVL 30

Author Comment

by:Thomas Zucker-Scharff
Comment Utility
I use my phone for virtually everything. I also do beta testing for Android apps and am subscribed to the amazon app of the day and use the app of the day app (better than amazon).

It is a lot, especially for my 16gb S5.  I store a majority of my apps on my 64gb card.
0
phones-cropped.jpgLet me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you may ask, why in the world do you have 2 phones - for 2 heads?  No, but not far off.  

Because of my work, where I am the IT goto guy for my department, I decided it was a necessity to have at least some experience with iPhones, iPads and Android devices.  This is mainly because our workplace does not have any policy restricting what devices can or cannot be on our network other than they have to have security software installed.   And I am then tasked with the job of having to troubleshoot ANY device, carried by someone in my department, that connects to the network (and they all use wifi at least).  There are some of my colleagues here that look like they are wearing a batman utility belt.  I know of at least one person who carries an iPhone, Android, Blackberry, WiFi AP, and a pager.  We all write, or try to write help documents for all these devices in regards to our network.  Such things as how to connect your device to our exchange server and how to configure your device to connect to our WiFi.  In order for these to documents to be at all helpful, we include screenshots of actually doing whatever we are describing (or sometimes I just make a movie).  To make those screenshots and to know what you are …
9
 
LVL 7

Expert Comment

by:Maidine Fouad
Comment Utility
It really Depends on how much app's you have installed/Or running on your Android

Having Heavy draining Apps Running all day long(on both of the phones ) will shorten your batterys Life , and the power will not last as it was, Especially on Android

Being an android user , Some Apps Keep Auto Run on startup altough you didnt use them yet , Its quicker to run them since they are already executed on the background but it drains power : /, it is better to disable Auto start on the most Power-hungry ones

Benchmarks Are usually using Stock phones with no Apps on thems , and with no apps Android battery lasts longer:

http://cdn.bgr.com/2013/11/iphone-5s-5c-battery-life-test.jpg
Iphone has a more powerfull processor :

10563-2854-iPhone-6-Review003-l-1-.png
And in the underground Ios's are jail braked In order to Enable Customizations , that doesn't not equalize the equation ...So yeah Perhaps Carrying both is a must For It professionals

I wonder what kind of Applications Iphone User's have/Use especially in work ? are they the same as Android ?
0
 
LVL 30

Author Comment

by:Thomas Zucker-Scharff
Comment Utility
I wondered the same.  My boss has an iPhone and needs to be able to get files of of our one they are on.  The only real option is the cloud.  He uses an FTP app as well, and with enough configuration you can use what amounts to a files app.

As an IT professional,  I have found one of the best apps for iOS is on the iPad only, called CI (computer inventory) from imobile3,  it does almost everything I need from an inventory app. There are others which do a better job of either querying the computers or storing the info (see my article on it here : http://www.experts-exchange.com/articles/18542/Finding-a-Computer-Inventory-Application-for-Use-with-Mobile-Devices.html).
0
I recently asked a question about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The best answer to that question was a recommendation from expert Fouad Maidine for 2 apps, one of them was infradog.  I have used another app for several years called Computer Inventory (CI) from iMobile3, which is for iPad only and Here I was looking for an Android app.  I also found an app called Cellica DB, which can be used to create the tracking forms I wanted.

I exported the data from the Computer inventory app on my iPad to a csv file - to import into the demo of the Cellica DB app.  And I signed up for and downloaded the free version of InfraDog.  There were some major differences from the start.  CI is a dedicated computer inventory application with some user configurable fields (you can also rename the predefined fields).  The application is fairly comprehensive.  But you must enter all the data, there is no way, that I have found, to either scan it in or upload it.  The only real shortcut is to download/export the file in csv format and then use it in excel to enter more data.  When you are finished you can import it back into the CI …
0
Free Tool: ZipGrep
LVL 10
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't realize this at the time, or I might have bought a different phone.  Anyway, I now had a phone with only 16 GB of internal memory, which translated to about 10.5 GB usable.  It helped to have a 64gb card, but I have been constantly trying to find space.  I am unused to getting the messages I currently get about not having enough space to install an app I want to try.
 
At work, the most common complaint we get from iPhone users about email, is that it isn't downloading their mail anymore.  This is an easy fix, because we know what the problem is, these are the users that have set their phones to download ALL emails. The fix is simply deleting their email account and redoing it but changing that setting to a couple of months instead.  I mention this because that is what I ended up doing on my phone. I had been looking in every crevice of the phone to try to get more space.  I finally decided to delete my email account (which I had set to retain all emails), and redo it with the setting to download the last  6 months instead of ALL.  I gained almost 500mb of space.

The next most common complaint is that they are running out of space because they have so many pictures on the phone.  To these people I always recommend Flickr.com. …
1
Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator. This article presumes a working knowledge of Titanium Studio and the Alloy framework.

The Alloy framework has great built in elements for making a simple menu, mainly using the TableView (and TableViewRow) system. Unfortunately this does not include any built in functionality for expanding and collapsing rows. At first glance, using the "insertRowAfter" and "deleteRow" methods of the TableView would work for this. Unfortunately there seems to be a bug with the iOS implementation which leads to a "no row found for index" error when deleting rows. To avoid this error, the menu can be implemented as verticaly aligned View elements.

In the menu View elements represent each row. The rows for the submenus start out "hidden" by a wrapper View with a height of 0. Each row of them menu that does not expand will have a "menuAction" property which will be harvested by the "menuClick" onClick listener. The parent row of each submenu will have extra properties which define how big the submenu is and the name of the submenu's wrapper View.

Example Alloy markup would look like this:

file: /views/index.xml
<Alloy>
  <Window class="container">
    <ScrollView id="menu" layout="vertical">
      <View class="menuDivider"/>
      <View 

Open in new window

1
Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator. This article presumes a working knowledge of Titanium Studio and the Alloy framework.

If you are creating a mobile app that requires authentication before performing any actions you may need to present the user with a login form. You also likely want to save the user's information so that after authenticating they don't need to see the login form the next time the app is started.

In the Alloy framework, the first window that is normally started is the "index.xml" window via the "$.index.open()" call in the "index.js" controller file. To handle opening either the login form ("LoginForm") or the home screen ("Home") of your app based on authentication you can do the following:

File: /app/controllers/index.js
var auth = require('auth');

if (auth.isAuthenticated()) {
   Alloy.createController("Home").getView().open();
} else {
   Alloy.createController("LoginForm").getView().open();
}

Open in new window

The logic for "isAuthenticated()" will vary based on the individual app's requirements. In this example we are creating a library for authentication and calling the function within it. This 'auth' library will have a few functions declared as exports within that will be used in other controllers and will be outlined later in this article

The "LoginForm" view/controller will be responsible for accepting the user's input and validating the credentials. A simple form may look like this:

file: /app/views/LoginForm.xml

Open in new window

1
With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.

Windows Mobile Screen Layout  Windows Embedded Screen Layout
If you need to hide the Start Icon and/or the SIP (soft input panel, software keyboard button), you normally use the MS Mobile SDK SHFullscreen API. But this will not work for Windows Embedded Handheld!

So, to workaround this, you can change the registry and make the OS think, it has a hardware key for the start icon. There are three possible entries inside HKLM responsible for the design of the menu bar at SOFTWARE\Microsoft\Shell\BubbleTiles:
"TextmodeEnabled"=DWORD:0/1
"HardwareStartKeyEnabled"=DWORD:0/1
"HardwareDoneKeyEnabled"=DWORD:0/1

TextModeEnable controls the way the menu bar is drawn. O is for normal, graphic draw of the menu bar and 1 is used to define a text based draw of the menu bar.
 
HardwareStartKeyEnabled controls the display of the Start Icon.

HardwareDoneKeyEnabled controls the display of the (OK) button inside the menu bar.

Now you can change HardwareStartKeyEnabled to 1 and the OS will think, the device has a hardware start button and does no more display an icon on the left of the menu bar. After you changed the registry key, all new windows will show without the start icon. Or, when you reboot, the start icon will not more being visible for any window or application.

SHFullscreen has no function in WEH

As …
1
Progress means simplifying, not complicating. Bruno Munari

Preface

How to detect the name of the internal storage or an SD-card on Windows Mobile device from the desktop application?

I got this question, when I was working on a PC application copying a huge amount of data on a storage card inserted into a Windows Mobile device (a phone in this case).  I found the answer, very simple answer, but on my way I tested a few interesting ideas and I'd like to show them in this article.

Remote API

So the task is to copy a big amount of data to a storage (SD-card or an internal storage) of the device connected to the desktop. Both, the computer and the device, are running Windows - Mobile and XP or Vista. So, let's use RAPI.

Remote API is a small set of functions that allows one to create or remove files, folders, registry keys on the windows mobile device connected to the PC via ActiveSync or Windows Device Mobile Center.

Storage cards inserted into a device are usually shown in File Explorer as a folder named as "Storage Card" or "SD". Internal storage may have name "Internal Storage" or "My Flash Disk" or "Resident Flash".

My first idea was to check the existance of these names on the device and copy the data on the first detected storage. Have a look at the following console application demonstrating this approach:


Open in new window

1
This article shows how to setup the internet connectivity on Windows Mobile Emulator.  

I assume that you already have Microsoft Visual Studio, Microsoft Windows Mobile SDK's and the emulator installed. The emulator is available with Visual Studio or as a standalone (there is a link down the bottom).

You can launch your emulator and see if Internet Explorer works on it. If it doesn't, you need to perform the following steps:

1. Microsoft Virtual PC 2007


For a "clean" testing environment Install Microsoft Virtual PC 2007. See Virtual PC at http://go.microsoft.com/fwlink/?LinkId=78095 It really does make it easier to change network setting and that type of thing without affecting your day-to-day configuration.

2. Launch Device Emulator Manager.


You can find "Device Emulator Manager..." in "Tool" menu.
 Picture 1. Launch Device Emulator Manager in VS 2005Click on the right mouse button will launch the manager.
 Picture 2. Device Emulator Manager.

3. Choose one of the emulators


For example, Windows Mobile 6 Classic, and start it by clicking on "Connect" item in the popup menu
 Picture 5.
Note.Another way to start device emulator from Visual Studio is through "Connect To Device" item in the "Tools" menu.
 Picture 3. "Connect To Device" menu item in VS 2005.In the device list (Picture 3) you need to pick one and press "Connect" button (Picture 4).
 Picture 4. "Connect To Device" list.

4. Setup the emulator configuration


File->Configuration
 Picture 6.and here choose the Network Tab
 Picture 7.

5. Check the first checkbox


Enable NE2000 PCMCIA network adapter and bind to:". The combo box shows "Connected network card"
 Picture 8.Press "Ok".

6. Open the device settings


Through Start menu->Settings in the emulator  
Picture 9.

7. Choose Tab Connections


Launch Connections  
Picture 10.Here choose the "Advanced" Tab  
Picture 11.

8. Select Network button


Picture 12.
shows
2
 

Expert Comment

by:jinfeld
Comment Utility
I am trying to set up Pocket PC WM 5 emulator on an XP SPack3 box. Virtual PC 2007 SP1 is installed.
In the emulator: File > Configure > Network
When I check the box "Enable NE2000 PCMCIA network", it does not stay checked. It clears immediately after I close that screen. How do I get it to stick?
Jerry
0
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
Can you please open a Question for this?
0
When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method.

For Pocket PC it worked fine, on some Windows CE device that, sometimes, didn't have the MFC DLLs, this application even didn't start. For the first Microsoft Smartphones I needed to use another wizard, another resource file, special control compilation definitions, and so, many configurations.

Now I know that it is unbelievably easy to make a small application without any GUI or just with a message box that can be compiled for any Microsoft Mobile or CE platform and simply works. It allows me to be concentrated on the research or testing task and do not waste time on GUI arrangements, and project configurations compilation definitions, pre-compiled headers and other wizard generated stuff.

Here are the steps to create this smallest Windows Mobile/CE application:

1. Begin a project in VS2005.


In Visual Studio, in the "File" menu choose "New" and then "Project..." (Picture 1).

Picture 1. Begin a project in VS2005.
In the wizard, in Visual C++ section choose "Smart Device" item and on this page choose "Win32 Smart Device Project" (Picture 2).

Picture 2. New Project Wizard.

Set the solution name and press "Ok".

2. Smart Device Project Wizard.


You see the standard wizard for the Smart Device project. Don't click on "Finish" - we need to change few default options (Picture 3).

Picture 3. Smart Device Project Wizard.

Choose "Platforms"
2
 
LVL 60

Expert Comment

by:Kevin Cross
Comment Utility
Nice work, pgnatyuk!
You have my vote above.
0
 
LVL 40

Expert Comment

by:evilrix
Comment Utility
Voted yes above.
0
I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running.
Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detect the device idle time and call this function appropriately. In Windows Mobile 6 this function keeps the system running, but the display is turned off.

How to keep the backlight on?

If you need to keep your device at full power, you can use the following code:

HANDLE hBacklight = SetPowerRequirement(L"BKL1:", D0, POWER_NAME, NULL, 0);

Open in new window


Do not forget to release handle when you close application:

ReleasePowerRequirement(hBacklight)

Open in new window


SystemIdleTimerReset() should be used also - this function keeps the device running. If you will forget about it, the display will be on, but the device will go to sleep together with your application. It looks like your application gets stuck.

More details about this approach and a working example you can find in MSDN: Program Applications to Turn the Smartphone Backlight Off and On


Bruce Eitman proposed a new solution in his article Windows CE: Keeping the Backlight On
.
He found out that the power manager is monitoring a named event. The name of this event can be obtained from the registry:


Open in new window

1
 
LVL 51

Expert Comment

by:Mark Wills
Comment Utility
@pgnatyuk:

Articles when first submittted are regarded as "unverified" in so much as none of the Editors have seen it yet.

As an article is worked on it should swap status between Editor Review and Author Review.

As aikimark has already pointed out, it really was a message for him. Sorry for any confusion.

0

Smartphone Programming

Smartphones run using a variety of operating systems -- Android, iOS and Windows Mobile most commonly -- and an even wider variety of programming languages, including Objective-C, Java, Visual C#, C++ and .NET, not to mention HTML5 and JavaScript, and cross-platform frameworks such as PhoneGap.