Calculate the integral $\int_{0}^{\pi}\frac{\sin x}{1+2^x}dx$ I try to solve the integral:
$$J=\int_{0}^{\pi}\frac{\sin x}{1+2^x}dx$$.
I could solve the following integral:
‎‎$$I=\int_{-\pi}^{\pi}\frac{\cos x}{1+2^x}dx$$
By using of  $x=-y$ we can write
‎‎$$I=\int_{-\pi}^{\pi}\frac{\cos x}{1+2^x}dx=\int_{-\pi}^{\pi}\frac{2^y \cos y}{1+2^y}dy$$
Then
$$2I=\int_{-\pi}^{\pi}\frac{\cos x}{1+2^x}dx+\int_{-\pi}^{\pi}\frac{2^x \cos x}{1+2^x}dx=\int_{-\pi}^{\pi}\cos x\,dx=2
$$
So $I=1$.
‎Any helps and comments for calculate integrate $J$ would be greatly appreciated!
 A: $$ H=\int_{0}^{\pi}\frac{e^{ix}}{1+2^x}\,dx =\int_{0}^{\pi}e^{ix}\left(\frac{1}{2^x}-\frac{1}{2^{2x}}+\frac{1}{2^{3x}}-\ldots\right)\,dx\tag{1}$$
leads to
$$ H=\sum_{n\geq 1}(-1)^{n+1}\frac{1+2^{-n\pi}}{n\log 2-i}\tag{2} $$
and to:
$$ I=\int_{0}^{\pi}\frac{\cos x}{1+2^x}\,dx = \text{Re } H =\sum_{n\geq 1}(-1)^{n+1}\frac{1+2^{-n\pi}}{n^2\log^2 2+1}(n\log 2)\tag{3}$$
$$ J=\int_{0}^{\pi}\frac{\sin x}{1+2^x}\,dx = \text{Im } H =\sum_{n\geq 1}(-1)^{n+1}\frac{1+2^{-n\pi}}{n^2\log^2 2+1}.\tag{4}$$
Numerically $I\approx\frac{37}{144}$ and $J\approx\frac{155}{296}$.

This answer deals with the original definition of $I$ as $\int_{0}^{\pi}\frac{\cos x}{1+2^x}\,dx$.
A later edit by the OP changed the definition of $I$ as $\int_{-\pi}^{\pi}\frac{\cos x}{1+2^x}\,dx$, that is clearly $1$.
A: Not entirely sure about a closed form, but by applying integration by parts, one gets
$$J=\frac12+\frac1{1+2^\pi}-\underbrace{\int_0^\pi\frac{2^x\ln(2)\cos(x)}{(1+2^x)^2}~\mathrm dx}_{\approx~0.078}$$
Thus, one finds a very close approximation of
$$J\approx\frac12+\frac1{1+2^\pi}$$
