Update sample code for networks calls

Closes-Bug: #1274695

Change-Id: Ifad88b86122555b70f89dd6ccab3e6b0ac58b7ea
author: diane fleming
Merge "Update sample code for networks calls"