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

Turn off scrolling and zooming when drawing on image with touch screen (ie: phones and tablets)

I have a webpage designed for the user to draw on an image. When the user moves their finger across the image on a touch screen, especially when zoomed in, the page scrolls instead of drawing on the image.  How do I turn off scrolling and zooming when the user draws on the image?

Here is a link to the webpage modified so it doesn't send data to me: www.barnwellmd.com/PainDiagram/Testdrawing.html.

Here is the code:
/* © 2009 ROBO Design
 * http://www.robodesign.ro
 */

var imageData, context, pixels;

function clearCanvas()
{
	context.putImageData(imageData, 0, 0);
}

function checkFields()
{
	var themessage = "Please complete the following fields:";
	if (document.form.ptname.value=="") 
		{
		themessage = themessage + "\n     Patient's Name";
		}
	if (document.form.dob.value=="") 
		{
		themessage = themessage + "\n     Birthdate";
		}
	//alert if fields are empty and cancel form submit
	if (themessage != "Please complete the following fields:") 
		{
			alert(themessage);
			return true;
		}
		else
		{
			return checkdate(document.form.dob.value);
		}
}
function checkdate(input)
{
	
	var validformat=/^\d{2}\/\d{2}\/\d{4}$/ //Basic check for format validity
	var returnval=true
	if (!validformat.test(input))
		alert("Invalid Date Format. Format: (mm/dd/yyyy) \nPlease correct and submit again.")
	else
	{ //Detailed check for valid date ranges
		var 

Open in new window

0
OWASP: Threats Fundamentals
LVL 12
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

i like to see what i see on my android phone on my windows 10 laptop.

how can i achieve this so that i can take some screenshots or recording etc. on the laptop

please advise
1
i have two moto 4g plus phone.

One phone is charging and working well.

other phone does not charge when i connect to charger.
i thought of swapping battery but that is too complicated to open battery in moto 4g plus which has bunch of small screws underneath battery making it hard to remove

when i connect to charger i see some times blinking light some times i do not see that blinking light as well
How do i trouble shoot or get it repaired?
Please advise
0
how to listen to podcasts on my android phone

i have one itune podcast with name say 'xyz'

can i listen above podcast in androind phone free?
where i can find  list of various podcasts on business, selling, enterpreneurship or technical topic etc?
how to subscribe to them

please advise
0
Javascript routine works on PCs but not on touchscreen phones or tablets:

When I touch the canvas, the line is drawn halfway down the canvas instead of under the finger. If only half the canvas is displayed on the screen (the bottom half is below the screen) then the line is drawn under the finger. On a PC with a mouse, it works fine.


Here is a link to the webpage modified so it doesn't send data to me: www.barnwellmd.com/PainDiagram/Testdrawing.html.

Here is the code:
/* © 2009 ROBO Design
 * http://www.robodesign.ro
 */

var imageData, context, pixels;

function clearCanvas()
{
	context.putImageData(imageData, 0, 0);
}

function checkFields()
{
	var themessage = "Please complete the following fields:";
	if (document.form.ptname.value=="") 
		{
		themessage = themessage + "\n     Patient's Name";
		}
	if (document.form.dob.value=="") 
		{
		themessage = themessage + "\n     Birthdate";
		}
	//alert if fields are empty and cancel form submit
	if (themessage != "Please complete the following fields:") 
		{
			alert(themessage);
			return true;
		}
		else
		{
			return checkdate(document.form.dob.value);
		}
}
function checkdate(input)
{
	
	var validformat=/^\d{2}\/\d{2}\/\d{4}$/ //Basic check for format validity
	var returnval=true
	if (!validformat.test(input))
		alert("Invalid Date Format. Format: (mm/dd/yyyy) \nPlease correct and submit again.")
	else
	{ //Detailed check for valid date ranges
		var monthfield=input.split("/")[0]
		var 

Open in new window

0
i bought two 128gb mini mocro sd card one from sandisc other from patriot

when i insert card to laptop to check size by right clicking on it and proprties shows 119gb for sandisc card

when i insert card to laptop to check size by right clicking on it and proprties shows 119gb for patriot card

i wonder why 128gb they do not show
also why both show different?

any place i can put price alerts to get deals email to my gmail
please advise
0
Javascript routine works on PCs but not on touchscreen phones or tablets:

Zakaria Acharki helped me at www.experts-exchange.com/questions/29129533 with a webpage I designed in 2012 to get it partially working on touchscreen phones and tablets.

Here is a link to the webpage modified so it doesn't send data to me: www.barnwellmd.com/PainDiagram/Testdrawing.html

But this routine which works great with a mouse on a PC does not work on phones or tablets:
function clearGray()
{
	var imageData2 = context.getImageData(0, 0, 700, 643);
	var newPixels = imageData2.data;
	for (var i = 0, il = pixels.length; i < il; i += 4) 
	{
		if((pixels[i] == 255 && pixels[i+1] == 204 && pixels[i+2] == 153) 
		|| (newPixels[i] > 235 && newPixels[i+1] < 150 && newPixels[i+2] > 75 && newPixels[i+2] < 110))
		{
		}
		else
		{
		   newPixels[i] = pixels[i];
		   newPixels[i+1] = pixels[i+1];
		   newPixels[i+2] = pixels[i+2];
		}
	}
	context.putImageData(imageData2, 0, 0);
	context.fillStyle  = "#CDCDCD";
	context.fillText("Referred pain",275,600);
}

Open in new window

This routine deletes the markings not on the body image when mouseup is fired.

This is what it looks like on the pc after swiping the mouse across the entire image: desktop imageThis is what it looks like on my phone after swiping my finger across the entire image:phone image
So on the phone, lines drawn on the image are not deleted outside of the body image.

What do I need to do to get this to work on touchscreens?
Thanks!
1
This webpage is not working on phones/tablets without a mouse:
https://www.barnwellmd.com/PainDiagram/Testdrawing.html
Note: I modified the above webpage for this question so it does not send anything to me. Otherwise it works the same as the real page.

The webpage displays ok (not great) on my phone and tablet but I cannot draw on the image with my finger without a mouse.

Any ideas on how to fix this?

Here is the code:
<!DOCTYPE HTML>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
	<title>Pain Diagram</title>
	<style type="text/css">
		body {background-color:#CCFFFF;} 
		#container { position: relative; }
		#imageView { border: 1px solid #000; }
		
		.button {
		  background-color: #004A7F;
		  -webkit-border-radius: 10px;
		  border-radius: 10px;
		  border: none;
		  color: #FFFFFF;
		  cursor: pointer;
		  display: inline-block;
		  padding: 5px;
		  text-decoration: none;
		  -webkit-animation: glowing 1500ms infinite;
		  -moz-animation: glowing 1500ms infinite;
		  -o-animation: glowing 1500ms infinite;
		  animation: glowing 1500ms infinite;
		}
		@-webkit-keyframes glowing {
		  0% { background-color: #B20000; -webkit-box-shadow: 0 0 3px #B20000; }
		  50% { background-color: #FF0000; -webkit-box-shadow: 0 0 40px #FF0000; }
		  100% { background-color: #B20000; -webkit-box-shadow: 0 0 3px #B20000; }
		}

		@-moz-keyframes glowing

Open in new window

1
i have android app with bunch of videos in it.

how to access the same app in windows 10 laptop
please advise
0
Hi Experts

Could you point a way to automatically transfer a telephone contact list from a smartphone to another ?

The last time I shop a new smartphone someone transfered it by via bluetooth, I guess.

The new smartphone is using Android 8.

Thanks in advance!
0
Become a Certified Penetration Testing Engineer
LVL 12
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

I hv a few very active wasapp groups tt I often housekeep most of the messages so that the 30GB phone storage dont run out.  however it takes a long time to select one by one the hundreds of messages: is there a way to do shift -select like in Windows?

I cud do it by connectg phone to PC but usually while waiting for buses or in the queue, I do this housekeepg
0
any good android or iphone with 256 gb internal memory and good ram around 350$ budget in usa market? looking for unlocked phone without any contract obligations

Please advise
0
any android app that plays .mpg video files which is free
please advise
mx player i tried which did not work
0
hi i have 13 hour .mpg video file which i am trying to play in my phone which is not working

how to conver tthat to say mp4 which easily play in my anroid phone.
i am using mx player to play videos on phone

any free good tool for this conversion

please advise
0
hi,
I like to sell my moto 4g plus current phone.

any good genuine sites where i can sell my phone to get reasonable amount.

please advise
0
looking for cheap and best phone which has lot of memory like 128gb and good ram like 4gb

any suggestions where to see and compare varous features and costs etc. that are available in usa markets



i also like to put 400 gb mini micro sd card (i think that is maximum available in market now right?)
please advise
0
yesteray i put 256gb mini micro sd card (with about 220gb content) to my motorola 4g plus below phone

https://www.amazon.com/Moto-Plus-4th-Gen-Unlocked/dp/B01DZJFWNC

i played one video and my phone heating up a bit.

Do i not supposed to load that big micro sd card to my phone.

what is the maximum mini micro sd card that i can put safely without overheating etc issues


please advise
0
https://www.experts-exchange.com/questions/29120211/Unaccounted-space-in-Android-how-to-make-Android-Outlook-use-microSD.html?headerLink=workspace_open_questions

Referring to above unfinished EE thread,

Q1:
will anything break if I move Whatsapp photos/images from Phone to microSD & if needed,
later move the photos/images back to the phone?

Q2:
Would like to clarify what Tim Green mentioned below: I could not locate it.

"Just because it doesn't cache the email, it still save info about the mailbox that will be needed for connectivity.
The move process may be a bit different depending on the android device but you can do it like this for the most part:

1.Navigate to settings on your phone
2.Tap Apps.
3.Select an app you want to move to the microSD card.
4.Tap Storage.
5.Tap Change if it's there. If you don't see the Change option, the app cannot be moved.
6.Tap Move. "
0
After installing MobilePass (a 2FA/OTP app for use with Checkpoint
VPN), it has required my Android phone to enter a PIN : previously
I just need to swipe the screen.

The issue is: since MobilePass app is installed, all my various
Whatsapp groups don't give a sound/alert even if I set custom
notifications.  However, the new whatsapp messages will still
pop up (if I set a custom notification).

I would like the sound notifications for new messages at set
by custom notifications.

My Android Note 4 is not managed by MDM
0
Python 3 Fundamentals
LVL 12
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Q1:
On my 32GB Galaxy Note 4 (appears to have 26GB nett only from Win Explorer) :
see attached.  How is the "missing" 6GB accounted for?

Q2:
I'm running MS Outlook on this Note4: when there's is huge emails in my Inbox,
does it  "sync" down to the Note4?  If so, how can I make it such that it take
Outlook emails take the space on the microSD card & not on the phone?
If this can't be done, is there any other email client app that could sync from
our MS Exchange 2016 but store the emails in microSD : pls recommend &
provide steps to configure
0
Lately, when I have been taking pictures with my iPhone X some of the pictures have been captured as movie files (.MOV) instead of just regular pictures (.JPG files).

How can I change this so that when I use the camera app on my iPhone it will only capture picture and won't capture movie files?
0
Outlook (and smartphone email apps) show a NAME, instead of a specific email address on incoming email.  This seems to be a huge spam risk, and I'd like to set Outlook to show the exact sender address on incoming mail. Anyone know how to do that?
  I get several emails a week from folks asking me if this message from "The Boss" is real or even to help them fulfill the bogus request, and I write them back asking them to compare the bogus email address to the boss' REAL address and disregard the request.  I feel if they saw the incoming email was from Borus@corruptedemailscam.uk we could avoid some wasted time and risk...any ideas or fixes are appreciated.
0
After my kid helped me install Facebook, Messenger &
a few other apps (CamScanner etc), now I can't share out
my Whatsapp images via Gmail anymore:

After I selected an image in Whatsapp, select "Share", will
get to the 1st attachment which used to have an option for
Gmail but now it doesn't show the "Gmail" option anymore.
Instead when I tap on "Email" will get to the 2nd attachment's
screen which says "No email was set up" : previously it was
set up & there.

Hmm, I think I uninstalled Gmail app & disabled a couple of apps
 when I was low on storage space : could this be the reason?

Also, I've been getting beeping notifications sounds though there's
no new Whatsapp nor SMS messages coming in: could it be one of
the new app (Facebook, Messenger, ... ?)
1.jpg
2.jpg
0
I want my Verizon Android phone to remain SILENT when at work unless I get a call or text from Mimecast that the email server is down

What app/etc do you recommend to make the above work ?

Possible Solutions:
  ** https://www.androidcentral.com/tasker
  ** https://www.techrepublic.com/article/how-to-automate-tasks-and-workflows-on-android-with-the-automate-app/
0
android 7
automatic call recorder
free version
app version 5.42.1

recordings were good then I noticed last recording was at a low volume
Maybe in a version upgrade
volume is lower which is very difficult to hear
If I pay for paid version, do you think this will fix.
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.