I'm curious as to if, or how much interaction or contact occurred between India and China before they were imperialized (any time before then. Ancient China and Ancient India, the Qing and the Mughals, etc.). Other than Buddhism being invented in India and spreading to China, I'm not aware of any contact between them.
Can I ask what you mean by "before imperialism". Are you specifically speaking of the era of European "new imperialism" of the nineteenth century? (Of course, China was never formally annexed in that period anyway), or do you mean before they formed their own empires (i.e. Maurya, or the era of Shi Huangdi, etc)? I assume the former, based on the content between the parentheticals. If so, the answer is yes, of course, and for thousands of years. You might want to check out Columbia's [Travel Records of Chinese Pilgrims] (http://afe.easia.columbia.edu/special/travel_records.pdf) for example, or Faxian's [Account of the Buddhistic Kingdom] (http://acc6.its.brooklyn.cuny.edu/~phalsall/texts/faxian.html), which dates back 1600 years or so.
When I read your question, specifically the part about contact occurring between India and China, my impression was that you were asking more about diplomatic relations (at a state level) than pilgrimages. Since SisulusGhost’s comment has already pointed you in a good direction with regards to pilgrimages, I’d like to add a bit about diplomatic relations.
From the first millennium CE, China and India have had contact, but it was primarily cultural, through the areas’ shared Buddhist faith. There was also trade between the two regions, and a small amount of diplomatic relations, mostly in terms of exchanging tribute goods (elephants and fragrances in exchange for silk). There were also some monks from India that ended up participating in Chinese state affairs, like Jiimoluoshi, Tanwuchan, and Qiunabamo.
During the Tang dynasty, diplomatic relations began to increase once the monk Xuanzang arrived in India (the kingdom of Kanauj), and spoke with King Harsha. The result of these two meeting was that Harsha sent envoys to Tang Taizong, re-opening communication lines that had been closed due to battles on the western frontier of the Tang dynasty. Harsha’s first message to Taizong in 641 was little more than a proclamation about Harsha’s recent ascension of the throne, and contained nothing suggesting that he even had any knowledge of Taizong. When the first Chinese envoy reached Harsha, according to the Xin Tang Shu, neither Harsha nor his people could recall ever having received an envoy from China in the past.
After this delegation in 643, which formally re-established relations between Tang and Kanauj, came another in 644, led by Li Yibiao, with Wang Xuance as his second-in-command. In this mission, among other things, a superior sugar-making technology was brought back to China, and a request by King Kumara of East India to translate the Daodejing into Sanskrit and bring it back to India.
This led to a series of other diplomatic missions (several of which were led by Wang Xuance), as well as an increase in trade, which allowed for an increasing number of merchants to bring all sorts of new goods into Tang, from horses to mongooses, Bodhi trees to sandalwood, plus a wide variety of spices, scents, and, of course, books. Before this period of time it was primarily monks bringing sutras into China, but it was now merchants bringing the vast majority of sutras into China for sale and distribution.
Although Buddhism was certainly a key element connecting pre-modern China and India, it was certainly not the only one, and the envoys sent between the two regions did a great deal in furthering diplomatic, cultural, and economic contact.