Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/go pro/bug fix/refetch photos #1133

Merged
merged 23 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b0064d8
install and configure capcitor bluetooth plugin,
sultanmyrza Oct 18, 2021
db7b853
add `capacitor-community/http` plugin
sultanmyrza Oct 18, 2021
26af6b3
so far can upload 7 second go pro video from device (TODO: uplod dire…
sultanmyrza Oct 19, 2021
6eef999
seems like upload directly from camera also working
sultanmyrza Oct 19, 2021
882d3f6
allow clear traffic for go pro host
sultanmyrza Oct 21, 2021
9b739a2
add bluetooth permission for ios
sultanmyrza Oct 21, 2021
f7af24b
configure wifi related setting for ios
sultanmyrza Oct 21, 2021
bd0cf07
change ios app is to `io.numbersprotocol.capturelite.experiments.gopro`
sultanmyrza Oct 21, 2021
372b0ef
temporarely remove unused buttons to match ui
sultanmyrza Oct 25, 2021
455dfe3
show capture button from home page if connected to GoPro
sultanmyrza Oct 25, 2021
4a88197
add `NSBluetoothPeripheralUsageDescription`
sultanmyrza Nov 4, 2021
63ce792
change build version to 2 to be able to test in testflight
sultanmyrza Nov 4, 2021
d951717
removed my ip address (used for local development)
sultanmyrza Nov 12, 2021
ea48faf
removed useless comments
sultanmyrza Nov 12, 2021
ca5222b
remove useless `console.logs`
sultanmyrza Nov 12, 2021
ea6336d
remove some unusefull variables, methods
sultanmyrza Nov 12, 2021
fb497cd
add tutorial before upload (shows on android only)
sultanmyrza Dec 2, 2021
31e451f
add refresh button to refetch photos from GoPro
sultanmyrza Dec 27, 2021
2b7d5ba
change GoogleService-Info.plist for iOS
sultanmyrza Dec 28, 2021
763b2d0
change google-service for Android
sultanmyrza Dec 28, 2021
e5da7a2
upgraded compileSdkVersion and targetSdkVersion to 30 to pass play ma…
sultanmyrza Dec 28, 2021
c8ecd5d
rename android appId to io.numbersprotocol.capturelite.experiments.go…
sultanmyrza Dec 28, 2021
e02d223
update project version (ios)
sultanmyrza Jan 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ android {

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-bluetooth-le')
implementation project(':capacitor-community-http')
implementation project(':capacitor-community-wifi')
implementation project(':capacitor-blob-writer')

}
Expand Down
24 changes: 24 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,30 @@
<!-- Audio -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- Wi-Fi -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<!-- Bluetooth -->
<!-- Request legacy Bluetooth permissions on older devices. -->
<uses-permission
android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission
android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
<!-- Needed only if your app looks for Bluetooth devices.
You must add an attribute to this permission, or declare the
ACCESS_FINE_LOCATION permission, depending on the results when you
check location usage in your app. -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<!-- Needed only if your app makes the device discoverable to Bluetooth
devices. -->
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<!-- Needed only if your app communicates with already-paired Bluetooth
devices. -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />


<application
android:allowBackup="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import com.getcapacitor.Plugin;

import com.equimaps.capacitorblobwriter.BlobWriter;
import com.capacitorjs.community.plugins.bluetoothle.BluetoothLe;
import com.digaus.capacitor.wifi.Wifi;
import com.getcapacitor.plugin.http.Http;

import java.util.ArrayList;
import android.content.res.Configuration;
Expand Down Expand Up @@ -47,6 +50,9 @@ public void onCreate(Bundle savedInstanceState) {
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
add(BlobWriter.class);
add(BluetoothLe.class);
add(Wifi.class);
add(Http.class);
}});
}
}
1 change: 1 addition & 0 deletions android/app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">localhost</domain>
<domain includeSubdomains="true">10.5.5.9</domain>
</domain-config>
</network-security-config>
9 changes: 9 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')

include ':capacitor-community-bluetooth-le'
project(':capacitor-community-bluetooth-le').projectDir = new File('../node_modules/@capacitor-community/bluetooth-le/android')

include ':capacitor-community-http'
project(':capacitor-community-http').projectDir = new File('../node_modules/@capacitor-community/http/android')

include ':capacitor-community-wifi'
project(':capacitor-community-wifi').projectDir = new File('../node_modules/@capacitor-community/wifi/android')

include ':capacitor-blob-writer'
project(':capacitor-blob-writer').projectDir = new File('../node_modules/capacitor-blob-writer/android')
22 changes: 11 additions & 11 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
504EC3031FED79650016851F = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1100;
ProvisioningStyle = Manual;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -356,18 +356,18 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just updated build number for "Capture Exp App" to be able to upload to TestFlight

DEVELOPMENT_TEAM = G7NB5YCKAP;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.17.0;
MARKETING_VERSION = 2;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite;
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite.experiments.gopro;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = NumbersAppDistribution;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG USE_PUSH";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -381,17 +381,17 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = G7NB5YCKAP;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.17.0;
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite;
MARKETING_VERSION = 2;
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite.experiments.gopro;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = NumbersAppDistribution;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = USE_PUSH;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
10 changes: 10 additions & 0 deletions ios/App/App/App.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,15 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.networking.HotspotConfiguration</key>
<true/>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>app-proxy-provider</string>
</array>
<key>com.apple.external-accessory.wireless-configuration</key>
<true/>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
</dict>
</plist>
8 changes: 8 additions & 0 deletions ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Uses Bluetooth to connect and interact with GoPro or any other Bluetooth devices.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Uses Bluetooth to connect and interact with GoPro Camera</string>
<key>NSCameraUsageDescription</key>
<string>Grant camera permission to allow the app to take images and videos of the unique moments that you want to keep.</string>
<key>NSLocationAlwaysUsageDescription</key>
Expand All @@ -55,6 +59,10 @@
<string>Grant permission to allow this app to save the photos and videos you take to the local storage.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Grant permission to allow the app to read the photos and videos you take by this app.</string>
<key>UIBackgroundModes</key>
<array>
<string>bluetooth-central</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
3 changes: 3 additions & 0 deletions ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def capacitor_pods
# Automatic Capacitor Pod dependencies, do not delete
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCommunityBluetoothLe', :path => '../../node_modules/@capacitor-community/bluetooth-le'
pod 'CapacitorCommunityHttp', :path => '../../node_modules/@capacitor-community/http'
pod 'CapacitorCommunityWifi', :path => '../../node_modules/@capacitor-community/wifi'
pod 'CapacitorBlobWriter', :path => '../../node_modules/capacitor-blob-writer'
# Do not delete
end
Expand Down
Loading