This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//If you're targeting API 22 or higher. You can use the following code to get the list of SIM Cards. You can also allow user to choose the SIM Card: | |
final ArrayList<Integer> simCardList = new ArrayList<>(); | |
SubscriptionManager subscriptionManager; | |
subscriptionManager = SubscriptionManager.from(activity); | |
final List<SubscriptionInfo> subscriptionInfoList = subscriptionManager | |
.getActiveSubscriptionInfoList(); | |
for (SubscriptionInfo subscriptionInfo : subscriptionInfoList) { | |
int subscriptionId = subscriptionInfo.getSubscriptionId(); | |
simCardList.add(subscriptionId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/jinzhu/gorm" | |
_ "github.com/lib/pq" | |
) |
NewerOlder