I'm not related to your branch of Longleys, but I've gathered a bit of info that might help.Below is a summary - I'll send you an email with a little more detail.Edwin J Longley was the son of John T Longley and grandson of Andrew R Longley.
Andrew R Longley born abt 1820 in the Bahamas or West Indies died aft 1860 (maybe in New York City) married abt 1845 wife Mary (unknown) born England died bef 1860 (probably in New York City) children: John T Longley (Feb 1846 NYC - aft 1910) Andrew R Longley (abt 1850 NYC - aft 1920) Mary A Longley (abt 1852 NYC - aft 1860) William H Longley (abt 1858 NYC - aft 1860)
Andrew R Longley (SR) was listed as a sail maker in both the 1850 and 1860 federal census of New York City.His wife is not with them in 1860, so it is likely she died soon after childbirth in 1858.Both the 1850 and 1860 census list Andrew as born in the West Indies.All of his son's (John T Longley's) later entries say the Bahamas.John T Longley was 15 when the civil war broke out though I found no record of his having servedThe next appearance is in 1870 Iowa, Howard County.
John T Longley born Feb 1846 New York City died aft 1910 (maybe in Montana) married abt 1875, probably in Iowa wife: Mary Wentworth (Aug 1850 Maine - aft 1910) children: William A Longley (abt 1876 Iowa - aft 1910) Herbert A Longley (abt 1877 Iowa - aft 1910) Lewis E Longley (Nov 1881 Iowa - aft 1900) Edwin J Longley (Nov 1883 Iowa - aft 1930)
All are present in 1900 Iowa (Mitchell Co).William and Herbert both married in 1903 to Iowa born wives.Edwin married in 1905 to Montana-born Harriet McGee.All (except Lewis) are present in 1910 Montana, so I'm guessing they migrated as a family in 1903/1904 with the two older sons recently married.
Edwin J Longley born Nov 1883 Iowa (probably Howard Co) died aft 1930 (maybe in Ravalli Co Montana) married 2 Nov 1905 Montana wife: Harriet McGee (Feb 1887 Montana - bet1938-1947) daughter of Andrew McGee and Laura Belle Powers children: dau Marian Longley (abt 1907 Montana - aft 1930) son Andrew J Longley (abt 1914 Montana - aft 1930) dau Nettie E Longley (abt 1915 Montana - aft 1930) son Frank John Longley (14 Apr 1916 Montana - 18 Jan 1994) dau Luella Ruth Longley (abt 1917 Montana - aft 1930) son James E Longley (2 Nov 1927 Montana - 25 Sep 1997)