Id
int64
21.6M
75.6M
PostTypeId
int64
1
1
AcceptedAnswerId
int64
21.6M
75.2M
ParentId
int64
Score
int64
-14
71
ViewCount
int64
5
87.5k
Body
stringlengths
1
26.6k
Title
stringlengths
20
150
ContentLicense
stringclasses
2 values
FavoriteCount
int64
0
0
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
127k
21.3M
Tags
sequencelengths
1
5
59,011,175
1
null
null
1
79
I keep getting an error message saying: > error: class R is public, should be declared in a file named R.java. What does this mean when the R files are automatically generated? It suddenly began to occur. These errors seem like they are to do with the automatic res files generated. Is there a problem with my compiler? [](https://i.stack.imgur.com/K9W2F.png)
I keep getting an error message for my res folder saying: error: class R is public, should be declared in a file named R.java
CC BY-SA 4.0
0
2019-11-23T19:06:14.973
2019-11-23T21:10:37.930
2019-11-23T21:10:37.930
4,420,967
11,482,302
[ "java", "android", "compiler-errors", "mobile-development" ]
59,013,689
1
null
null
0
50
I hope this meet all flutter developers well. i'm working on an app and there are several issues i've been going through. here is my question. i want to switch between selectedLocations and it will bring out forms related to the location out for users to fill. here are the locations below in pictures and the codes follows. [](https://i.stack.imgur.com/CtQGX.png) ``` void switchSelectedCountry(selection) { events = selection; scoops = selection; setState(() { _selectedLocation = selection; }); } formField: FixDropdownButtonFormField( value: _selectedLocation, hint: Text('Select'), items: <String>['Scoops', 'Events',].map((String value) { return new FixDropdownMenuItem<String>( value: value, child: new Text(value), ); }).toList(), onChanged: (newValue) { setState(() { _selectedLocation = newValue; }); }, ), ), ```
Can i use if statement to switch between locations?
CC BY-SA 4.0
null
2019-11-24T00:43:48.247
2019-11-24T05:37:36.037
null
null
11,441,799
[ "if-statement", "flutter", "dart", "switch-statement", "mobile-development" ]
59,032,797
1
null
null
0
56
I'm having a little issues with SingleChildScrollView in iOS. the app works well on android but moves up in iphoneXr. picture below. [](https://i.stack.imgur.com/MJp4W.png) Code follows. ``` backgroundColor: Color.fromRGBO(3, 9, 23, 13), resizeToAvoidBottomPadding: false, body: SingleChildScrollView( child: Container( width: double.infinity, child: Stack( children: <Widget>[ Positioned( top: -50, left: 0, child: Container( width: width, height: 1000, decoration: BoxDecoration( image: DecorationImage( image: AssetImage('assets/images/component.png'), fit: BoxFit.fill, ), ), child: new BackdropFilter( filter: new ImageFilter.blur(sigmaX: 12.0, sigmaY: 12.0), child: new Container( decoration: new BoxDecoration( color: Colors.white.withOpacity(0.0), ), ), ), ), ), ```
SingleSChildScrollView moves up in IOS
CC BY-SA 4.0
null
2019-11-25T13:19:49.107
2019-11-25T16:37:12.837
null
null
11,441,799
[ "flutter", "dart", "flutter-layout", "mobile-development" ]
59,091,525
1
null
null
1
1,218
I am building an app in React Native and have 2 screens for SignUp and SignIn. These screens shares the same component(AuthForm) which users type their username and passwords. The below code is my AuthForm: ``` return( <> <Spacer> <Text h4> {headerText} </Text> </Spacer> <Input label="Email" value={email} onChangeText={setEmail} autoCapitalize={"none"} autoCorrect={false} autoFocus={true} //If true, focuses the input on componentDidMount. The default value is false. /> <Spacer/> <Input secureTextEntry={true} //This is for keeping secure, replacing with dots. label="Password" value={password} onChangeText={setPassword} autoCapitalize={"none"} autoCorrect={false} /> {errorMessage ? <Text style={styles.errorMessage}>{errorMessage}</Text> : null} <Spacer> <Button title={submitButtonText} onPress={() => onSubmit({email, password})}/> </Spacer> </> ); }; ``` And these are my Sign in and Sign up screen screenshots: [Signin](https://i.stack.imgur.com/Lz4P9.jpg) [Signup](https://i.stack.imgur.com/1tOep.jpg) As you can see even they use same component for the input, sign Up screen suggests passwords that I used in past, however Sign in screen doesn't has that functionality. How is that possible ? My package.json: ``` { "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "axios": "^0.19.0", "expo": "^35.0.0", "react": "16.8.3", "react-dom": "16.8.3", "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz", "react-native-elements": "^1.2.7", "react-native-gesture-handler": "~1.3.0", "react-native-reanimated": "~1.2.0", "react-native-web": "^0.11.7", "react-navigation-stack": "^1.10.3", "react-navigation-tabs": "^2.6.0" }, "devDependencies": { "babel-preset-expo": "^7.1.0", "react-navigation": "^4.0.10" }, "private": true } ```
How does Iphone stores and auto-fill passwords/emails in React Native?
CC BY-SA 4.0
null
2019-11-28T14:55:23.000
2019-11-28T16:01:46.220
null
null
12,216,259
[ "react-native", "authentication", "expo", "autofill", "mobile-development" ]
59,108,073
1
null
null
1
96
I have a drop down list as follows: ``` <div className="dropdown"> <button className="nav-btn pick-a-sort">PICK A SORT:</button> <div className = "dropdown-content"> <button className="nav-btn" id = "bubble-sort" onClick = {()=>{this.bubbleSort()}}>BUBBLE SORT</button> <button className="nav-btn" id = "selection-sort" onClick = {()=>{this.selectionSort()}}>SELECTION SORT</button> <button className="nav-btn" id = "insertion-sort" onClick = {()=>{this.insertionSort()}}>INSERTION SORT</button> <button className="nav-btn" id = "quick-sort" onClick = {()=>{this.quickSort()}}>QUICK SORT</button> <button className="nav-btn" id = "merge-sort" onClick = {()=>{this.mergeSort()}}>MERGE SORT</button> <button className="nav-btn" id = "bead-sort" onClick = {()=>{this.beadSort()}}>BEAD SORT</button> <button className="nav-btn" id = "heap-sort" onClick = {()=>{this.heapSort()}}>HEAP SORT</button> <button className="nav-btn" id = "radix-sort" onClick = {()=>{this.radixSort()}}>RADIX SORT</button> </div> </div> ``` I have set the CSS such that once any of the options is clicked, the dropdown automatically hides till the specific task is complete (sorting) by adding the class '.clicked' to the dropdown. Once the task is complete I remove the '.clicked' class. This is working great on desktop site but on the mobile site, once the task is complete, the dropdown reopens automatically, and I'm not exactly why. Here's my CSS: ``` .dropdown { position: relative; display: inline-block; } .dropdown-content { display: none; position: absolute; background-color: rgba(255, 255, 255, 0.8); box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; } .dropdown-content .nav-btn{ display: block; text-align: center; width: 100%; margin: 0 auto; } .dropdown:hover .dropdown-content { display: block; } .dropdown.clicked:hover .dropdown-content { display: none; } ``` Here is the live [website](https://roy-05.github.io/sort-visualizer/) where you can see the problem, by just switching the view to "mobile" and clicking on any algorithm under "PICK A SORT:" Any help will be greatly appreciated, thanks!
Prevent dropdown from automatically reopening on mobile
CC BY-SA 4.0
null
2019-11-29T16:10:21.547
2019-11-29T20:55:03.863
2019-11-29T16:23:46.953
11,742,677
11,742,677
[ "javascript", "html", "css", "reactjs", "mobile-development" ]
59,146,462
1
59,146,530
null
3
11,545
I created a method below to loop through my list because I don't want to write again and again of these few lines but the parameter I pass to the Text widget and also value argument are error and it said Invalid constant value. How can I achieve this? I'm new to flutter. Please help me. ``` PopupMenuItem _createMenuItems(final String a) { return const PopupMenuItem( value: a, child: Text(a), ); } ```
Invalid constant value
CC BY-SA 4.0
0
2019-12-02T20:50:04.033
2019-12-02T20:56:25.907
2019-12-02T20:55:37.540
4,930,378
6,427,116
[ "flutter", "dart", "cross-platform", "mobile-development" ]
59,159,232
1
59,494,802
null
54
57,167
I want to install xcode to deploy a cross platform flutter application but I cant find enough space for Xcode is there any alternative solutions to just installing it on the internal storage
Can I install Xcode on an external hard drive along with the iPhone Simulator.app?
CC BY-SA 4.0
0
2019-12-03T14:24:15.643
2023-01-22T19:11:40.103
2020-04-09T15:29:48.587
292,561
11,721,597
[ "swift", "xcode", "macos", "flutter", "mobile-development" ]
59,209,494
1
null
null
1
723
I'm using XCode11 and ionic4. cordova version [email protected] project builds successfully using ionic cordova build ios also successfull build in xcode but when running on simulator, it end up showing white screen and nothing happens next. here is the console output showing the issues: [Log1](https://i.stack.imgur.com/9M31g.png) [Log2](https://i.stack.imgur.com/W5nQb.png) stuck on this for 4 days. checked so many suggestions on ionic blogs and nothing worked so far. I regret using ionic because its very buggy/unstable... please help ISSUES: > -Failed to load webpage with error: the operation couldnt be completed(NSURLErrorDomain error -999)-NSURL Connection finished with error -code -1100-ERROR: HTTP Request(OSRequestRegisterUser) must contain an app_id parameter-ERROR: Encountered error during push registration with OneSignal in addition to the above errors, the iOS simulator hangs on "White Screen", the application does not load and nothing happens next.
ionic4-iOS white screen in iOS Simulator
CC BY-SA 4.0
null
2019-12-06T08:29:52.527
2020-09-18T14:41:12.337
2019-12-06T11:58:16.587
4,635,560
12,490,165
[ "ios", "ionic-framework", "ionic4", "mobile-development" ]
59,224,774
1
null
null
1
170
I need to find out the deeplink of create room page of pubg mobile. Like the app opens to the create room page when clicked on a button.
Is there any way to find out the deeplink of a specific page of pubg Mobile
CC BY-SA 4.0
null
2019-12-07T09:49:13.760
2019-12-10T13:05:44.970
null
null
8,908,647
[ "react-native", "mobile-development", "deeplink" ]
59,268,149
1
null
null
0
60
I could not run the project on the Android without re-bundling each time I want to run my changes. Here is the re-bundling command: ``` react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res ``` After that I could not use `react-native run-android` because simply it could not find any emulator or physical device however I can find my emulators or devices via `adb devices`. When I use `react-native run-android` it has some errors on the log. [Could not find adb](https://i.stack.imgur.com/Jnh9O.png) [](https://i.stack.imgur.com/cbFrb.png) It says, 'could not find any device or emulator' and could find the the ADB. However, both directory and devices are okay. I've checked them like 100 times. Therefore, I could not use the command! I have to use `Android Studio` to run the project on Emulator or Physical Devices. It works but each time I have to change thing, I have to re-bundle whole android project. Reset the Bundler's cache and then re-run on Android Studio to see my changes. It just kills me :( I need a solution for better development on Android with React Native. Additional information: I'm working on MacOS. I literally tried everything on the internet but could not find the solution for me.
React Native Android Run Problem with Stucking Old Version without Re-bundling Each Time on MacOS
CC BY-SA 4.0
null
2019-12-10T13:17:50.773
2019-12-10T14:37:22.297
null
null
2,247,055
[ "android", "reactjs", "react-native", "mobile", "mobile-development" ]
59,316,554
1
null
null
0
962
I have a mixin and abstract class extends StatefulWidget. I wanna add my mixin to abstract class. Mixin: ``` mixin MyMixin<T extends StatefulWidget> on State<T> { String translate(context,childKey) { var parentKey = getParentLocalisationKey(); return childKey+parentKey; } String getParentLocalisationKey(); } ``` And abstract class: ``` abstract class BaseState<Page extends BasePage> extends State<Page> with WidgetsBindingObserver { } ``` How can i add mixin to abstract class? Is there any way to do it ?
Flutter mixin with abstract class
CC BY-SA 4.0
null
2019-12-13T05:23:43.520
2019-12-13T05:52:49.460
null
null
7,362,630
[ "flutter", "dart", "mobile-development" ]
59,329,520
1
null
null
0
350
I know that one way to open a specific app is by linking to them with their universal links. For example opening facebook with 'fb://', or uber with 'uber://' I believe these ('fb://', 'uber://') are called the domains or schema. I was wondering if all apps have this capability, and if so, where or how to obtain the domains/schema of any given app, for both ios and android? I am using flutter to open these links through the url-launcher, so once I have the domains/schema, opening the desired app is not an issue.
How to get the universal link domain of any app
CC BY-SA 4.0
null
2019-12-13T20:38:23.347
2019-12-13T20:45:50.813
null
null
6,587,629
[ "flutter", "deep-linking", "ios-universal-links", "mobile-development" ]
59,372,943
1
59,373,137
null
2
1,072
I am interested in the implementation of TextField in registering a Google account on Flutter. How can I make a similar series of TextFields from a date where all three have one errorText and when they click “next”, three are checked at once, if one is not entered, everything turns red, even if they were correct. It is like one of the three. ![IMAGE](https://i.stack.imgur.com/mIQxe.png)
How to make a TextFormField like Google?
CC BY-SA 4.0
null
2019-12-17T11:06:59.777
2019-12-17T13:45:37.887
2019-12-17T13:45:37.887
11,566,361
12,200,904
[ "flutter", "mobile", "mobile-development" ]
59,376,046
1
59,378,015
null
3
6,303
How to add icon to errorText below TextFormField using Flutter? [](https://i.stack.imgur.com/LX4QT.png)
How to add icon to errorText below TextFormField?
CC BY-SA 4.0
0
2019-12-17T14:09:56.423
2019-12-17T17:12:46.453
null
null
12,200,904
[ "android", "iphone", "flutter", "mobile", "mobile-development" ]
59,393,494
1
null
null
-2
3,536
This effect is similar to a fast-growing rectangle. Because it’s clear that it’s not just round ripples. It even exists in the google play market as in video. 1. https://youtu.be/ttYRc_zem00 2. https://youtu.be/8d-ki6kDgqg How to do it using flutter? (RaisedButton, MaterialButton have ripple effect (circle), but not sort of rectangle compared to that)
How to make such a button click effect?
CC BY-SA 4.0
null
2019-12-18T13:51:57.977
2019-12-18T16:33:36.793
null
null
12,200,904
[ "android", "iphone", "flutter", "flutter-animation", "mobile-development" ]
59,401,236
1
null
null
-3
70
I built this app: [https://play.google.com/store/apps/details?id=com.FindNewMusic_Vakil](https://play.google.com/store/apps/details?id=com.FindNewMusic_Vakil) But ios keeps rejecting me for following reason: ``` Guideline 4.2.3 - Design - Minimum Functionality We were required to install Spotify before we could use your app. Apps should be able to run on launch, without requiring additional apps to be installed. Next Steps To resolve this issue, please revise your app to ensure that users can use it upon launch. If your app requires authentication before use, please use methods that can authenticate users from within your app. ``` Even though I added another functionality which enables you to view artist in app (following pics). Any ideas of what I should do to get app to be approved because I am lost at this point [](https://i.stack.imgur.com/dsBmR.png) [](https://i.stack.imgur.com/z72r0.png)
Need ideas of solving problem with app I built
CC BY-SA 4.0
null
2019-12-18T23:10:48.040
2019-12-19T05:26:16.477
null
null
9,242,876
[ "android", "ios", "react-native", "mobile", "mobile-development" ]
59,406,140
1
59,409,379
null
1
812
I am having a hard time figuring this one out (im still new to flutter btw), I created a new screen with form that lets the user fill it out with information and after filling them out, there is a `validator` and `onSaved:` on `TextFormField()` as of the moment, I just want the textform fields to have the datas saved to Firebase Database. I managed to make it work somehow using this code BUT the data Ive input in is `nulled` in Firebase database (second pic): ``` child: FlatButton( color: Colors.blue, child: Text("Confirm", style: TextStyle(color: Colors.white)), onPressed: () async { await db.collection("createdoffers").add( { 'name': offerName, 'type': offerType, 'start': start, 'end': end, } ); }, ), ``` > Ive also watched some tutorial but Im having trouble making it work since its kind of a bit different to what Im trying to do (I guess its a beginners problem, Im new to programming and I fell in love with flutter lol)Now on my Firebase console, I created a new collection with some new dummy data just to fill in (mind you, I still dont save INPUTS from the app, just created a collection and put in some dummy data) The image of my firebase is below: [](https://i.stack.imgur.com/RZ5sh.png) `NULLED` data [](https://i.stack.imgur.com/vXJLh.png) my code is below for the screen form that I am trying to save data from INPUTS in the TextFormField and saving it all to my database by clicking the `FlatButton` > My target for this is: ``` import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; class AddOffer extends StatefulWidget { AddOffer({Key key}) : super(key: key); @override _AddOfferState createState() => _AddOfferState(); } class _AddOfferState extends State<AddOffer> { String offerName; String offerType; String start; String end; bool allBranches = false; bool selectedBranches = false; final db = Firestore.instance; final _formKey = GlobalKey<FormState>(); @override Widget build(BuildContext context) { return SafeArea( child: Scaffold( body: ListView( children: <Widget>[ Container( color: Color(0xFF707070), height: 200.0, child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ InkWell( onTap: () { setState(() { Navigator.pop(context); }); }, child: Padding( padding: EdgeInsets.fromLTRB(20, 30, 20, 0), child: Icon(Icons.arrow_back, color: Colors.white, size: 25.0), ), ), Center( child: Padding( padding: EdgeInsets.all(80.0), child: Text( "DEAL IMAGE", style: TextStyle( fontSize: 20.0, color: Colors.white, fontWeight: FontWeight.bold), ), ), ), ], ), ), Form( key: _formKey, child: Padding( padding: EdgeInsets.fromLTRB(30, 30, 30, 0), child: Column( children: <Widget>[ Row( children: <Widget>[ Text( "Name", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), ], ), TextFormField( decoration: InputDecoration(hintText: 'Enter Offer Name'), validator: (value) { if (value.isEmpty) { } return 'Please Enter Offer Name'; }, onSaved: (value) => offerName = value, ), SizedBox(height: 30.0), Row( children: <Widget>[ Text( "Type", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), ], ), TextFormField( decoration: InputDecoration(hintText: 'Enter Offer Type'), validator: (value) { if (value.isEmpty) { } return 'Please Enter Offer Type'; }, onSaved: (value) => offerType = value, ), SizedBox(height: 60.0), Row( children: <Widget>[ Text( "Start", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), ], ), TextFormField( decoration: InputDecoration(hintText: 'Enter Offer Start Date'), validator: (value) { if (value.isEmpty) { } return 'Please Enter Offer Start Date'; }, onSaved: (value) => offerName = value, ), SizedBox(height: 30.0), Row( children: <Widget>[ Text( "End", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), ], ), TextFormField( decoration: InputDecoration(hintText: 'Enter Offer End Date'), validator: (value) { if (value.isEmpty) { } return 'Please Enter Offer End Date'; }, onSaved: (value) => offerName = value, ), SizedBox(height: 60.0), Row( children: <Widget>[ Column( children: <Widget>[ Text( "Valid Until", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), SizedBox(height: 5.0), Text( "01/01/20", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0), ), ], ), ], ), SizedBox(height: 30.0), Row( children: <Widget>[ Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text( "Time of Active", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), SizedBox(height: 5.0), Text( "12/12/19", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0), ), ], ), ], ), SizedBox(height: 60.0), Row( children: <Widget>[ Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text( "Max people (optional)", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), SizedBox(height: 5.0), Text( "5", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0), ), ], ), ], ), SizedBox(height: 20.0), Row( children: <Widget>[ Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text( "Max redemption per member (optional)", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), SizedBox(height: 5.0), Text( "5", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0), ), ], ), ], ), SizedBox(height: 20.0), Row( children: <Widget>[ Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text( "Number of redemption", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), SizedBox(height: 5.0), Text( "5", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0), ), ], ), ], ), SizedBox(height: 60.0), Row( children: <Widget>[ Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text( "Branches", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0, fontWeight: FontWeight.bold), ), SizedBox(height: 5.0), Row( children: <Widget>[ Checkbox( value: allBranches, onChanged: (bool value) { setState(() { allBranches = value; }); }, ), Text( "All Branches", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0), ), ], ), Row( children: <Widget>[ Checkbox( value: selectedBranches, onChanged: (bool value) { setState(() { selectedBranches = value; }); }, ), Text( "Selected Branches", style: TextStyle( color: Color(0xFF707070), fontSize: 17.0), ), ], ), ], ), ], ), SizedBox(height: 30.0), Container( width: 250.0, child: FlatButton( color: Colors.blue, child: Text("Confirm", style: TextStyle(color: Colors.white)), onPressed: () { }, ), ), SizedBox(height: 30.0), ], ), ), ) ], ), ), ); } } ``` ``` child: FlatButton( color: Colors.blue, child: Text("Confirm", style: TextStyle(color: Colors.white)), onPressed: () { setState(() async{ await db.collection("createdoffers").add( { 'name': offerName, 'type': offerType, 'start': start, 'end': end, } ); } ); } ) ```
Datas from TextFormFields is null in Firebase database
CC BY-SA 4.0
null
2019-12-19T08:52:19.353
2019-12-20T16:49:15.093
2019-12-19T14:11:11.283
12,509,659
12,509,659
[ "android", "flutter", "flutter-layout", "flutter-dependencies", "mobile-development" ]
59,431,427
1
null
null
-1
40
Is there a way to add a footer-sized image to the bottom of any mobile application?
How can I add a footer-sized image to the bottom of any mobile application?
CC BY-SA 4.0
null
2019-12-20T21:18:02.770
2019-12-20T21:30:57.523
2019-12-20T21:24:44.357
8,239,061
null
[ "android", "android-layout", "mobile", "mobile-application", "mobile-development" ]
59,445,645
1
null
null
1
812
I am trying to create a timestamp in the format "mm/dd/yyyy hh:mm a". My app was originally crashing but I tried a different method and it doesn't crash anymore but on the chat screen it shows "java.text.SimpleDateFormat@4f47c0fb" instead of the timestamp. [Here is a screen shot of the chat screen timestamp](https://i.stack.imgur.com/2Mkjm.png) This is from my AdapterChat.java file ``` @Override public void onBindViewHolder(@NonNull MyHolder myHolder, int i) { //Get data String message = chatList.get(i).getMessage(); String timeStamp = chatList.get(i).getTimestamp(); //Convert time stamp to mm/dd/yyyy hh:mm am/pm //Calendar cal = Calendar.getInstance(Locale.ENGLISH); //cal.setTimeInMillis(Long.parseLong(timeStamp)); String dateTime = new SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.getDefault()).toString(); //Set data myHolder.messageTv.setText(message); myHolder.timeTv.setText(dateTime); try { Picasso.get().load(imageUrl).into(myHolder.profileIv); } catch (Exception e) { } //Set seen/delivered status of message if (i == chatList.size() - 1) { if (chatList.get(i).isSeen()) { myHolder.isSeenTv.setText("Seen"); } else { myHolder.isSeenTv.setText("Delivered"); } } else { myHolder.isSeenTv.setVisibility(View.GONE); } } ``` I commented out the 2 lines of code that were causing it to crash and I tried the new method under it. Can someone guide me in the right direction. I'm not sure what I'm doing wrong. Any help would be appreciated. Thanks!
Trying to create a timestamp "mm/dd/yyyy hh:mm a" for a chat for android using java
CC BY-SA 4.0
null
2019-12-22T15:43:25.723
2019-12-27T21:54:21.167
2019-12-22T16:37:51.677
5,772,882
12,580,283
[ "java", "android", "timestamp", "mobile-development" ]
59,566,702
1
59,567,270
null
0
41
I development project with react-native-cli and my customer want to see job progress. I can send him an apk-file after every change, but it's not very convenient. Are there any services that help automate this process? Can I deploy a project in any store(play market, etc..)? Please, share your experience if you have worked with mobile development. Thank you.
Project development with React Native
CC BY-SA 4.0
null
2020-01-02T16:29:00.450
2020-01-02T17:09:07.680
null
null
11,864,901
[ "mobile", "react-native", "mobile-development" ]
59,601,076
1
null
null
0
17
Is there a consensus on the best method of redirecting from Desktop to Mobile ? I am working with a very good developer but he has little experience with anything other than responsive sites. (I know its better to have a responsive site, but recently spent 30% of my year's business income trying and failing to get a good quality redesign to a responsive version of our existing site) So I have a 55 page Desktop Site and a new 55 page Mobile site. The mobile site works OK on all mobile platforms we have tested. For example is using mobile-detect.php a good solution, or what else should we consider ?
BEST method for redirecting from Desktop or Mobile?
CC BY-SA 4.0
null
2020-01-05T14:54:02.497
2020-01-05T15:04:17.477
null
null
7,598,477
[ "mobile", "responsive-design", "mobile-development" ]
59,608,842
1
null
null
1
57
How can I locally replace, for example, an image displayed by a certain application on a smartphone?
How can I replace images locally on smartphone
CC BY-SA 4.0
null
2020-01-06T08:27:48.957
2020-01-06T08:27:48.957
null
null
null
[ "html", "mobile", "smartphone", "mobile-development", "mobile-devices" ]
59,698,431
1
null
null
1
87
I am trying to understand how does the Metro Bundler works. While migrating to 61 I faced the issue of no bundler started on IOS, after adding start packager script manually as a build phase to Xcode the metro bundler is up for both the emulator and the device, but the green line with percents is running only when installing the app on the emulator when installing on the device it is stack after "Loading dependency graph done" however the app is installed properly on the device and running. Please help me to understand what is the difference between build process on device and emulator. Thank you
React native Migration to 61: Metro bundler is up on the ios device but does not running
CC BY-SA 4.0
0
2020-01-11T20:35:08.953
2020-01-14T08:07:33.080
2020-01-14T08:07:33.080
2,915,408
2,915,408
[ "ios", "react-native", "react-native-ios", "mobile-development", "metro-bundler" ]
59,707,945
1
59,707,962
null
0
134
I have collectionView inside of Tableview cell. When I take data from firebase, I save the data to array and then try to put it on collection view. However, even if I put data in array manually, my array.count show always zero and There is no thing in my collection view. ``` override func viewDidLoad() { super.viewDidLoad() currentuserArray.append(User(email: "[email protected]", image: "ASD")) currentuserArray.append(User(email: "[email protected]", image: "ASD")) print(currentuserArray.count) tableView.delegate = self tableView.dataSource = self getDataFromFirebaseToTakeUsers() } ``` in there, the value of currentuserArray.count is 2. ``` func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { print(currentuserArray.count) return currentuserArray.count // this looks like 0, however at the top, it was 2. } ``` However; in there, the value of userMailArray.count is 0. So, I don't have anything on my collectionView. How can it be possible ?
I have collectionView inside of Tableview cell. It return always Zero. How can I solve it?
CC BY-SA 4.0
null
2020-01-12T20:42:55.570
2020-01-12T20:44:48.103
null
null
7,314,121
[ "ios", "swift", "uicollectionview", "swift4", "mobile-development" ]
59,757,735
1
null
null
0
1,190
I am highly confused about how images work in mobile development for `ios` and for `Android`. I am using `Xamarin` for my but I believe images should still work the same as with native development. I looked at some documentation for working with images on both platforms, and they do not really help. I was hoping I could get some more useful information on here for the specific question below and any further explanation that you feel is necessary. How do image size specifications work on `ios` exactly? I have have read through [Apple developer documentation on image size and resolution](https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/) but it doesn't give enough explanation. I have an image (.png) of a specific size (W520pixels by H257pixels) and resolution (300ppi) and I want to have this Image in my app (Not as a button image or icon, just a regular image). Do I need to resize this to a specific size for `@3x`? and then downsize it to specific sizes as well for `@2x` and `@1x`? Do I also need to reduce the resolution? Also, [this article](https://www.wintellect.com/understanding-native-image-sizing-in-xamarin-forms-apps/) talks about how using improper dimensions for images would cause the OS to have to downscale or upscale the images which consumes processing resources (and I assume could increase battery consumption). Is my assumption correct? and if this is the case what are the optimal dimensions to be used for images in order to avoid this?
How exactly do image sizes and Resolutions work for mobile development?
CC BY-SA 4.0
null
2020-01-15T18:39:17.373
2020-01-15T23:07:46.553
2020-01-15T21:54:14.113
7,274,936
7,274,936
[ "android", "ios", "xamarin.android", "xamarin.ios", "mobile-development" ]
60,052,458
1
null
null
1
270
Recently I've created a new AVD instance via Android Studio that runs SDK 29 (Android 10). Before version 29 I could: 1. Start the AVD from the command line. 2. Switch to root. 3. Remount 4. Copy an alternative hosts file to AVD's etc/hosts For some reason I can't do that in with SDK 29 and after I run "./adb remount" command, I get the out put below. What does it mean and how can I overcome this problem? ``` Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services W Disabling verity for /system E Skipping /system Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services /system/bin/remount exited with status 7 remount failed ```
ADB Amulator Running SDK 29 Remount
CC BY-SA 4.0
null
2020-02-04T07:24:50.183
2020-02-04T07:24:50.183
null
null
3,423,799
[ "android", "android-studio", "android-emulator", "mobile-development" ]
60,131,936
1
60,132,595
null
0
295
- - - Output: 'Error has Occured' on screen ``` class _HomeViewState extends State<HomeView> { Future<DocumentSnapshot> getDocument() async { return Firestore.instance .collection('user_data') .document('3vIf92LIJQ7pu7MpUwH1') .get(); } @override Widget build(BuildContext context) { return Container( child: Center( child: FutureBuilder( future: getDocument(), builder: (BuildContext context, AsyncSnapshot snapshot) { if (snapshot.hasError) return Text('Error has occured'); if (snapshot.connectionState == ConnectionState.waiting) { return CircularProgressIndicator(); } if (snapshot.hasData) { return Column( children: <Widget>[ Text(snapshot.data['display_name']), ], ); } ```
Firestore.instance.collection(collectio_name).document(document_name).get(), does not get any value from firebase in Flutter
CC BY-SA 4.0
0
2020-02-08T22:46:10.807
2020-02-09T00:48:01.120
null
null
12,834,798
[ "firebase", "flutter", "dart", "google-cloud-firestore", "mobile-development" ]
60,142,173
1
null
null
0
563
Here I am trying to get the . - No error, just a blank page. ``` @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.friendName), ), body: Column( children: <Widget>[ Flexible( child: StreamBuilder( stream: Firestore.instance .collection('/message_data/friendA##friendB/message_list') .snapshots(), builder: (BuildContext context, AsyncSnapshot snapshot) { if (snapshot.hasError) { return Text('Error on chatView ${snapshot.error.toString()}'); } if (snapshot.connectionState == ConnectionState.active) { if (snapshot.hasData) { if (snapshot.data.documents .length > 0) { return ListView.builder( itemCount: snapshot.data.documents.length, itemBuilder: (BuildContext context, int index) { DocumentSnapshot _document = snapshot.data.documents[index]; return ChatMessage( isFriend: _document['fromA'], isNotPrevious:snapshot.data.documents.length - 1 == index, message: _document['content'], friendInitial: 'T', avatarUrl:'https://avatarfiles.alphacoders.com/132/132399.jpg', ); }, ); } else{ return Text('No messages found in chat view length vala'); } } else{ return Text('No messages found in chat view hasdata'); } } else{ return CircularProgressIndicator(); } }, )), ```
Not able to access the data from firebase using StreamBuilder in flutter
CC BY-SA 4.0
null
2020-02-09T23:01:37.573
2020-02-12T23:30:04.023
null
null
12,834,798
[ "firebase", "flutter", "dart", "google-cloud-firestore", "mobile-development" ]
60,183,181
1
60,185,409
null
1
636
I have a ASP.NET Core project where I use ASP.NET Core Identity with individual user accounts. I am thinking of creating a mobile app that uses the same user repository, but it seems that mobile apps (ios or andrioid) only uses Azure AD B2C. That is basically all the articles on mobile apps and authentication that I can find. Is this correct? If so - why? Any input on this issue is appreciated :-)
Mobile apps and authentication - B2C vs ASP.NET Core Identity
CC BY-SA 4.0
null
2020-02-12T07:29:28.563
2020-02-12T09:46:50.787
null
null
4,919,060
[ "asp.net-core", "azure-ad-b2c", "asp.net-core-identity", "mobile-development" ]
60,217,160
1
null
null
1
44
Is there any way to automate testing possible paths for the app and check if each state satisfies a specific condition? Two examples so you can understand what I mean: - `tester.find.byType(CustomScaffold)`- Is such a thing possible? Or would I have to just manually "find" stuff to tap in a page and create some sort of depth-limited tree?
How to test an entire Flutter app for consistency?
CC BY-SA 4.0
null
2020-02-13T22:04:24.610
2020-02-13T22:04:24.610
null
null
7,530,203
[ "testing", "flutter", "dart", "automated-tests", "mobile-development" ]
60,232,668
1
null
null
9
1,892
I want the dropdown like this with flutter Expected: [](https://i.stack.imgur.com/Qfu96.png) with flutter dropdownformfield I'm able to do something like [](https://i.stack.imgur.com/vkqHC.png) As you can see, When I click the dropdown button, the menu items are overlapping the button. Please find the code below ``` DropdownButtonFormField( isExpanded: false, isDense: true, items: classes.map((category) { return new DropdownMenuItem( value: category, child: Row( children: <Widget>[ Text(category), ], )); }).toList() , onChanged: (newValue) { // do other stuff }, value: _classroom, decoration: InputDecoration( contentPadding: EdgeInsets.fromLTRB(10, 0, 10, 0), enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.white)), hintText: "Select Class", hintStyle: TextStyle( color: Colors.grey[600], ), ), ) ``` is this achievable with dropdown widget? if not, how can i design custom dropdown widget? Thanks
Flutter dropdown alignment not proper
CC BY-SA 4.0
null
2020-02-14T19:51:44.727
2022-05-12T12:30:42.687
2020-06-20T09:12:55.060
-1
8,348,169
[ "android", "flutter", "dart", "mobile-development" ]
60,339,657
1
60,339,722
null
0
286
I'm currently experimenting with Flutter and its abilities. I found this app [Chwazi Finger Chooser](https://play.google.com/store/apps/details?id=com.tendadigital.chwaziApp&hl=en_GB) on the Google Play Store. This app allows the users to put multiple fingers on a blank screen, a circle is drawn around each finger and then one is selected. - - I don't want people to just do this for me, I'm just wondering really if anyone has tried this sort of thing before in Flutter. Seeking advice as still a novice. [](https://i.stack.imgur.com/B5VrI.png)
Flutter multiple finger press events
CC BY-SA 4.0
null
2020-02-21T13:29:57.410
2020-02-21T13:34:19.493
null
null
6,639,134
[ "android", "flutter", "dart", "flutter-layout", "mobile-development" ]
60,358,568
1
60,358,630
null
0
48
So, my aunt wants me to make an app to help people create lists and be more organized. It would also have pre-made lists and tips that occasionally appear. We both want it to be for iOS and Android. Does anyone have recommendations for what software I could use to create something like that? One other thing to note: I can't use XCode because I'm not a mac user. Thank you for your input.
What software would you recommend for making a simple list-creating app for iOS and Android?
CC BY-SA 4.0
null
2020-02-23T02:01:25.060
2020-02-23T02:15:45.267
null
null
11,986,124
[ "development-environment", "mobile-development" ]
60,455,094
1
null
null
0
931
So I have a similar issue as the person who asked [this older question](https://stackoverflow.com/questions/44269909/flutter-redirect-to-a-page-on-initstate), except with different requirements that none of the answers there help with. When a user opens the app, I want them to be greeted with the login page if they haven't logged in or the home page (a bottom nav bar view) if they did. I can define this in the `MaterialApp` as follows: ``` MaterialApp( initialRoute: authProvider.isAuthenticated ? '/home' : '/login', routes: { '/home': (_) => ChangeNotifierProvider<BottomNavigationBarProvider>( child: AppBottomNavigationBar(), create: (_) => BottomNavigationBarProvider()), '/login': (_) => LoginView() }, ) ``` So far so good. Except I want this to work on the web, and now even though the default screen when a user first opens `myapp.com` is `myapp.com/#/login`, any user can bypass the login screen by simply accessing `myapp.com/#/home`. Now I tried to redirect the user to the login page in the `initState()` of the bottom navigation bar (and setting the `initialRoute` to be `/home`), but on mobile this has undesirable behaviour. If I try this: ``` void initState() { super.initState(); if (!Provider.of<AuthProvider>(context, listen: false).isAuthenticated) { SchedulerBinding.instance.addPostFrameCallback((_) { Navigator.of(context).pushNamed('/login'); }); } } ``` then simply pressing back will return the user to the home page, again bypassing the login. If I try to use `popAndPushNamed` instead of just pushing, pressing back will open a blank screen (instead of closing the app). Is there any way to do this correctly so it works on both web and mobile?
Redirect user from named route
CC BY-SA 4.0
0
2020-02-28T15:48:17.387
2020-02-28T17:38:45.913
null
null
7,530,203
[ "flutter", "dart", "flutter-web", "mobile-development" ]
60,465,617
1
60,525,155
null
0
109
I am working with the latest version of Ionic. I need to intercept sms received from a specific number. I use [cordova-sms-plugin](https://ionicframework.com/docs/native/sms) as on the documentation of Ionic but this one comprises only the sending of SMS. I tested several other plugins but to no avail. Does anyone have a solution? Thank you in advance.
Ionic intercept incoming sms
CC BY-SA 4.0
null
2020-02-29T13:25:19.127
2020-03-04T11:35:40.790
null
null
10,032,556
[ "android", "ios", "ionic-framework", "sms", "mobile-development" ]
60,486,390
1
60,487,036
null
0
79
I have an that stores data from a Future method. Just recently I discovered that I have to handle an error when the data returned is null. What argument is missing inside the method in the following code snippet? ``` else if (snapshot.noSuchMethod(..missingArg..)){ // Do something } ``` Apparently take in a parameter type of Class
What argument can I use inside the **noSuchMethod()** method in flutter to handle null snapshot data?
CC BY-SA 4.0
null
2020-03-02T10:00:26.893
2020-03-02T10:35:02.327
null
null
6,413,161
[ "flutter", "dart", "mobile-development" ]
60,502,561
1
null
null
3
1,200
I'm new in cross-platform mobile development, I wanted to know which is better between React Native and Flutter. Also, what is the best resource for the best one between them?
React native VS Flutter which is better
CC BY-SA 4.0
null
2020-03-03T07:59:43.223
2020-03-03T08:21:25.753
null
null
10,939,810
[ "react-native", "flutter", "cross-platform", "mobile-development" ]
60,570,426
1
60,582,919
null
1
944
I'm trying to display a circular image with a shadow, but on Flutter web, the shadow gets cut at the edges, while working fine on mobile. [](https://i.stack.imgur.com/d1U8u.png) Minimum code to reproduce is: ``` import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: ListView( scrollDirection: Axis.horizontal, children: [ Column( children: <Widget>[ Container( width: 100, height: 100, decoration: BoxDecoration( boxShadow: [ BoxShadow(color: Colors.black, blurRadius: 12.0), ], shape: BoxShape.circle, image: DecorationImage( fit: BoxFit.fill, image: NetworkImage( 'https://images.theconversation.com/files/93616/original/image-20150902-6700-t2axrz.jpg?ixlib=rb-1.1.0&q=45&auto=format&w=1000&fit=clip')))), ], ) ], ), ), ); } } ``` I tried adding padding to the container but it didn't help, not sure what else to do.
Circular BoxDecoration shadow gets cut in a box shape on web, not on mobile
CC BY-SA 4.0
0
2020-03-06T19:27:30.260
2020-03-07T22:46:54.103
2020-03-07T20:57:33.283
7,530,203
7,530,203
[ "flutter", "dart", "flutter-web", "mobile-development" ]
60,585,381
1
null
null
0
799
I want to get into mobile app development using flutter and writing my code on visual studio code but vscode won't detect my android studio virtual device. If you can help how do i fix this? Here is a screenshot of how it is currently [screenshot](https://i.stack.imgur.com/Ka6L5.png)
Visual studio code not detecting virtual device emulator
CC BY-SA 4.0
null
2020-03-08T07:29:47.183
2020-03-08T07:34:32.677
2020-03-08T07:34:32.677
10,049,043
12,029,800
[ "flutter", "visual-studio-code", "adb", "mobile-development" ]
60,687,673
1
null
null
0
314
Very new to Flutter and I am trying to change the background color of multiple ListTiles when they are tapped. The ListTiles are a part of a Drawer and the background color is currently being set by the Container they are inside. I have seen this question asked a lot but and haven't had much luck with the solutions given. Here is some of the code I am working with: ``` Drawer normalDrawer(String route){ return Drawer( child: ListView( padding: EdgeInsets.zero, children: <Widget>[ Container( color: Colors.green, child: Column( children: <Widget>[ ListTile( leading: Icon(Icons.archive, color: Colors.white), title: Text('Archived', style: TextStyle( color: Colors.white, fontSize: 18.0, fontWeight: FontWeight.w400)), onTap: () { _scaffoldKey.currentState.openEndDrawer(); Navigator.pushNamed( context, "/archived"); }, ), ]), ), ], ), ); } ```
How do you change the background color of a ListTile() on tap?
CC BY-SA 4.0
null
2020-03-14T21:58:11.810
2020-03-14T22:09:42.790
2020-03-14T22:09:42.790
11,842,538
11,842,538
[ "listview", "flutter", "dart", "background-color", "mobile-development" ]
60,695,273
1
null
null
2
1,598
I'm trying to build an IOS application with flutter that uses Google maps. However when I tap the search box and open the keyboard to search for a place the application freezes and I can't even type. This is in a simulator as I don't have a physical iPhone to test it with. I am a flutter beginner and can't tell what is going wrong(suspecting I messed something up). I have researched on this and found that a previous version of flutter had an issue with the IOS keyboard lagging but there was no mention of the application being completely frozen. I commented out onChanged thinking it had something to do with the freeze. ``` class HomePage extends StatefulWidget { @override _HomePageState createState() => _HomePageState(); } class _HomePageState extends State<HomePage> { Completer<GoogleMapController> _controller = Completer(); static const LatLng _center = const LatLng(45.521563, -122.677433); String searchValue = ""; String _mapStyle; @override void initState() { super.initState(); rootBundle.loadString('assets/map_style.txt').then((string) { _mapStyle = string; }); } @override Widget build(BuildContext context) { return CupertinoPageScaffold( navigationBar: CupertinoNavigationBar( backgroundColor: GlobalAppConstants.appMainColor, ), child: GestureDetector( onTap:() { FocusScope.of(context).requestFocus(new FocusNode()); }, child: Stack( children: <Widget>[ Container( child: GoogleMap( initialCameraPosition: CameraPosition(target: _center, zoom: 1.0), mapType: MapType.normal, onMapCreated: (GoogleMapController controller) { controller.setMapStyle(_mapStyle); _controller.complete(controller); }, ), ), Container( color: Color.fromRGBO(255, 255, 255, 0.7), ), Align( alignment: Alignment(0.0, -0.5), child: Column( children: <Widget>[ Text( 'My Text', style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold), ), Container( padding: EdgeInsetsDirectional.only(top: 20.0), ), Text( 'Search Country', style: TextStyle( color: GlobalAppConstants.appMainColor, fontWeight: FontWeight.bold), ), Container( width: 140.0, padding: EdgeInsetsDirectional.only(top: 0.0), child: Divider( thickness: 7.0, color: GlobalAppConstants.appMainColor, ), ), Container( padding: EdgeInsetsDirectional.only( start: 10.0, end: 10.0, top: 10.0), height: 50, child: CupertinoTextField( placeholder: 'Search Country', padding: EdgeInsets.symmetric( horizontal: 10.0, vertical: 0.4), prefix: Container( padding: EdgeInsetsDirectional.only(start: 10.0), child: Icon( CupertinoIcons.search, color: CupertinoColors.black, size: 22.0, ), ), decoration: BoxDecoration( color: CupertinoColors.white, boxShadow: [ BoxShadow( color: CupertinoColors.black, ) ], ), // onChanged: (String value) { //// setState(() { //// searchValue = value; //// }); // }, ), ) ], ), ) ], ), )); } } ``` I did add `<key>io.flutter.embedded_views_preview</key> <string>YES</string>` to my Info.plist file. Which seemed to be of discussion in the forums that I found. Any help would be appreciated. Thanks.
Flutter App freezes when keyboard is launched
CC BY-SA 4.0
null
2020-03-15T16:45:51.153
2020-05-07T17:01:33.583
null
null
8,894,715
[ "ios", "google-maps", "flutter", "mobile-development" ]
60,786,823
1
null
null
0
167
Following is my class MatchData code: ``` class MatchData { String date, team1, team2, time; MatchData({@required this.date, @required this.team1, @required this.team2, @required this.time}); } ``` Following is the Data I want to show in the ListView: ``` final List<MatchData> dayMatch = [ MatchData( date: '12/02/2020', team1: 'Mumbai Indians', team2: 'Bangalore', time: '16:00'), MatchData( date: '12/02/2020', team1: 'Mumbai Indians', team2: 'Bangalore', time: '16:00') ]; match() { return dayMatch; } ``` Following is the body of my Widget: ``` body: Center(child: ListView.builder(itemBuilder: (context, index) { return Card( child: Row( children: <Widget>[ Text(dayMatch[index].date), Text(dayMatch[index].team1), Text(dayMatch[index].time), Text(dayMatch[index].team2), ], ), ); } ```
RangeError (index): Invalid value: Not in range 0..1, inclusive: 2. How can this be fixed?
CC BY-SA 4.0
null
2020-03-21T10:42:07.873
2020-03-21T11:14:20.793
2020-03-21T10:52:34.753
764,624
13,099,204
[ "flutter", "mobile-development" ]
60,805,949
1
null
null
0
118
I'm in the process of creating an app in Android Studio that is integrated with the Pinterest API. Like other services, Pinterest requires users to log into their accounts by redirecting them to their site with certain parameters (response type, scope, client_id, etc). This is what they have as an example for the request to direct users to: ``` https://api.pinterest.com/oauth/? response_type=code& redirect_uri=https://mywebsite.com/connect/pinterest/& client_id=12345& scope=read_public,write_public& state=768uyFys ``` How do I use this to direct users to the Pinterest login page? Is this a GET or POST request I would need to use Retrofit for? Link to Pinterest API documentation: [https://developers.pinterest.com/docs/api](https://developers.pinterest.com/docs/api) Thank you in advance, Hannah
How to redirect users to login to service?
CC BY-SA 4.0
null
2020-03-22T23:02:57.460
2020-03-22T23:49:13.380
null
null
11,031,750
[ "android", "api", "retrofit2", "pinterest", "mobile-development" ]
60,808,004
1
null
null
2
127
I have been trying to get a simple animation to work with PanResponder and the React Animated API. This is what I have so far: ``` export default class Main extends Component { constructor(props) { super(props) this.state = { y: new Animated.Value(0) } this._panResponder = PanResponder.create({ onMoveShouldSetResponderCapture: () => true, onMoveShouldSetPanResponderCapture: () => true, onPanResponderMove: Animated.event([ null, { dy: this.state.y } ]), }); } render() { let { y } = this.state; return ( <View {...this._panResponder.panHandlers} style={{ flex: 1 }} > <LinearGradient start={{ x: 1.0, y: 0 }} end={{ x: 0.0, y: 1.0 }} colors={['rgba(0,187,9,0.575)', 'rgba(255, 217, 0 , 0.719)']} style={{ alignItems: "center", justifyContent: "center", margin: 0, flex: 1, padding: 20, width: "100%" }}> <ResponsiveImage style={{ transform: [{ rotateZ: y + " deg" }, { perspective: 1000 }], marginBottom: 100 }} source={require('./assets/images/logo.png')} initWidth="225" initHeight="220" /> </LinearGradient> </View> ); } } ``` With the code attached above, the rotation animations don't work. It only works when I use the following code in place of the current onPanResponderMove method. ``` onPanResponderMove: (a,b)=>{this.setState({y: b.dy}) } ``` Why does the Animated.Event method not work?
How to use PanResponder with Animated values?
CC BY-SA 4.0
null
2020-03-23T04:38:05.663
2020-03-23T04:38:05.663
null
null
5,768,454
[ "javascript", "react-native", "mobile-development", "react-animated" ]
60,813,580
1
null
null
0
43
I want to add images to the ViewHolder. I do everything in method onBIndViewHolder(). I get String variable path from db, try to parse it by Uri and setImageUri, but it doesn't work. For debuggind I log path to the console. ``` String imgPath = images.get(position); Log.d("imgTag", imgPath); Uri imageURI = Uri.parse(imgPath); //holder.image.setImageURI(imageURI); ``` Path of the image from log: ``` /document/image:46277 ``` If I set image by setImageResource() it works fine, but I need from URI.
Can't setImageURI(). Why?
CC BY-SA 4.0
null
2020-03-23T12:28:08.803
2020-03-23T12:28:08.803
null
null
null
[ "android", "mobile", "mobile-development" ]
60,839,032
1
60,839,126
null
3
2,353
I am having trouble figuring out how to solve this error. It says "Missing Default Constructor" in the MainPage.xaml file. I would gratefully appreciate the help! : contains the navigation menus. ``` <?xml version="1.0" encoding="utf-8"?> <TabbedPage xmlns:tasks="clr-namespace:TaskApp.Tasks" xmlns:notifications="clr-namespace:TaskApp.Notifications" xmlns:account="clr-namespace:TaskApp.Account" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="TaskApp.MainPage"> <NavigationPage Title="Tasks" Icon="tasks.png"> <x:Arguments> <tasks:TaskList /> // <-- THIS IS WHERE THE ERROR OCCURS </x:Arguments> </NavigationPage> <NavigationPage Title="Notifications" Icon="notification.png"> <x:Arguments> <notifications:NotificationList /> </x:Arguments> </NavigationPage> <NavigationPage Title="Account" Icon="account.png"> <x:Arguments> <account:AccountPage /> </x:Arguments> </NavigationPage> </TabbedPage> ``` : is the code-behind file that displays the list of tasks ``` namespace TaskApp.Tasks { public partial class TaskList : ContentPage { public TaskList(string queue) { InitializeComponent(); if (queue != null) queueSlug = queue; NavigationPage.SetBackButtonTitle(this, "Back"); } //Overrides the back button on Android and Window devices protected override bool OnBackButtonPressed() { return true; } } } ``` : is the code-befind file that contains a popup to select a specific task queue such as "Uncompleted tasks, Completed tasks, Overdue tasks, etc." and it will pass the data to TaskList.xaml.cs ``` namespace TaskApp.Popups { public partial class TaskQueues : PopupPage { private const string Url = "..."; private HttpClient _client = new HttpClient(); private ObservableCollection<Queues> _queues; void Handle_SelectedQueue(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e) { var queue = e.SelectedItem as Queues; PopupNavigation.Instance.PopAsync(true); new NavigationPage(new TaskList(queue.Slug)); } public TaskQueues() { InitializeComponent(); } protected override async void OnAppearing() { var content = await _client.GetStringAsync(Url); var queues = JsonConvert.DeserializeObject<List<Queues>>(content); _queues = new ObservableCollection<Queues>(queues); taskQueues.ItemsSource = _queues; // Adjusts the list height and scrollview height int i = _queues.Count; int heightRowList = 50; i = (i * heightRowList); taskQueues.HeightRequest = i; if (i > 400) taskQueuesScrollView.HeightRequest = 400; base.OnAppearing(); } private void ClosePopup(object sender, EventArgs e) { PopupNavigation.Instance.PopAsync(true); } } } ```
Missing Default Constructor error in Xamarin Forms
CC BY-SA 4.0
null
2020-03-24T20:44:51.590
2020-03-24T20:51:54.240
null
null
7,898,341
[ "c#", "xamarin", "xamarin.forms", "constructor", "mobile-development" ]
60,895,570
1
null
null
3
424
I am looking to build a Mobile app using react-native that should be able to find nearby phones with the same app installed. At a highlevel, I am looking for something like this: 1. This app should be able to send a kid of identifier (GUID) via Bluetooth (?) and also listen for signals from other devices in the proximity. 2. Identify the incoming GUID and calculate very rough distance (may be based on signal strength or something like that) I am aware of privacy issues and battery issues with this approach. So any ideas into libraries or approaches to achieve the basic discovery will be helpful. Thank you.
Peer to peer connection using react-native
CC BY-SA 4.0
null
2020-03-27T23:40:15.110
2020-03-29T19:07:33.107
2020-03-29T19:07:33.107
1,868,744
1,868,744
[ "android", "ios", "react-native", "mobile-development" ]
60,975,287
1
null
null
22
59,540
undefined Unable to resolve module `@react-navigation/native` from `App.js`: @react-navigation/native could not be found within the project. If you are sure the module exists, try these steps: ``` 1. Clear watchman watches: watchman watch-del-all 2. Delete node_modules: rm -rf node_modules and run yarn install 3. Reset Metro's cache: yarn start --reset-cache 4. Remove the cache: rm -rf /tmp/metro-* - node_modules\react-native\Libraries\Utilities\HMRClient.js:307:41 in showCompileError - node_modules\react-native\Libraries\Utilities\HMRClient.js:228:26 in client.on$argument_1 - node_modules\eventemitter3\index.js:181:39 in emit - node_modules\metro\src\lib\bundle-modules\WebSocketHMRClient.js:80:20 in _ws.onmessage - node_modules\event-target-shim\dist\event-target-shim.js:818:39 in EventTarget.prototype.dispatchEvent - node_modules\react-native\Libraries\WebSocket\WebSocket.js:232:27 in _eventEmitter.addListener$argument_1 - node_modules\react-native\Libraries\vendor\emitter\EventEmitter.js:190:12 in emit - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:436:47 in __callFunction - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:111:26 in __guard$argument_0 - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:110:17 in __guard$argument_0 * [native code]:null in callFunctionReturnFlushedQueue Unable to resolve "@react-navigation/native" from "App.js" Failed building JavaScript bundle. Unable to resolve "@react-navigation/native" from "App.js" Failed building JavaScript bundle. Unable to resolve "@react-navigation/native" from "App.js" Failed building JavaScript bundle. > Unable to resolve "@react-navigation/native" from "App.js" Unable to resolve "@react-navigation/native" from "App.js" Failed building JavaScript bundle. Error: Can't find react-native in package.json dependencies Error: Can't find react-native in package.json dependencies ``` [](https://i.stack.imgur.com/EZH77.jpg) Please Help Me. Email ID: [email protected]
Unable to resolve "@react-navigation/native" from "App.js" - React Native + How to Solve?
CC BY-SA 4.0
0
2020-04-01T16:04:55.803
2023-01-27T23:40:36.127
2020-12-15T01:52:34.267
7,972,851
9,777,665
[ "react-native", "react-navigation", "mobile-development", "react-navigation-stack", "stack-navigator" ]
60,982,166
1
null
null
0
56
The [documentation](https://docs.nativescript.org/vuejs/ns-ui/ListView/selection) for the RadListView in nativescript says that the `itemSelecting` event "Can be used to cancel the operation". How would such behavior be implemented? I am trying to limit the amount of items selected through this method. I already have implemented the event method and have tried simply deselecting the item but this doesn't work and I feel is very inefficient anyway. ``` onItemSelecting({ index, object }) { if (object.getSelectedItems().length >= maxSelectedItems) { object.deselectItemAt(index); } } ```
Limit number of selected items in RadListView
CC BY-SA 4.0
null
2020-04-01T23:54:39.403
2020-04-02T09:42:53.813
2020-04-02T08:42:00.797
5,699,063
5,699,063
[ "javascript", "vue.js", "frontend", "nativescript", "mobile-development" ]
60,994,113
1
null
null
7
1,446
I am using the navigator function - `navigator.mediaDevices.enumerateDevices()` to get the list of media devices, in my mobile browser application. I am using the below code: ``` navigator.mediaDevices.enumerateDevices().then(function(devices) { console.log("devices", devices); }); ``` I am getting the audio input and audio output devices object values swapped as below: ``` [ { "deviceId": "default", "kind": "audioinput", "label": "Default", "groupId": "41a111f571a1171ca91c5428d2ad8806a66bb6d7c5812f779161151a706641a1" }, { "deviceId": "bbf2c347dbfc70b9e37b16be622c4973a74269c7f53d4162adab0c09614514d1", "kind": "audioinput", "label": "Speakerphone", "groupId": "e8dc20cc0a8dd33f65085c2f06bb8424105eb230c54237c343b8f8ff960559f3" }, { "deviceId": "704cd1e8449390f5bb3fd1615a7637753f4ad019d4e6bb3f7c36690f58f2536d", "kind": "audioinput", "label": "Headset earpiece", "groupId": "1f2f370cbbe3f57fe3a8e901dc8f82c8d751f690520c261b293b1480e7959218" }, { "deviceId": "38f008a97b8fd5ff8d367c336fcb7120fdc499375fb44459980d60395516b955", "kind": "videoinput", "label": "camera2 1, facing front", "groupId": "3b073bb17b0c56c5f8e6f143d6eeebcbfac5ec2ebc8ff2bc852f66745a63c591" }, { "deviceId": "bbf2c347dbfc70b9e37b16be622c4973a74269c7f53d4162adab0c09614514d1", "kind": "videoinput", "label": "camera2 0, facing back", "groupId": "5a8b08633d9b089d234fc7bb0d67fae394e90a4f7948128562251d17408d99d4" }, { "deviceId": "default", "kind": "audiooutput", "label": "Default", "groupId": "default" } ] ``` I have tried this in three other android mobile browsers and it's swapping the values in those devices also. In PC it's working correctly. Why it's swapping those values in mobile browsers? Also, I have checked this webpage to verify - [webrtc input-output devices](https://webrtc.github.io/samples/src/content/devices/input-output/), here it's showing speakerphone in audio input devices list as you can see in the screenshot below. [](https://i.stack.imgur.com/9TWVe.jpg?s=256)
Android Mobile Browser - navigator.mediaDevices.enumerateDevices method returns audio input and output device values swapped
CC BY-SA 4.0
null
2020-04-02T14:35:44.410
2022-08-19T15:52:57.577
2020-07-03T14:52:38.470
1,304,646
3,898,364
[ "javascript", "android", "google-chrome", "webrtc", "mobile-development" ]
61,026,309
1
61,026,851
null
2
1,165
I'm trying to get the splash to match the same shape as my Container that has a FlatButton as its child. When pressed, the splash currently fills a different shape as shown here: [](https://i.stack.imgur.com/EUnFh.png) My code for the widget is below: ``` import 'package:flutter/material.dart'; class RoundedButton extends StatelessWidget { const RoundedButton( {this.buttonColor, this.buttonTitle, @required this.onPressed}); final Color buttonColor; final String buttonTitle; final Function onPressed; @override Widget build(BuildContext context) { return Container( margin: EdgeInsets.symmetric(vertical: 16.0), height: 42.0, width: 200.0, decoration: BoxDecoration( borderRadius: BorderRadius.circular(30.0), color: buttonColor, ), child: FlatButton( onPressed: onPressed, child: Text( buttonTitle, style: TextStyle( color: Colors.white ), ), ), ); } } ```
Splash flows outside of Container/FlatButton - Flutter
CC BY-SA 4.0
null
2020-04-04T09:47:43.710
2020-04-04T10:39:38.880
null
null
11,386,117
[ "android", "ios", "flutter", "dart", "mobile-development" ]
61,098,357
1
null
null
0
116
Error while fetching the data from api using retrofit This is my data in json format I am confusing how to fetch the nested array /object data using retrofit ``` [ { "state": "Kerala", "districtData": [ { "district": "Thrissur", "confirmed": 12, "lastupdatedtime": "", "delta": { "confirmed": 0 } }, { "district": "Alappuzha", "confirmed": 3, "lastupdatedtime": "", "delta": { "confirmed": 0 } }, { "district": "Kasaragod", "confirmed": 156, "lastupdatedtime": "", "delta": { "confirmed": 0 } }, ] } ] My Resopnse Class:-- public class StateDistrictResponse { private String state; private DistrictDataModal[] districtData; public String getState() { return state; } public void setState(String state) { this.state = state; } public DistrictDataModal[] getDistrictData() { return districtData; } public void setDistrictData(DistrictDataModal[] districtData) { this.districtData = districtData; } public StateDistrictResponse(String state, DistrictDataModal[] districtData) { this.state = state; this.districtData = districtData; } } ``` POJO CLASS/MODal CLass of DistrictDataModal::- ``` public class DistrictDataModal { private String district; private String confirmed; private String lastupdatedtime; private DeltaModal delta; public String getDistrict() { return district; } public void setDistrict(String district) { this.district = district; } public String getConfirmed() { return confirmed; } public void setConfirmed(String confirmed) { this.confirmed = confirmed; } public String getLastupdatedtime() { return lastupdatedtime; } public void setLastupdatedtime(String lastupdatedtime) { this.lastupdatedtime = lastupdatedtime; } public DeltaModal getDelta() { return delta; } public void setDelta(DeltaModal delta) { this.delta = delta; } public DistrictDataModal(String district, String confirmed, String lastupdatedtime, DeltaModal delta) { this.district = district; this.confirmed = confirmed; this.lastupdatedtime = lastupdatedtime; this.delta = delta; } } ``` and here my object class Delta ``` public class DeltaModal { private String confirmed; public String getConfirmed() { return confirmed; } public void setConfirmed(String confirmed) { this.confirmed = confirmed; } public DeltaModal(String confirmed) { this.confirmed = confirmed; } } ``` and here retrofit code and i didnt get it how to fetch the data of object :- ``` private void getStateDistrict() { Retrofit retrofit= new Retrofit.Builder() .baseUrl(Apis.ROOT) .addConverterFactory(GsonConverterFactory.create()) .build(); Apis request=retrofit.create(Apis.class); Call<StateDistrictResponse> call=request.getState_Distric_Wise(); call.enqueue(new Callback<StateDistrictResponse>() { @Override public void onResponse(Call<StateDistrictResponse> call, Response<StateDistrictResponse> response) { if (response.isSuccessful()) { try { StateDistrictResponse response1=response.body(); Toast.makeText(StateDistrict.this, ""+response1.getDistrictData()[i].getDelta().getConfirmed(), Toast.LENGTH_SHORT).show(); } catch (Exception e) { Toast.makeText(StateDistrict.this, "Ex:--"+e.toString(), Toast.LENGTH_LONG).show(); } } else { Toast.makeText(StateDistrict.this, "SOrry", Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<StateDistrictResponse> call, Throwable t) { Toast.makeText(StateDistrict.this, "SOrry"+t.toString(), Toast.LENGTH_SHORT).show(); } }); } ```
Error while fetching the data from api using retrofit
CC BY-SA 4.0
null
2020-04-08T10:19:53.357
2020-04-09T11:19:54.557
null
null
9,654,839
[ "android", "android-studio", "retrofit", "android-volley", "mobile-development" ]
61,197,962
1
null
null
0
50
I have a website that's using an AnalyserNode for an audio element on a website. Works on desktop, but it doesn't show on mobile. I can't seem to figure out how to debug any issues. iOS simulator doesn't seem to show any errors either. Chrome's mobile emulator doesn't show any issues either. How do you guys debug mobile issues with Web Audio API / Analyser? Thanks in advance! The site: [Pine Project Music](https://pineprojectmusic.com)
Web Audio API issues on mobile (can't seem to debug issues)
CC BY-SA 4.0
null
2020-04-13T22:41:55.143
2020-04-13T22:41:55.143
null
null
6,398,263
[ "javascript", "web-audio-api", "mobile-development" ]
61,201,406
1
null
null
3
688
I'm developing a Flutter app in which I need to open a video from my app on the TikTok app's upload page. After checking if the app is installed, I'm not quite sure how the intent should be written. Is it even possible to achieve this?
Open TikTok from Flutter app using an intent
CC BY-SA 4.0
0
2020-04-14T05:45:35.333
2020-04-14T05:45:35.333
null
null
9,931,364
[ "flutter", "android-intent", "dart", "mobile-development" ]
61,297,140
1
61,298,142
null
0
92
I’m making an application for iOS, I plan to release it in the App Store soon. The question arose - how to promote it correctly? Catch up with the audience? How to form the content initially, given that the application is something like a message board, respectively, if people download it, but it is empty, it does not fit. And is it better to launch it first in one city or in several? If anyone has such experience, I will be very grateful for the advice and answers.
How promote the application in AppStrore?
CC BY-SA 4.0
null
2020-04-18T22:30:11.043
2020-04-19T00:40:04.633
null
null
12,396,212
[ "ios", "app-store", "mobile-development" ]
61,314,332
1
null
null
0
413
I am writing a widget for a Flutter mobile app and I have written a function to fetch weather information from an API. The API functions is an async function, that uses await to go back and get the information after the API call returns. Here is the simplest code possible. ``` Future<Int> getTemp() async { // get api call return temp } class TempTextState extends State<WeatherData> { @override Widget build(BuildContext context) async { return Text(await getTemp()); } } ``` This seems like it would work, but then I realize that async functions must return Futures, and build returns a Widget, not a FutureWidget. I want to use asynchronous functions to fetch data for me, but I can't think of a way to use async functions in a non-async function. How do I escape async hell?
How to define asynchronous build functions in Flutter?
CC BY-SA 4.0
null
2020-04-20T02:39:31.320
2020-04-20T02:58:37.417
null
null
null
[ "flutter", "asynchronous", "dart", "async-await", "mobile-development" ]
61,318,123
1
null
null
2
2,353
Is there any way to access the details of apps installed in the device and access its privacy permission details (ex: how much access the GMAIL have in our device?) from the flutter app?
How to access device apps from flutter
CC BY-SA 4.0
null
2020-04-20T08:30:04.943
2020-09-21T01:51:25.183
null
null
10,601,286
[ "android", "ios", "flutter", "mobile-development" ]
61,374,618
1
null
null
0
142
I recently updated my VS 2017 Enterprise which may be an issue but I can't understand why I'm having errors with this. I have android studio installed and installed the APK using android studio. Visual studio is pointed towards the apk that I installed using android studio. But everytime I try to debug my app, whether using a physical device or emulator, I get an error; "Could not find android.jar for API level". And when I try in VS2019 enterprise edition, I get a couple errors: "Invalid value 'armeabi' in $(AndroidSupportedAbis). This ABI is no longer supported. " and also something like "java.exe exited with code 2" or something like that. I have tried in VS going to Tools > Android > Android SDK Manager and pointing the SDK location to an empty folder and selecting Android 8.0, 8.1, 9.0 and having it install but after it is done installing its like Visual Studio doesn't find it to be a sufficient APK. I don't understand. Also when I navigate to where my APK is located (the one installed by Android Studio) there are 3 'platforms' and each one has an android.jar file. So not sure why VS cant recognize that. Also I am always running as Admin.
I can't get Xamarin to debug my android application -- missing android.jar?
CC BY-SA 4.0
null
2020-04-22T20:32:43.217
2020-04-22T20:32:43.217
null
null
9,351,471
[ "android", "visual-studio", "xamarin", "xamarin.android", "mobile-development" ]
61,522,940
1
null
null
1
1,980
I'm building a shopping app in Flutter using MVC pattern and mobx for app state management. At the moment, I have a mobx store for cart items and one store for the cart controller. The cart controller has a ObservableList of cart items and problem is that I don't know if there's a way of observing changes on cart items. For instance, I'd like to observe cartItem.title or cartItem.total. Is there a way to track this with ObservableList? And whats is .observe() method the observable list has? (Think the documentation wasn't clear for me) As I said I have to mobx sotres, one for the cart item and for the cart itself. ``` import 'package:mobx/mobx.dart'; part 'cart-item.model.g.dart'; class CartItemModel = _CartItemModel with _$CartItemModel; abstract class _CartItemModel with Store { int id; String title; String price; String description; @observable int _quantity = 0; @observable double _total = 0; _CartItemModel({ this.id, this.title, this.price, this.description, }) { reaction( (_) => _quantity, (quantity) { getTotal(); }, ); } getItemQuantity() => _quantity.toString(); // Return item quantity @action increase() { // Increase item quantity if (_quantity <= 99) { _quantity++; } } @action decrease() { // Decrease item quantity if (_quantity > 0) { _quantity--; } } @action getTotal() { // Return total price by item quantity _total = double.parse(price) * _quantity; return _total.toString(); } } ``` ``` import 'package:faccioo_user_app/models/cart-item.model.dart'; import 'package:mobx/mobx.dart'; part 'cart.controller.g.dart'; class CartController = _CartController with _$CartController; abstract class _CartController with Store { @observable ObservableList<CartItemModel> cartItems = ObservableList<CartItemModel>(); @action addItem(CartItemModel item) { cartItems.insert(0, (item)); item.increase(); } @action removeItem(CartItemModel item) { cartItems.removeWhere((cartItem) => cartItem.id == item.id); getTotal(); } @action getSubtotal() { cartItems.forEach((item) { subtotal = subtotal + double.parse(item.getTotal()); }); return subtotal.toString(); } @action getTotal() { total = (subtotal + shippingFee + serviceFee + change) - discount; return total.toString(); } } ``` The view is not being notified by the changes in cartItem.total, for example?. How do I observe changes in cartItemModel.total from ObservableLis? To be more clear I got this print in which we can see that cart item quantity and total increase, therefore CartItemModel reactivity is working fine, but the cart controller can't track those changes from ObservableList, then the controller is not updating the view. I'd really appreciate links and references from where I can learn more about mobx with Flutter and observable lists. [Cart view with cart item](https://i.stack.imgur.com/oXkdE.png)
How to observe ObservableList item properties changes
CC BY-SA 4.0
null
2020-04-30T12:03:00.090
2022-05-07T05:53:46.293
2020-05-01T01:50:31.380
12,182,785
12,182,785
[ "flutter", "mobx", "mobile-development", "observablelist" ]
61,534,880
1
61,535,320
null
1
707
I have looked at this question on Stack Overflow [Flutter getter isn't specified for the class, when it is specified](https://stackoverflow.com/questions/53340077/flutter-getter-isnt-specified-for-the-class-when-it-is-specified). And I still cannot understand why my class does not have access to the variable which is accessed from an element in the . ``` class Practice extends StatefulWidget { @override _PracticeState createState() => _PracticeState(); } class _PracticeState extends State<Practice>{ int count = 0; @override Widget build(BuildContext context){ List<TagColumn> ok = List.generate(count, (int i) => new TagColumn()); return Scaffold( backgroundColor: Colors.black, body: new LayoutBuilder(builder: (context, constraint){ return new Stack( children: <Widget>[ SingleChildScrollView( child: SafeArea( child: new Wrap( direction: Axis.horizontal, children: ok, ) ), ), new Positioned( child: new Align( alignment: FractionalOffset.bottomRight, child: Container( margin: EdgeInsets.only(bottom: 50.0, right: 40.0), child: RawMaterialButton( onPressed: (){ setState(() { if(count != 0 && ok[count]._text.text.isEmpty){ } else{ count +=1; } }); }, shape: CircleBorder(), child: Icon( Icons.add_circle, size: 100.0, color: Color(0xffd3d3d3), ), ) ) ) ) ], ); }), ); } } class TagColumn extends StatefulWidget{ @override State<StatefulWidget> createState() => new _TagColumn(); } class _TagColumn extends State<TagColumn>{ final _text = TextEditingController(); bool _validate = false; @override Widget build(BuildContext context){ final tagField = TextField( controller: _text, obscureText: false, style: TextStyle(fontFamily: 'Play', color: Colors.white, fontSize: 20), maxLines: null, keyboardType: TextInputType.text, decoration: InputDecoration( contentPadding: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 15.0), hintText: "Tag", errorText: _validate ? 'Value Can\'t be Empty': null, border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0))), ); return Container( width: MediaQuery.of(context).size.width/2 - 40, margin: EdgeInsets.symmetric(horizontal: 20, vertical: 20), decoration: BoxDecoration( color: Colors.blue, borderRadius: BorderRadius.circular(32.0), ), child: Theme( data: ThemeData( hintColor: Colors.white, ), child: tagField, ), ); } } ``` What I am trying to do is not allow the user to create a new tag when pressing, "Plus," in the bottom right corner() if the user doesn't enter text in the current one. In other words, if it's not empty. Thus, I am using the variable , to check if the current tag is empty when pressing the plus button. If not, a new tag is created. [](https://i.stack.imgur.com/wH9Pj.png)
Getter _text isn't defined for class TagColumn in Flutter
CC BY-SA 4.0
null
2020-05-01T00:08:40.967
2020-05-01T01:04:29.753
2020-05-01T00:15:48.000
13,084,169
13,084,169
[ "flutter", "dart", "mobile-development" ]
61,536,321
1
61,536,515
null
-1
294
I am using the variable as a record of the index of my . In my code, there is a plus button. Every time you press it, it is supposed to check, if you answered the previous text field. If you did, a will be created. In other words, a new text field. However, I am getting a , while I am using to update my count. My code: ``` class Practice extends StatefulWidget { @override _PracticeState createState() => _PracticeState(); } class _PracticeState extends State<Practice>{ int count = 0; @override Widget build(BuildContext context){ List<TagColumn> ok = List.generate(count, (int i) => new TagColumn()); return Scaffold( backgroundColor: Colors.black, body: new LayoutBuilder(builder: (context, constraint){ return new Stack( children: <Widget>[ SingleChildScrollView( child: SafeArea( child: new Wrap( direction: Axis.horizontal, children: ok, ) ), ), new Positioned( child: new Align( alignment: FractionalOffset.bottomRight, child: Container( margin: EdgeInsets.only(bottom: 50.0, right: 40.0), child: RawMaterialButton( onPressed: (){ setState(() { if(count != 0 && ok[count].text.text.isEmpty){ } else{ count ++; } }); }, shape: CircleBorder(), child: Icon( Icons.add_circle, size: 100.0, color: Color(0xffd3d3d3), ), ) ) ) ) ], ); }), ); } } ``` The error: ``` RangeError (index): Invalid value: Only valid value is 0: 1 ``` If you need more context, here is a previous question I had about an early error in my code: [Getter _text isn't defined for class TagColumn in Flutter](https://stackoverflow.com/questions/61534880/getter-text-isnt-defined-for-class-tagcolumn-in-flutter/61535320#61535320)
RangeError in List flutter
CC BY-SA 4.0
null
2020-05-01T03:20:19.097
2020-05-01T03:43:45.080
null
null
13,084,169
[ "flutter", "dart", "mobile-development" ]
61,586,468
1
61,586,796
null
0
1,549
I am working on a mobile application in `Expo` and after I reached to 30 percent of progress in my project, I realized that I can not use `Mapbox` libraries with `Expo`. So My question is that, if I reject from `Expo` and write my `Mapbox` related codes in `React Native`, after that can I come back again to `Expo` to develop the rest of the project in that?
Eject from Expo and come back again to it
CC BY-SA 4.0
0
2020-05-04T06:38:00.477
2023-01-11T10:49:15.827
null
null
1,576,427
[ "react-native", "expo", "mobile-development" ]
61,596,835
1
null
null
-3
318
I'm a complete beginner in Flutter. I was wondering whether Flutter is only meant for Front-end UI stuff or can it be used for little more advanced stuff. Maybe something like sockets??
Is flutter only good for UI-related stuff?
CC BY-SA 4.0
null
2020-05-04T16:19:38.097
2020-05-04T17:02:11.373
null
null
10,789,448
[ "flutter", "dart", "websocket", "flutter-layout", "mobile-development" ]
61,668,997
1
null
null
0
220
I want a xamarin application to be able to access current browser data on the device. Xamarin.Essentials will give the platform and os being used, so knowing that is there a way (on ios for example) to access the browser data on the device? Example: what tabs are open
Is there a way to access device browser data with xamarin Forms?
CC BY-SA 4.0
null
2020-05-07T22:41:17.413
2020-05-08T03:16:29.120
null
null
10,773,400
[ "c#", "xamarin", "xamarin.forms", "mobile-development", "xamarin.essentials" ]
61,681,764
1
null
null
0
133
Dear Developers/Experts/Architect I have the following requirements. I am looking for your expert guidance to find out the best way to fulfill the business requirement. ``` 1. List the available Android version with model names in the dropdown. 2. upon choosing a valid device from the list, mirror the device at the local laptop. 3. End-user will perform some action (like configuring WIFI/install app from play store) into a mirrored device. 4. Once step 3 is complete, end-user click on submit 5. End-user action will be recorded and send for verification 6. mirroring section will be running on Windows OS ``` There are external tools available in the market (like Vysar,scrcpy) which can be used. The licensed Vysar version has advanced mirroring and remote mirroring sections features enabled as well. But Business wants us to make our own mirroring system. I am just a beginner in the mobile development area, I would like expert guidance here. Please advise.
Android Device - Remote Mirroring
CC BY-SA 4.0
null
2020-05-08T14:46:41.740
2020-05-08T14:46:41.740
null
null
4,024,448
[ "android", "adb", "remote-debugging", "mobile-development", "screen-recording" ]
61,687,434
1
61,687,789
null
0
430
I started to use React Native recently and, following the oficial docs, I initialized a project using `npx react-native init ProjectName`. I'm not sure if the tools versions matters (probably yes), but i'm using `npm version 6.13.7`, `react-native-cli version 2.0.1` and `react-native 0.62.2`. With that config, the file architecture i that get is the following: [](https://i.stack.imgur.com/DTWv3.png) I seached about it, but i not found an answer. So, can someone please explain to me what is the purpose of each file in this file architecture and which of these files can i remove? Thank you in advance :D
What is the purpose of each file in the React Native file architecture?
CC BY-SA 4.0
null
2020-05-08T20:17:59.437
2020-05-08T22:42:59.227
null
null
10,372,349
[ "reactjs", "react-native", "mobile-development" ]
61,710,396
1
61,711,155
null
2
631
I have been working on a flutter app where the user starts on a stateful widget with a ListView of items from a SQLite database. The user can tap on an item in the list which navigates to a page where the item can be modified and saved. When `Navigator.pop(context)` is used, the app returns to the ListView but doesn't rebuild. The changes made do not show until I force a rebuild (hot reload) This is a new issue in flutter 1.17. ``` class ItemsView extends StatefulWidget { @override _ItemsView State createState() => _ItemsViewState(); } class _ItemsViewState extends State<ItemsView> { @override Widget build(BuildContext context) { return FutureBuilder<List<Story>>( future: DBProvider.db.getAllItems(), builder: (BuildContext context, AsyncSnapshot<List<Story>> snapshot) { if (snapshot.hasData) { return Text(snapshot.data[0]) } } ) } } ``` ``` class ModifyView extends StatefulWidget { @override _ModifyView State createState() => _ItemsViewState(); } class _ItemsViewState extends State<ItemsView> { @override Widget build(BuildContext context) { return FutureBuilder<List<Story>>( future: DBProvider.db.getAllItems(), builder: (BuildContext context, AsyncSnapshot<List<Story>> snapshot) { if (snapshot.hasData) { return Text(snapshot.data[0]) } } ) } } ``` How can I force the widget to reload?
Root widget not rebuilding when popping from child
CC BY-SA 4.0
null
2020-05-10T10:23:45.740
2020-05-11T04:17:23.947
null
null
12,728,339
[ "flutter", "state", "mobile-development", "sqflite" ]
61,725,030
1
null
null
4
474
I faced with a such question for which can not find an answer in google. For example, I have a company which provides some services for customers. And for new users I have a promo/discounts. As we know there are a lot of websites which provide fake number for receiving sms for registration. I need a useful solution to prevent registration with such numbers. I want to check if this number is real or not and allow registration only if real. What is your suggestion/solution ? What would you do or maybe already did something for escaping a such problems. Note: Maybe Some tags are not relevant to this issue, so please inform me and I will remove this tag. Or vice verse, if you have any suggestions related tags please let me know I will add this tag. Thank you in advance.
reveal fake number / prevent fake registration / fake sms
CC BY-SA 4.0
0
2020-05-11T08:09:20.987
2020-05-21T16:57:32.523
2020-05-11T08:18:12.420
11,873,534
11,873,534
[ "database", "security", "backend", "user-registration", "mobile-development" ]
61,789,916
1
62,131,604
null
1
2,672
Expo sdk 37 ``` componentDidMount() { this.registerForPushNotificationsAsync(); this._notificationSubscription = Notifications.addListener(this._handleNotification); } _handleNotification = notification => { Vibration.vibrate(); console.log(notification); console.log(“hello”) this.setState({ notification: notification }); }; ``` When the app is foregrounded the handle function is executed and the console.log is executed but when the app is closed the handle function is not executed at all? Can anyone help?
handling expo push notifications when app is closed
CC BY-SA 4.0
null
2020-05-14T05:26:47.330
2022-03-25T11:46:11.850
null
null
13,231,648
[ "javascript", "react-native", "push-notification", "expo", "mobile-development" ]
61,799,039
1
null
null
1
84
Launching lib\main.dart on Android SDK built for x86 in debug mode... FAILURE: Build failed with an exception. - What went wrong: A problem was found with the configuration of task ':url_launcher:createFullJarDebug'.> File 'C:\Users\Narender\AndroidStudioProjects\the_makeable_app\build\url_launcher\intermediates\runtime_library_classes\debug\classes.jar' specified for property 'libraryInputFile' does not exist.- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.- Get more help at [https://help.gradle.org](https://help.gradle.org) BUILD FAILED in 12s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
flutter url_launcher plugin causing the problem
CC BY-SA 4.0
null
2020-05-14T13:49:49.347
2020-05-14T13:49:49.347
null
null
12,739,705
[ "flutter", "dart", "mobile-development" ]
61,816,184
1
null
null
0
38
How to indicate the sizes of objects and their coordinates when developing a mobile game. For buttons, I tried to indicate a percentage of the screen size (local scrPercentW = display.actualContentWidth / 100) or division of a constant display.contentCenterX (display.contentCenterY). But in the simulator on some devices it’s right, but at some intervals and sizes it’s wrong. For example, I have four buttons on the menu that I need to arrange at the same distance from each other and from the edges of the screen. How should I do it?
Corona SDK distribution and size of objects
CC BY-SA 4.0
null
2020-05-15T09:37:53.893
2020-10-27T14:49:46.527
null
null
13,547,819
[ "lua", "coronasdk", "mobile-development" ]
61,883,247
1
null
null
2
74
I have a mobile-app in stores and my customers have server(web apps + API) in their end. When they are using the app, the user has to enter their server name and login. My customer have different version(web apps+API) of servers. They will use the common mobile app and does support all the kind of version as of now But We are trying to implement the new features/bug fixing in the mobile app. While we are releasing the app in store, all the user gets the latest one but some of users unable to use that app(Breaking completely or some of the functionality) because of the following reason 1) They don't have new API in their servers 2) They don't have changes on the existing API in their servers since we may done some change on the mobile app DB end based on these API or some of the UI fixes alone done(with out change on api and DB) Our expectation The application should work irrespective of all the server version. If they have latest server(Webapps+API), it should show the all the latest fixes or if it is an old, it should so only UI related fixes and need not to show the latest implementation. So what are steps do I need to consider during the development. After analysis, we have planned to implement the server version checking in the code but we don't know how this way is correct and we are thinking the code may get messy because of these checkes. Kindly Guide us.
Mobile apps support - All the server version
CC BY-SA 4.0
null
2020-05-19T04:27:21.037
2020-05-19T04:27:21.037
null
null
430,278
[ "design-patterns", "mobile-application", "mobile-development" ]
61,953,336
1
null
null
1
33
I have a URL which point to a JSON with 6400 elements; I have to take those elements and show them on a Map by creating markers. Since this JSON is quite big I'm wondering which is the best way to manipulate its elements and which is the best way to separate code for a low coupling and high cohesion. I was thinking about using a JSON Library to save all the elements inside an ArrayList and when the map opens, I'll take elements from the ArrayList to create markers. I think that my solution may be expensive and maybe the app will need a lot of time to manipulate all those data. Any suggestion?
Which way is the best to take a json with a huge number of elements and manipulate them?
CC BY-SA 4.0
null
2020-05-22T10:51:39.530
2020-05-22T10:54:12.707
null
null
9,777,131
[ "java", "android", "json", "mobile-development" ]
62,027,646
1
65,341,264
null
0
262
So here is my code : ``` getOutfitsCollectionData(): Promise<any> { let outfitsRef = this.afStore.collection('outfits'); let allOutfits = outfitsRef.snapshotChanges().pipe( map(actions=>{ return actions.map(a=>{ const id = a.payload.doc.id; return id }) }) ) let outfitsID = allOutfits.forEach(outID=>{ console.log(outID) return outID }) return outfitsID } } ``` When I do this part ``` let outfitsID = allOutfits.forEach(outID=>{ console.log(outID) return outID }) ``` The console is giving me this : [console perfect](https://i.stack.imgur.com/20WEP.png) It's exactly what I want, I just want to rename the array and set it as the result of my function but every console.log I put under these lines doesn't do anything so it seems that every line under isn't doing anything. If I'm not clear, tell me guys ! What I'm trying to do is get each documents id of my collection to use it in an other function on the same tab. I think that it might be easier to create a service but I don't really know how to do it. Please don't make me ban one more time, I'm just trying to learn ... It won't be really smart to send me to a really general subject. I'm not just trying to have pro that give a code that works, I want to understand and get better. Thanks for your help guys ! ( BTW sorry for my bad English, I'm French :) ) I tried this code, I don't really understand why when I console.log allOutfits, I'm not getting the good value : ``` async getOutfitsCollectionData(){ let outfitsRef = this.afStore.collection('outfits'); let allOutfits = await outfitsRef.get().toPromise().then((step)=>{ return step.forEach(doc=>{ if (!doc.exists){ console.log('Zut !') }else{ console.log(doc.id) return doc.id } }) }) .catch(err=>{ console.log('Error getting outfits', err) }) console.log(allOutfits) return allOutfits } ```
Angular Firestore - Get document ID as a property to use it again in an other function - Typescript
CC BY-SA 4.0
null
2020-05-26T17:08:37.243
2020-12-17T13:02:38.127
2020-05-26T19:28:21.973
13,470,254
13,470,254
[ "angular", "typescript", "ionic-framework", "google-cloud-firestore", "mobile-development" ]
62,028,868
1
null
null
0
231
This question: [Is it possible to use Python to write cross-platform apps for both iOS and Android?](https://stackoverflow.com/questions/10664196/is-it-possible-to-use-python-to-write-cross-platform-apps-for-both-ios-and-andro) was asked about 7 years ago and I wanted to see if the general consensus on this has changed. I need to make an app that utilizes portrait mode, which is most commonly written using python. However, I need this to run on both IOS and Android platforms. Are there any cross platform frameworks that would be supportive of python for this function of the app?
Can you use Python to write cross-platform apps for both iOS and Android?
CC BY-SA 4.0
null
2020-05-26T18:24:44.953
2020-05-26T18:24:44.953
null
null
11,985,998
[ "python", "cross-platform", "mobile-development" ]
62,119,085
1
null
null
2
662
I'm adding a music-player component/functionality to this react native app. I'm gonna include all the relevant code to give you the best understanding of the setup. In MusicContext.js, the context file that handles the logic for the music player, I have a few State objects for determining which song to play. ``` const initialState = { startMusic: () => null, stopMusic: () => null, soundObject: null, isPlaying: false, currentIndex: 0 } ``` My songs array: ``` mainTheme = new Audio.Sound() mainTheme2 = new Audio.Sound() mainTheme3 = new Audio.Sound() const songs = [ { path: require("../assets/sounds/MainTheme.mp3"), song: mainTheme }, { path: require("../assets/sounds/MainTheme2.mp3"), song: mainTheme2 }, { path: require("../assets/sounds/MainTheme3.mp3"), song: mainTheme3 }, ] ``` currentIndex begins at 0 so the music player will start at songs[0]. The function to start playing the music is as follows: ``` const startMusic = async () => { try { const songToPlay = songs[currentIndex].song // first song in the array of songs const source = songs[currentIndex].path // the path that loadAsync() function needs to load file await songToPlay.loadAsync(source) await songToPlay.playAsync() setSoundObject(songToPlay) setIsPlaying(true) return new Promise(resolve => { songToPlay.setOnPlaybackStatusUpdate(playbackStatus => { if (playbackStatus.didJustFinish) { console.log("Song finished") resolve() } }) }) } catch (error) { console.log(`Error: ${error}`) return } } ``` At this point, soundObject = the song that is playing, and currentIndex = 0. My function for skipping to the next song is: ``` const handleNextTrack = async () => { if (soundObject) { await soundObject.stopAsync() await soundObject.unloadAsync() setSoundObject(null) currentIndex < songs.length - 1 ? (currentIndex += 1) : (currentIndex = 0) setCurrentIndex({ currentIndex }) this.startMusic() } } ``` After that, it goes back to `startMusic()`, except now with the currentIndex being 1, which should play the next song in the array. THE ERROR I'M GETTING is `Possible Unhandled Promise Rejection (id: 5): Error: "currentIndex" is read-only` I tried a few different ways of implementing `handleNextTrack` but it all leads to the same error. ## UPDATE ``` const handlePreviousTrack = async () => { if (soundObject) { await soundObject.stopAsync() await soundObject.unloadAsync() setSoundObject(null) let newIndex = currentIndex newIndex < (songs.length - 1) ? (--newIndex) : (newIndex = 0) setCurrentIndex(newIndex) startMusic() } } const handleNextTrack = async () => { if (soundObject) { await soundObject.stopAsync() await soundObject.unloadAsync() setSoundObject(null) let newIndex = currentIndex newIndex < (songs.length - 1) ? (++newIndex) : (newIndex = 0) setCurrentIndex(newIndex) startMusic() } } ``` Song[0] plays when app opens. <~GOOD Song[0] plays again when I hit `next` <~BAD Song[1] plays only if I hit `next` a second time <~GOOD Song[2] plays if I hit `next` again <~GOOD After that I can cycle through a bit, hitting `previous` and `next` a few times, but it just broke and somehow the soundObject is back to `null`
ReactNative & Expo - Error: "value" is read-only
CC BY-SA 4.0
0
2020-05-31T16:17:42.660
2020-05-31T17:26:27.173
2020-05-31T17:26:27.173
12,418,851
12,418,851
[ "android", "reactjs", "react-native", "expo", "mobile-development" ]
62,122,916
1
null
null
0
31
I am attempting to cycle through sound objects in an Array, using an index value that begins at 0 and increments/decrements depending on whether I press next or back. This is for a music player for react-native using the Expo//expo-av library. I'll include all relevant code. State I have in my Context file: ``` const initialState = { startMusic: () => null, stopMusic: () => null, soundObject: null, isPlaying: false, currentIndex: 0, } useState() const [soundObject, setSoundObject] = useState(initialState.soundObject) const [isPlaying, setIsPlaying] = useState(initialState.isPlaying) const [currentIndex, setCurrentIndex] = useState(initialState.currentIndex) ``` Start Music function ``` const startMusic = async () => { try { const songToPlay = songs[currentIndex].song const source = songs[currentIndex].path await songToPlay.loadAsync(source) await songToPlay.playAsync() setSoundObject(songToPlay) setIsPlaying(true) return new Promise(resolve => { // I made this promise when I was setting a loop to play through music. May not need this anymore songToPlay.setOnPlaybackStatusUpdate(playbackStatus => { if (playbackStatus.didJustFinish) { console.log("Song finished") resolve() } }) }) } catch (error) { console.log(`Error: ${error}`) return } } ``` And finally, the handler functions that are supposed to cycle through songs: ``` const handlePreviousTrack = async () => { if (soundObject) { await soundObject.stopAsync() await soundObject.unloadAsync() // setSoundObject(null) let newIndex = currentIndex newIndex < songs.length - 1 ? newIndex-- : (newIndex = 0) setCurrentIndex(newIndex) startMusic() console.log(currentIndex) } } const handleNextTrack = async () => { if (soundObject) { await soundObject.stopAsync() await soundObject.unloadAsync() // setSoundObject(null) let newIndex = currentIndex newIndex < songs.length - 1 ? newIndex++ : (newIndex = 0) setCurrentIndex(newIndex) startMusic() console.log(currentIndex) } } ``` Cycling through next/previous does not go in order. Sometimes it works, sometimes previous goes to the next song, sometimes pressing next just replays the first song. Am I manipulating the state via currentIndex incorrectly?
ReactNative & Expo: Trouble incrementing/decrementing to cycle through an Array
CC BY-SA 4.0
null
2020-05-31T21:50:36.867
2020-05-31T22:33:17.287
null
null
12,418,851
[ "android", "reactjs", "react-native", "expo", "mobile-development" ]
62,173,356
1
null
null
0
78
I'm trying to plan out a mobile application (iOS) that has to connect to a remote database. After doing some research, I found that I'd have to connect to the DB by using a PHP framework. I learned this from reading multiple articles, but I specifically got my information from this stack overflow question: [How to connect mysql with swift?](https://stackoverflow.com/questions/31468868/how-to-connect-mysql-with-swift) What I'm confused on is how I can set up the URL for the web service. How is this accomplished? Is this some sort of server you pay for? Can you set the URL to be the same as your remote database server? For example, in the last piece of code in the linked stack overflow answer, the user had: ``` //URL to our web service let URL_SAVE_TEAM = "http://192.168.1.103/MyWebService/api/createteam.php" ``` What exactly is this? I think I am misunderstanding a concept here.
Setting up URL for a webservice
CC BY-SA 4.0
null
2020-06-03T12:55:08.587
2020-06-03T13:36:32.250
2020-06-03T13:18:07.000
12,442,587
12,442,587
[ "php", "ios", "swift", "database", "mobile-development" ]
62,187,419
1
null
null
1
1,337
I am facing an issue while I am returning after some time in the App, can anyone help me in this regard? Please find the below crash log. I did some research regarding this issue & I found some questions in StackOverflow and GitHub, but as I am pretty new in React Native/App development I am unable to figure out the way and steps to resolve the issue. [](https://i.stack.imgur.com/i2mIf.jpg) ``` Date/Time: 2020-06-03 21:50:48.8370 +0400 Launch Time: 2020-06-03 21:50:22.7923 +0400 OS Version: iPhone OS 13.4.1 (17E262) Release Type: User Baseband Version: 7.51.01 Report Version: 104 Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d Termination Description: SPRINGBOARD, process-exit watchdog transgression: application<com.bankonus>:5046 exhausted real (wall clock) time allowance of 5.00 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: process-exit | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 1.840 (user 1.840, system 0.000), 18% CPU", | "Elapsed application CPU time (seconds): 0.002, 0% CPU" | ) Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x0000000192f7e77c 0x192f58000 + 157564 1 libdispatch.dylib 0x0000000192df50a8 0x192df3000 + 8360 2 libdispatch.dylib 0x0000000192df4fe8 0x192df3000 + 8168 3 companyName 0x0000000104331b2c 0x1041b0000 + 1579820 4 companyName 0x0000000104373990 0x1041b0000 + 1849744 5 companyName 0x00000001043738f0 0x1041b0000 + 1849584 6 companyName 0x0000000104371d80 0x1041b0000 + 1842560 ``` ``` Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 3 Last Exception Backtrace: 0 CoreFoundation 0x193e945f0 __exceptionPreprocess + 224 1 libobjc.A.dylib 0x193bb6bcc objc_exception_throw + 55 2 CoreFoundation 0x193d98ea8 -[NSObject+ 192168 (NSObject) doesNotRecognizeSelector:] + 139 3 CoreFoundation 0x193e98694 ___forwarding___ + 1315 4 CoreFoundation 0x193e9a5bc _CF_forwarding_prep_0 + 91 5 bankonus 0x102cbd968 0x102ba0000 + 1169768 6 bankonus 0x102cbe120 0x102ba0000 + 1171744 7 CoreFoundation 0x193e9a760 __invoking___ + 143 8 CoreFoundation 0x193d6bb40 -[NSInvocation invoke] + 299 9 CoreFoundation 0x193d6c718 -[NSInvocation invokeWithTarget:] + 75 10 companyName 0x102cef840 0x102ba0000 + 1374272 11 companyName 0x102cf1950 0x102ba0000 + 1382736 12 companyName 0x102cf16b4 0x102ba0000 + 1382068 13 libdispatch.dylib 0x193b599a8 _dispatch_call_block_and_release + 23 14 libdispatch.dylib 0x193b5a524 _dispatch_client_callout + 15 15 libdispatch.dylib 0x193b068a4 _dispatch_lane_serial_drain$VARIANT$mp + 607 16 libdispatch.dylib 0x193b07294 _dispatch_lane_invoke$VARIANT$mp + 415 17 libdispatch.dylib 0x193b1078c _dispatch_workloop_worker_thread + 587 18 libsystem_pthread.dylib 0x193babb74 _pthread_wqthread + 271 19 libsystem_pthread.dylib 0x193bae740 start_wqthread + 7 ```
IOS app crashes: Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
CC BY-SA 4.0
null
2020-06-04T05:27:45.450
2020-06-14T09:32:47.310
2020-06-14T09:32:47.310
9,313,844
9,313,844
[ "ios", "react-native", "react-native-ios", "mobile-development", "ios-app-group" ]
62,232,951
1
62,233,049
null
12
8,816
I have to do a project that includes a mobile app and a web app. So I choose the React.js for the web application and the react-native for the mobile app. Both mobile and web have the same functionalities. If I choose react native for both, is it better or not. As well as I want to know, although the functionalities of mobile and web app are different, is it better to use React Native for both?
Is react-native good for both web development and mobile development
CC BY-SA 4.0
0
2020-06-06T14:16:05.150
2023-01-01T22:04:04.113
2021-04-05T10:59:19.967
12,687,879
12,687,879
[ "reactjs", "react-native", "web", "mobile-development" ]
62,250,089
1
null
null
2
1,223
I want to continuously play music in my app on loop similar to many game apps available on the store. However I am not sure when to initialize the music loop start and how to stop it. I created a class which contains the logic to start and stop the music. Also My App Structure is like this Main.dart Wrapper.dart ### (Here is where I did try initializing Audioplayer this is called to check login so a new instance of the player is created and the music overlaps) >> Signin.dart ### (If not signed in redirects here) >> Home.dart ### (If signed in redirects here) ``` class Music { AudioCache cache; AudioPlayer player; void _playFile() async{ player = await cache.play('my_audio.mp3'); } void _stopFile() { player?.stop(); } } ```
Flutter: How to start playing music in loop using audioplayers package on start of app?
CC BY-SA 4.0
0
2020-06-07T18:47:16.037
2022-10-27T09:51:49.030
2022-10-27T09:51:49.030
10,548,214
10,548,214
[ "android", "flutter", "dart", "flutter-dependencies", "mobile-development" ]
62,345,169
1
null
null
1
1,438
I have tried using plugins available: [flutter_android](https://pub.dev/packages/flutter_android) This includes: Sensor SensorEvent SensorEventListener SensorManager [usb_serial](https://pub.dev/packages/usb_serial) So i need to talk to usb devices however the plugin [usb_serial](https://pub.dev/packages/usb_serial) does not meet my needs since i need to use more than the package provides. Basically i either need to create my own plugin or i need to find a way to expose the native android.hardware.usb to flutter. Need help i don't know what is best or how to do either.
Using android.hardware.usb in Flutter application
CC BY-SA 4.0
0
2020-06-12T13:22:35.847
2021-03-15T13:28:20.183
null
null
13,734,279
[ "android", "flutter", "dart", "mobile-development", "usbserial" ]
62,478,537
1
62,515,613
null
1
1,258
I know this question gets asked a lot, and I'm still having trouble getting the icons to show in my app on ios and android after upgrading my platforms. `cordova --version | 9.0.0 ([email protected])` `cordova platforms | android 8.1.0 ios 5.0.1` Following this [https://cordova.apache.org/docs/en/latest/config_ref/images.html](https://cordova.apache.org/docs/en/latest/config_ref/images.html) my first attempt was to add: `<icon src="res/icon.png" />` After building the app I see the images `Images.xcassets/AppIcon.appiconset`. But the images do not take in the app. Next I generated all the necessary icon sizes and loaded them in `res/icon/android` and `res/icon/ios` and then added the following the icon references to the `config.xml` from the guide above. Run `cordova build ios` and then I see the images `Images.xcassets/AppIcon.appiconset` folder. However still my icon is not set when I run the app in the simulator. When I run `cordova build android` I get a build error: `AAPT: error: resource mipmap/ic_launcher (aka com.project.mine:mipmap/ic_launcher) not found.` Any ideas? Edit: If I got into Xcode General -> App Icon Source and click the arrow to access App Icon. I see the option to manually drag all my icons to the right spot. I see all my icons have a warning: "The app icon set "AppIcon" has 22 unassigned children". It looks like I can resize my images manually and drag them correctly. I'm wondering if there is a automatic way to do this?
How to set icon in Cordova?
CC BY-SA 4.0
null
2020-06-19T21:05:20.310
2020-06-22T13:29:44.687
2020-06-19T21:14:18.367
9,536,031
9,536,031
[ "android", "ios", "cordova", "mobile-development" ]
62,498,222
1
null
null
0
123
I have 3 section, one is ClassList widget which contains Dismissible widgets. ClassList has the _refreshGPA function parameter which is called the setState() method for rebuild the screen. So, when onDismissed fired, _refreshGPA method called by the ClassList widget and list item removed correctly. Every thing is working. ``` body: Column( children: <Widget>[ _buildClassForm(context), GPAHeader(gpa: gpa), ClassList(_classList, _refreshGPA), ], ), ``` So, I try to make a layout for lanscape mode by using OrientationBuilder. I implement two method for each layout mode. But now, list items doesn't removed in both layout mode. ``` body: OrientationBuilder( builder: (context, orientation) { if (orientation == Orientation.portrait) { return _bodyPortraitMode(context); } else { return _bodyLandscapeMode(context); } }, ), Widget _bodyPortraitMode(BuildContext context) { return Container( child: Column( children: <Widget>[ _buildClassForm(context), GPAHeader(gpa: gpa), ClassList(_classList, _refreshGPA), ], ), ); Widget _bodyLandscapeMode(BuildContext context) { return Container( child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Expanded( child: _buildClassForm(context), flex: 1, ), Expanded( child: Column( children: <Widget>[ GPAHeader(gpa: gpa), ClassList(_classList, _refreshGPA), ], ), flex: 1, ) ], ), ); ``` I tryed theese two method alone by passing to body, and working fine. But when wraped by OrientationBuilder list item doesn't removed. Thank you for any helping! And sorry my spelling mistake, eng. doesn't my main lanuage.
Flutter Dismissable widget onDismissed doesn't fire
CC BY-SA 4.0
null
2020-06-21T12:01:13.043
2020-06-26T23:24:12.463
2020-06-21T12:12:40.177
6,763,544
5,999,253
[ "flutter", "landscape", "mobile-development" ]
62,561,446
1
null
null
1
1,264
I'm trying to implement a checkbox while fetching the data API from the backend but the issue that I encountered is that all the checkbox are checked and I'm unable to uncheck it and also how can I pass the selected checked checkbox as a param to the next component. I hope I could get some help. This is what I have in my current codes; ``` class Gifts extends Component { constructor(props){ super(props); this.state={ users:'', checked: {}, selected: 0 } } ``` API code for handle checkbox ``` handleChange = (index) => { let { checked } = this.state; checked[index] = !checked[index]; this.setState({ checked }); } onPress(value) { this.setState({ selected: value }); } render() { let { navigation } = this.props return ( <SafeAreaView style={{flex:1 }}> <View style={{ flex:1,justifyContent: 'center'}}> //...codes..// <View style={styles.userlist}> <FlatList data={this.state.users} keyExtractor={(item ,index) => index.toString()} renderItem={({ item }) => ( <FlatList data={item.friendList} renderItem={({ item }) => <View style= {{flexDirection:'row', justifyContent:'space-between'}}> <Text style={{marginTop:20, marginLeft:10, fontSize: 20}}>{item.name}</Text> <CheckBox center checkedIcon='dot-circle-o' uncheckedIcon='circle-o' checked={this.state.checked} value={ this.state.checked[item.flag]} onPress={this.onPress} /> </View> } keyExtractor={(item ,index) => index.toString()} ItemSeparatorComponent ={this.ItemSeparator} /> )} /> </View> <Button rounded // disabled={true} //onPress={} style={{width: 100, justifyContent: 'center',marginLeft:150}} > <Text>Send</Text> </Button> </View> </SafeAreaView> ); } } ```
How to implement checkbox in FlatList React Native
CC BY-SA 4.0
null
2020-06-24T18:07:13.500
2020-06-25T09:00:24.713
2020-06-25T00:54:48.367
7,713,920
13,030,335
[ "android", "ios", "react-native", "mobile-application", "mobile-development" ]
62,563,286
1
null
null
0
27
I am working on an app that allows users perform some financial transactions, but i need to build receipt from the API response, this receipt needs to be saved as an image on the user device. I am currently programmatically taking the screenshot of the final page but this is not enough as the details are incomplete, on clicking on the save button of the final success dialog, I need to get some details from the response body and dynamically create a receipt that will be saved on the user device for reference, I see some financial institution mobile application do this and i know it is possible. I tried making few researches and i read about Android PdfDocument API [here](https://developer.android.com/reference/android/graphics/pdf/PdfDocument.html). But it won't solve my problem as i need this details to go into an image not a pdf file. Any reference, idea, or code snippet would be appreciated. Thank you in anticipation.
Android Creating an image from an API response
CC BY-SA 4.0
null
2020-06-24T20:09:44.467
2020-06-24T20:09:44.467
null
null
4,135,065
[ "android", "image", "mobile-development", "receipt" ]
62,566,596
1
null
null
0
64
I have 3 view controllers. ViewcontrollerA is child of ViewcontrollerB I want to add ViewControllerB as a child of ViewcontrollerC. Inside ViewcontrollerC.m ``` ViewcontrollerC.view = ViewcontrollerB.view; [self addChildViewController:ViewcontrollerB]; [self.view addSubview:ViewcontrollerB.view]; [ViewcontrollerB didMoveToParentViewController:self]; ``` It gives me this error Thread 1: Exception: "child view controller:<ViewcontrollerA: 0x7fee59454a60> should have parent view controller:<ViewcontrollerC: 0x7fee5962f670> but actual parent is:<ViewcontrollerB: 0x7fee694510f0>"
How do I add a view controller that already has a parent controller as a child of another view controller
CC BY-SA 4.0
null
2020-06-25T01:41:34.763
2020-06-25T19:34:17.153
2020-06-25T19:34:17.153
48,660
11,061,535
[ "ios", "objective-c", "xcode", "uikit", "mobile-development" ]
62,574,579
1
null
null
4
4,327
I am using Google Places API in my android app to retrieve locations of nearby places such as schools or hospital & display their locations on the map.Now 3 weeks ago I enabled the api & integrated it with my app WITHOUT ENABLING BILLING and all requests were accepted & the api returned the locations.But when I used the app yesterday the api didn't return the locations & instead returned the message saying that request was denied & I had to enable billing in my Google account. Now my query is why was I able to use that api without enabling billing for 20 days while I am unable to do it now.Is there a certain period till which requests are accepted without billing?I also tried regenerating the key & disabling & re-enabling the api but nothing worked.I can't use a credit card to enable billing since I don't have one.Thanks in advance for any help.
Can Google Places API be used without enabling billing?
CC BY-SA 4.0
null
2020-06-25T11:46:54.027
2020-06-25T12:14:25.207
null
null
13,440,550
[ "java", "android", "android-studio", "mobile", "mobile-development" ]
62,586,220
1
null
null
-1
27
I am able to manipulate the content of ViewControllerA that has ViewA. I do not want to edit the content of ViewControllerB for a couple of reasons. Under my view hierarchy, ViewA contains ViewControllerB which has ViewB. How do I get viewB. If I get it, I'd like to resize it which I can do but I can't seem to get it. This current code gives me viewA. ``` ViewA = ViewControllerA.view ``` How do I get ViewB?
How do get a view from a view that has another view controller with a view
CC BY-SA 4.0
null
2020-06-26T00:24:33.083
2020-07-07T02:39:56.820
2020-07-07T02:39:56.820
11,061,535
11,061,535
[ "ios", "objective-c", "computer-science", "mobile-development" ]
62,591,917
1
null
null
1
505
[this is an example of the list](https://i.stack.imgur.com/1TNnp.png) I want to view this list without typing any letter, is it possible? i am using Mac not Windows
how can I view the list of arguments that a flutter widget accepts in android studio?
CC BY-SA 4.0
null
2020-06-26T09:32:34.137
2020-06-26T10:47:01.200
2020-06-26T10:21:43.970
11,419,940
11,419,940
[ "android-studio", "flutter", "mobile-development" ]
62,602,112
1
null
null
0
812
I know this has been asked numerous of times, but apparently all guides are for Java. I need to create a video background for my app in Kotlin. I created a VideoView in the XML and gave it the id: bgVideoView. On the main activity, right below the setContentView(...) line, I wrote the following two lines (I copied the path from the video itself, it didn't worked, so I made a URI (See after the two lines)): ``` bgVideoView.setVideoPath("src/main/res/raw/emiratesbackground.mp4"); bgVideoView.start(); ``` On the phone however, I am getting the error: Sorry, this video cannot be played. Any idea what I might be doing wrong? Many thanks! It's worth mentioning that other questions cover the topic for Java. But something in the syntax of Kotlin, makes things difficult for me. For instance the following line of code is apparently invalid in Kotlin. ``` private MediaPlayer mp = null; ``` Followed the tips provided I wrote the following code, but I still can't play the video: ``` val videoUri = Uri.parse("android.resource://org.android.com.example.flightmobileapp/raw/emiratesbackground"); And overall, my code looks like that: package com.example.flightmobileapp import android.net.Uri import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log.e import android.widget.VideoView import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val videoUri = Uri.parse("android.resource://org.android.com.example.flightmobileapp/raw/emiratesbackground"); bgVideoView.setVideoURI(videoUri); bgVideoView.start(); } } ```
How to create a video background for my app in Kotlin? setVideoURI and setVideoPath are not working
CC BY-SA 4.0
null
2020-06-26T20:05:01.433
2020-06-28T15:29:35.367
2020-06-26T21:00:47.213
13,305,980
13,305,980
[ "android", "kotlin", "mobile-development" ]
62,650,675
1
62,669,420
null
0
523
I created a game using p5js, works fine on the desktop. I need help in making the game mobile compatible. Trying using thunkable and the game is displaying, but not great also the keys are not working. Below is my game URL on GitHub url. [https://crazylegoid.github.io/The-Treasure-of-King-Arthur-2/](https://crazylegoid.github.io/The-Treasure-of-King-Arthur-2/) I need suggestions or samples.
how to enable mobile tapping and arrow keys using p5js
CC BY-SA 4.0
null
2020-06-30T05:11:23.047
2020-07-01T04:06:09.830
null
null
13,830,096
[ "javascript", "p5.js", "mobile-development" ]
62,696,529
1
62,708,653
null
0
77
I have 2 classes with change notifier, Product which declares each product and ProductProvider which includes a list of products and some methods. I created a GridView of Products using this code. ``` class GridList extends StatelessWidget { @override Widget build(BuildContext context) { final productsData = Provider.of<ProductsProvider>(context); final products = productsData.items; return GridView.builder( padding: const EdgeInsets.all(10.0), itemCount: products.length, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, childAspectRatio: 1, crossAxisSpacing: 10.0, mainAxisSpacing: 10.0), itemBuilder: (ctx, i) { return ChangeNotifierProvider( create: (c) => products[i], child: ProductItem(), ); }); } } ``` in the ProductItem() I have some widgets but most importantly, I have an Icon button that adds the product to Favorite and a button that pushes to the product details screen. ``` void toggleFavoriteStatus() { isFavorite = !isFavorite; notifyListeners(); } IconButton( icon: Icon( product.isFavorite ? Icons.favorite : Icons.favorite_border), color: Theme.of(context).accentColor, onPressed: () { product.toggleFavoriteStatus(); }, ), onTap: () { Navigator.pushNamed(context, ProductDetailsScreen.routeName, arguments: product.id); }, ``` The icon does change fine on the productItem(), I want to have the same behavior in the ProductDetailsScreen, how can I do this?
listening to changes in nested providers
CC BY-SA 4.0
null
2020-07-02T12:38:58.217
2020-07-03T04:45:09.553
2020-07-02T13:04:34.177
11,419,940
11,419,940
[ "flutter", "provider", "mobile-development" ]
62,708,949
1
62,712,422
null
0
2,193
I am currently using Flappy Search Bar for my Flutter app. I got the search right, but I can't seem to find a example of customizing the for Flappy Search Bar. I am trying to do a sort function, and the Flappy library says will do the job. Any I can refer to? It would be better if anyone has some code they did regarding this controller that I can learn from. Any help would be much appreciated, Thanks in advance ;)
Customizing searchBarController in Flappy Search Bar Flutter
CC BY-SA 4.0
null
2020-07-03T05:19:59.520
2020-07-03T09:24:39.043
null
null
12,315,946
[ "flutter", "mobile-development" ]
62,714,157
1
62,714,229
null
0
303
I am currently working on a mobile app using Flutter. After finishing the project I would like to make it possible to publish it privately, which means that only specific users who, for example, received a link, are able to use the app. I know there's already a similar question but I would like to know what's your experience with the topic. What are the best solutions for this?
Flutter - Publish Privately
CC BY-SA 4.0
null
2020-07-03T11:07:30.830
2020-07-03T11:59:49.263
null
null
11,461,005
[ "flutter", "publish", "mobile-development" ]
62,748,213
1
62,748,499
null
3
6,539
I was experimenting with bottom navigation bar in flutter. Again, very new to flutter. Can I use custom svg icons instead of the icons provided by flutter's material in BottomNavigationBarItem. It would be amazing if you could help me out with a code snippet. I have this type of navbar I am working on right now.[enter image description here](https://i.stack.imgur.com/dNntw.png). I have these custom icons but I don't know how to use them.
Flutter bottom nav bar
CC BY-SA 4.0
null
2020-07-06T01:53:46.727
2020-09-09T23:41:27.400
null
null
13,789,467
[ "flutter", "flutter-layout", "mobile-development" ]
62,764,571
1
null
null
0
2,102
I have the following variables set. registerUser is the graphQL api call. I want $name, $password,$premium and $email to be dynamic variables which is determined when a button is pressed (Sign up). This code is all in a stateful widget. ``` String name; String password = ""; bool premium = false; String email = "dasa"; String registerUser = ''' mutation { addUserManual(name:"$name",password:"$password",premium:$premium,email:"$email"){ userid } } ''' ``` Then I define a mutation per graphql_flutter plugin like this. In runmutation({.. the mutation sent to the server is that of the initial defined variables above, it does not send the most recent query. Does anyone know how update the vvalue from the fields and then insert this into the query?. ``` child: Mutation(options: MutationOptions( documentNode: gql(registerUser), update: (Cache cache, QueryResult result) { return cache; }, // or do something with the result.data on completion onCompleted: (dynamic resultData) { print(resultData); }, ), builder: (RunMutation runMutation, QueryResult result){ return RaisedButton( elevation: 5, onPressed: () { //FIX LATER print(result.data); runMutation({'name':"hi",'password':"test",'premium':false,'email':"blabla"}); }, child: Text('SIGN UP'), color: Colors.white, shape: RoundedRectangleBorder(borderRadius: new BorderRadius.circular(30.0)), ); }) ```
Flutter graphql query, variables will not update, not sending the latest query
CC BY-SA 4.0
null
2020-07-06T21:10:33.177
2020-07-07T03:42:13.197
null
null
11,557,424
[ "flutter", "graphql", "mobile-development" ]
62,806,857
1
null
null
0
53
So I have a collection view with 12 cells. I initially set the content of all these 12 cells with an image. Without the user tapping the cells, I am wondering how I can change the content of any of these cells. I know there is didSelectItemAtIndexPath but I expect I can make a change here only after user interaction with this cell but what I want to do here is a little different. Thanks in advance and will appreciate very helpful responses.
How do I change the content of a collection view cell without tapping it in Objective C
CC BY-SA 4.0
null
2020-07-09T03:20:03.187
2020-07-09T11:25:10.060
null
null
11,061,535
[ "ios", "objective-c", "uicollectionview", "uicollectionviewcell", "mobile-development" ]
62,849,194
1
null
null
2
166
I'm new to mobile development and something really crucial got me curious. Suppose I want to present a picture on 100% width and height of the screen. Which size should the picture be so I could present it on every mobile phone, optimally? What are the common strategies to deal with this problem? Thanks
How to present the same picture over different devices?
CC BY-SA 4.0
0
2020-07-11T12:32:51.830
2020-07-11T13:20:29.207
null
null
10,255,450
[ "javascript", "reactjs", "react-native", "screen-resolution", "mobile-development" ]
62,967,241
1
null
null
0
1,091
I have install cocoa pod using "sudo gem install cocoapods" command. cocoapods installation seems fine. Then I ran "pod install" command and below is the output on my terminal. ``` Muqiturs-MBP:ios muqiturrehman$ pod install Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration Detected React Native module pods for RNCAsyncStorage, RNCMaskedView, RNFBApp, RNGestureHandler, RNReanimated, RNSVG, RNScreens, RNVectorIcons, react-native-camera, react-native-checkbox, react-native-document-picker, react-native-notifications, react-native-safe-area-context, and react-native-splash-screen Analyzing dependencies Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec` Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec` Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec` Downloading dependencies Installing DoubleConversion (1.1.6) Installing FBLazyVector (0.61.5) Installing FBReactNativeSpec (0.61.5) Installing Firebase (6.25.0) Installing FirebaseAnalytics (6.5.1) Installing FirebaseAnalyticsInterop (1.5.0) Installing FirebaseCore (6.7.1) Installing FirebaseCoreDiagnostics (1.5.0) Installing FirebaseCoreDiagnosticsInterop (1.2.0) Installing FirebaseInstallations (1.3.0) Installing FirebaseInstanceID (4.3.4) Installing FirebaseMessaging (4.4.1) Installing Folly (2018.10.22.00) Installing GoogleAppMeasurement (6.5.1) Installing GoogleDataTransport (7.0.0) Installing GoogleUtilities (6.7.0) Installing PromisesObjC (1.2.9) Installing Protobuf (3.12.0) Installing RCTRequired (0.61.5) Installing RCTTypeSafety (0.61.5) Installing RNCAsyncStorage (1.8.1) Installing RNCMaskedView (0.1.7) Installing RNFBApp (7.2.1) Installing RNFBMessaging (7.1.6) Installing RNGestureHandler (1.6.0) Installing RNReanimated (1.7.0) Installing RNSVG (12.1.0) Installing RNScreens (2.3.0) Installing RNVectorIcons (6.6.0) Installing React (0.61.5) Installing React-Core (0.61.5) Installing React-CoreModules (0.61.5) Installing React-RCTActionSheet (0.61.5) Installing React-RCTAnimation (0.61.5) Installing React-RCTBlob (0.61.5) Installing React-RCTImage (0.61.5) Installing React-RCTLinking (0.61.5) Installing React-RCTNetwork (0.61.5) Installing React-RCTSettings (0.61.5) Installing React-RCTText (0.61.5) Installing React-RCTVibration (0.61.5) Installing React-cxxreact (0.61.5) Installing React-jsi (0.61.5) Installing React-jsiexecutor (0.61.5) Installing React-jsinspector (0.61.5) Installing ReactCommon (0.61.5) Installing Yoga (1.14.0) Installing boost-for-react-native (1.63.0) ``` Till above its seems fine but probably "Installing glog (0.3.5)" is a problem. and below are those lines. ``` Installing glog (0.3.5) [!] /bin/bash -c set -e #!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. set -e PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}" CURRENT_ARCH="${CURRENT_ARCH}" if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then # Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg. # it's better to rely on platform name as fallback because architecture differs between simulator and device if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then CURRENT_ARCH="x86_64" else CURRENT_ARCH="armv7" fi fi export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)" export CXX="$CC" # Remove automake symlink if it exists if [ -h "test-driver" ]; then rm test-driver fi ./configure --host arm-apple-darwin # Fix build for tvOS cat << EOF >> src/config.h /* Add in so we have Apple Target Conditionals */ #ifdef __APPLE__ #include <TargetConditionals.h> #include <Availability.h> #endif /* Special configuration for AppleTVOS */ #if TARGET_OS_TV #undef HAVE_SYSCALL_H #undef HAVE_SYS_SYSCALL_H #undef OS_MACOSX #endif /* Special configuration for ucontext */ #undef HAVE_UCONTEXT_H #undef PC_FROM_UCONTEXT #if defined(__x86_64__) #define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip #elif defined(__i386__) #define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip #endif EOF # Prepare exported header include EXPORTED_INCLUDE_DIR="exported/glog" mkdir -p exported/glog cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/" checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for arm-apple-darwin-strip... no checking for strip... strip checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot checking whether the C compiler works... no xcrun: error: SDK "iphoneos" cannot be located xcrun: error: SDK "iphoneos" cannot be located xcrun: error: SDK "iphoneos" cannot be located xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos' /Users/muqiturrehman/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing: Unknown `--is-lightweight' option Try `/Users/muqiturrehman/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing --help' for more information configure: WARNING: 'missing' script is too old or missing configure: error: in `/Users/muqiturrehman/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da': configure: error: C compiler cannot create executables See `config.log' for more details ``` Not very sure what is the issue here Please help me solve this.
Issue with "pod install"
CC BY-SA 4.0
0
2020-07-18T10:05:26.123
2021-11-05T13:04:29.357
2021-01-03T16:56:36.217
213,269
10,484,399
[ "ios", "xcode", "cocoapods", "mobile-development" ]