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
50,081,605
1
null
null
2
501
I use a c++ native Library in my Android project, but when Proguard is Enabled, the app crashes. My code in c++ depends on the packagename, so I need to prevent the packagename from being renamed by Proguard. I used this rule so far, but it's not working: ``` -keepclasseswithmembernames class * { native <methods>; } ``` I appreciate you support.
Proguard: How to prevent the renaming of Packagename in Android?
CC BY-SA 3.0
0
2018-04-28T22:25:18.327
2018-04-30T07:40:19.187
2018-04-30T06:09:38.503
7,805,800
7,805,800
[ "java", "android", "proguard", "obfuscation", "mobile-development" ]
50,119,263
1
50,119,312
null
-4
66
[This is when app start[][1]](https://i.stack.imgur.com/faybp.png) [This is after open a Activity or make some action, memory keep up 460mb and more][2][2](https://i.stack.imgur.com/R78xP.png) this is my manifest: ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nexttip.personaltrainer"> <!-- Permisos de la aplicaion --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <application android:allowBackup="true" android:hardwareAccelerated="false" android:largeHeap="true" android:name="android.support.multidex.MultiDexApplication" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:roundIcon="@drawable/ic_launcher" android:supportsRtl="true" android:theme="@style/AppTheme"> <!-- Splash Screen --> <activity android:name=".SplashScreenActivity" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".MainActivity" android:label="@string/app_name" android:theme="@style/AppTheme.NoActionBar" /> <activity android:name=".DonateMainLayout" /> <activity android:name=".VideoListActivity" /> <activity android:name=".VideoActivity" android:screenOrientation="landscape" android:theme="@style/videoPlayer" /> <activity android:name=".RateActivity" /> <meta-data android:name="preloaded_fonts" android:resource="@array/preloaded_fonts" /> <activity android:name=".BMI" /> <activity android:name=".Result_BMI" /> <activity android:name=".Video_Stream" android:screenOrientation="landscape" android:theme="@style/videoStream" /> <activity android:name=".Timer_CountDown" android:theme="@style/AppTheme.Transparent" /> <activity android:name=".ActivityList1" android:label="@string/list1_label" /> <activity android:name=".ActivityList2" android:label="@string/list2_label" /> <activity android:name=".ActivityList3" android:label="@string/list3_label" /> <activity android:name=".ActivityList4" android:label="@string/list4_label" /> <activity android:name=".ActivityList5" android:label="@string/list5_label"> </activity> <activity android:name=".IntroActivity" android:label="@string/intro_title"> </activity> <activity android:name=".TipsActivity" android:label="@string/tips_title"> </activity> <activity android:name=".DietPlanMain" android:label="@string/diet_title"> </activity> </application> </manifest> ``` this is my gradle: ``` apply plugin: 'com.android.application' repositories { maven { url 'https://maven.google.com' } } android { compileSdkVersion 26 defaultConfig { applicationId "com.nexttip.personaltrainer" minSdkVersion 19 targetSdkVersion 26 multiDexEnabled true versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support:design:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' compile 'me.itangqi.waveloadingview:library:0.3.5' compile 'com.android.support:support-compat:26.1.0' compile 'com.android.support:recyclerview-v7:26.1.0' compile 'com.google.firebase:firebase-core:11.8.0' compile 'com.android.support:cardview-v7:26.1.0' compile 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.google.android.gms:play-services-ads:11.8.0' compile 'com.github.bumptech.glide:glide:3.7.0' compile 'com.android.support:multidex:1.0.0' } apply plugin: 'com.google.gms.google-services' ``` In the application I have some videos in an array and others that are loaded from a server, I also use gif images and other resources. I have already compressed the resources to see if I have no problems but when running the application on a mobile with less range, it closes with the memory error insufficient. I use a Samung s7 for tests with 4gb of ram and even so when changing activity makes it slow. Please Help me
My app consumes too much RAM, sometimes closed with java.lang.OutOfMemoryError:
CC BY-SA 3.0
null
2018-05-01T15:29:47.507
2018-05-01T17:53:40.317
2018-05-01T17:53:40.317
2,649,012
9,726,105
[ "java", "android", "xml", "mobile-development" ]
50,144,513
1
null
null
1
5,157
Thanks for reading my post. I just started developing an app in Ionic 3 and there is an issue I ran into. I want to have a box to enter text into. When I use following code, I can enter both single line text as well as multiple line text. `<ion-item> <ion-label>Message</ion-label> <ion-textarea [(ngModel)]="_message" name="message"></ion-textarea> </ion-item>` But the issue is that the size of the box does not change. As I press Enter and type more words, the upper text hides because the view scrolls down. There is still space left in the view and I tried to adjust it, but couldn't. Also, upon doing Google research, I did found a comment mentioning that this is a defect in Ionic Framework. But, I am not sure. Thank You
Ionic 3: Display text in multiple line
CC BY-SA 4.0
null
2018-05-02T22:33:32.443
2018-05-02T23:36:50.220
null
null
9,560,596
[ "ionic-framework", "ionic3", "mobile-development" ]
50,199,076
1
50,199,192
null
0
662
I've created an application with CRNA. After some time I ejected it with "yarn eject" to have a possibility to configure native modules. So now I have a question. Is there any possibility to use "exp publish"? Before ejecting I used expo xde to publish my applications and run them via expo client. Do I have the same functionality with the ejected application? Thanks a lot!
Expo ejected application
CC BY-SA 4.0
null
2018-05-06T11:18:07.537
2018-05-06T11:32:36.673
null
null
7,863,095
[ "react-native", "expo", "mobile-development" ]
50,268,409
1
50,269,383
null
18
43,785
I have a `FlatList` component where I render x number of `TouchableHighlight`. I need all components in the `FlatList` aligned vertically to center. The problem is that if I put `justifyContent: center` in `contentContainerStyle` nothing happens but, if I add `flex: 1` to `contentContainerStyle` I get the result I want. It is cool if I doesn't have to make scroll, but when I have a number of components in the `FlatList` that forces do scroll to see all of it the scroll start in the center of these list and don't let me scroll. These is my code: ``` <FlatList style = {{flex: 0.7, backgroundColor: 'red'}} data = {this.props.actions} contentContainerStyle = {{justifyContent:'center',}} keyExtractor={(item, index) => index} renderItem = {({item, index})=>{ return ( <TouchableHighlight style = {{alignItems: 'center', margin: 8, paddingTop: 8, paddingBottom: 8, //flex: 1, borderColor: ConstantesString.colorGrisFlojito, backgroundColor: '#d7deeb', borderRadius: 10, }} underlayColor = {ConstantesString.colorAzulTouched} onPress = {()=>{ item.action(); }}> <Text style = {{color: '#005288' , textAlign: 'center', fontSize: 20}} > {item.name} </Text> </TouchableHighlight> ) }} /> ``` I don't know if this is a bug or I am just doing bad.
FlatList contentContainerStyle -> justifyContent: 'center' causes issues with scrolling
CC BY-SA 4.0
0
2018-05-10T08:12:18.657
2018-05-10T09:13:38.450
null
null
8,898,886
[ "javascript", "android", "ios", "react-native", "mobile-development" ]
50,280,067
1
null
null
0
13
I want to set it up so users can invite their Facebook friends to join my social media app. Broadly speaking, the app lets users create groups of their friends. It would make things much easier for users if, when they're creating their groups and inviting friends to join, they could see a list of the Facebook groups that they're in and invite friends from within those, rather than just from a list of their Facebook friends in general. Is this something that one can do with the Facebook APIs as they exist currently, or is it even possible to do? Is this information that Facebook would allow me to have? If you were trying to do this sort of integration, how would you go about doing it? Thank you in advance for the help!
If I set my iPhone app to include a Facebook login, can I access information about which Facebook groups users are involved in?
CC BY-SA 4.0
null
2018-05-10T19:19:28.380
2018-05-10T19:19:28.380
null
null
9,772,737
[ "iphone", "facebook", "api", "mobile", "mobile-development" ]
50,430,958
1
null
null
1
186
in other words if I have android device with `android version 4.0.1` can I flash it's system.img to other device have the same android version .if not way infact I tried but I get black screen another question as we know inside the there are the hardware drivers so there is a relation between the kernel and the board. is there arelation between system.img and the hardware ?
Is there a relation between kernel and system.img
CC BY-SA 4.0
null
2018-05-20T01:40:26.743
2018-05-20T05:44:54.890
2018-05-20T05:44:54.890
8,385,855
9,817,483
[ "android", "kernel", "mobile-development" ]
50,439,347
1
50,439,425
null
1
632
I am trying to make keyboard like this [](https://i.stack.imgur.com/MI2Ag.png) but instead I get this [](https://i.stack.imgur.com/mzmh5.png) Each my button is ``` class PinyinButton extends StatelessWidget { final VoidCallback onPressed; final List<String> titles; PinyinButton({this.onPressed, this.titles}); @override Widget build(BuildContext context) { return new SizedBox( width: 30.0, height: 60.0, child: new RaisedButton(onPressed: this.onPressed, child: new Column( children: titles.map((title) => new Text(title)).toList() )) ); } } ``` and apparently each button or other container has some padding, which makes text to wrap early. How to remove this padding
Can inscribe text into buttons in Flutter
CC BY-SA 4.0
null
2018-05-20T21:03:34.120
2018-05-20T21:13:51.503
null
null
258,483
[ "user-interface", "dart", "flutter", "mobile-development" ]
50,456,191
1
null
null
-1
50
I am developing android app using android studio and java. But I found that I have to write code too lengthy. Can any other way to code android app with less line of code.
How to code android app in small line of code?
CC BY-SA 4.0
0
2018-05-21T20:29:03.270
2018-05-21T20:36:30.117
null
null
9,825,042
[ "android", "mobile-development" ]
50,581,885
1
null
null
0
52
In my wallpaper android app I have first activity in which user selects any one image and go to the next activity, and in second activity I show preview of image. It is loading and taking long time. How can I reduce the loading time? on the same network obviously. how can I preload this image? I used Glide as well as Picasso no difference in loading time.
How can i show large image in the starting of activity with minimum time?
CC BY-SA 4.0
null
2018-05-29T10:19:10.973
2018-05-29T12:53:47.553
2018-05-29T12:53:47.553
4,823,977
5,239,734
[ "java", "android", "mobile-development" ]
50,601,322
1
50,601,400
null
-3
22
Nice hybrid framework for both android/ios? I tried `ionic framework` and it's super easy to use but it slow compared to native framework.
Any good frameworks for mobile?
CC BY-SA 4.0
null
2018-05-30T09:38:19.723
2018-05-30T09:41:14.310
null
null
9,844,826
[ "mobile", "mobile-development" ]
50,767,158
1
50,767,425
null
-2
44
What are the basic ways in which i can achieve it?
I want to develop a basic static content displaying Android app
CC BY-SA 4.0
0
2018-06-08T19:18:39.883
2018-06-12T13:50:44.683
2018-06-12T13:50:44.683
9,389,667
9,389,667
[ "android", "sqlite", "firebase-realtime-database", "storage", "mobile-development" ]
50,813,993
1
50,814,122
null
0
304
sorry if this question was asked already, but I didn't find an answer. I'm new to ios development and I already have an android application with an LoginActivity which redirects to an NavigationDrawer Activity when the login is successful. Now I want to create the same functions for my IOS App. Does an IOS solution already exist for this case, or are there any examples? Best regards, Patrick
LoginView and NavigationDrawerController
CC BY-SA 4.0
null
2018-06-12T09:41:28.793
2018-06-12T11:01:52.530
null
null
8,874,363
[ "ios", "swift", "mobile-development" ]
50,860,554
1
50,860,588
null
0
1,348
I'm trying to pass the values of inputs from html to ts file with ngModel. But I get an error. Here is my code, error, and versions. ``` signup.html <ion-content padding> <ion-label color="black" stacked>Ad - Soyad</ion-label> <ion-input type="text" id="name_surname" [(ngModel)]="name" name='name'></ion-input> <ion-label color="black" stacked>Kullanıcı Adı</ion-label> <ion-input type="text" id="username" [(ngModel)]="username" name='username'></ion-input> <ion-label color="black" stacked>Kullanıcı Mail Adresi</ion-label> <ion-input type="email" id="email" [(ngModel)]="email" name='email'></ion-input> <ion-label color="black" stacked>Kullanıcı Şifresi</ion-label> <ion-input type="password" id="password" [(ngModel)]="password" name='password'></ion-input> <ion-label color="black" stacked>Kullanıcı Şifresi - Tekrardan</ion-label> <ion-input type="password" id="password_control" [(ngModel)]="password_control" name='password_control'></ion-input> <ion-label color="black" stacked>Kullanıcı Tipi</ion-label> <ion-input type="text" id="type" [(ngModel)]="type" name='type'></ion-input> <button ion-button full (click)='signupHTTP()' id="signupButton">Giriş Yap</button> </ion-content> ``` And here is my ts file ``` import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-angular'; import { Observable } from 'rxjs/Observable'; import { HttpClient } from '@angular/common/http'; import { RequestServiceProvider } from '../../providers/request-service/request-service'; @IonicPage() @Component({ selector: 'page-signup', templateUrl: 'signup.html', }) export class SignupPage { constructor(public navCtrl: NavController, public navParams: NavParams, public httpClient: HttpClient, private requestService : RequestServiceProvider) { } signupHTTP(){ console.log(this.name); } } ``` [Error Screenshot](https://i.stack.imgur.com/WVPEp.png) [My versions](https://i.stack.imgur.com/MRwKK.png)
How to get ngModel value on Ionic?
CC BY-SA 4.0
null
2018-06-14T15:03:29.280
2018-11-04T14:46:03.950
2018-11-04T14:46:03.950
1,033,581
6,662,327
[ "angular", "ionic3", "hybrid-mobile-app", "angular-ngmodel", "mobile-development" ]
50,902,976
1
null
null
6
4,851
Many third party whatsapp mods are developed with so many cool features like automatic replies, notifications when a person of interest comes online, message timer, etc. When whatsapp hasn't released any source code and with reverse engineering becoming too tough how are these guys able to build such features?
How do people develop WhatsApp mods like GBWhatsapp, etc (with extra features) when the source code of WhatsApp is not available?
CC BY-SA 4.0
0
2018-06-18T05:10:22.170
2022-10-22T13:58:26.520
null
null
4,623,016
[ "android", "whatsapp", "mobile-development", "mod" ]
50,967,188
1
null
null
0
95
I use react-native-navigation to create the navigation in my project, and I need to put the image  instead of the icon and this is my code ``` const startTabs = () => { Navigation.startTabBasedApp({ tabs: [ { screen: "awesome-places.Product", label: "first Icon", title: "first Icon", icon: require("../../../images/006-coffee-cup.png") }, { screen: "awesome-places.Bag", label: "Icon", title: "Icon" } ] }); }; ``` the result is like this with blue color! [](https://i.stack.imgur.com/aGw8Y.png) but the origion image like this : [](https://i.stack.imgur.com/xpC4A.png) and I need to keep the color of the image, so how can I do it?
React Navigation Icon in React Native
CC BY-SA 4.0
null
2018-06-21T11:15:46.980
2018-06-21T12:29:04.323
null
null
7,928,215
[ "javascript", "reactjs", "react-native", "styles", "mobile-development" ]
50,996,821
1
null
null
1
90
I am developing a mobile app, where there is a requests class responsible for sending requests to the server. What is a good practice, to initialize this requests class in the constructor of the classes which access it and then call the functions, or declare the api functions as static so functions can be called with no prior initialization ?
API request good practice
CC BY-SA 4.0
null
2018-06-23T00:01:29.007
2018-06-23T04:00:52.200
null
null
8,413,819
[ "api", "architecture", "dart", "mobile-development" ]
51,071,892
1
51,123,181
null
0
1,511
I am new to app development and have been using the ionic framework to build my app. I am ready to publish, and want to use ionic deploy, as it seems efficient. My question is do I need to upload my app to Apple/play store before I can use Ionic deploy, or can I use ionic deploy when publishing for the first time?
Publishing app with Ionic deploy iOS, and android
CC BY-SA 4.0
null
2018-06-27T21:47:41.987
2018-07-01T12:11:07.707
null
null
5,389,516
[ "ionic-framework", "app-store", "mobile-development" ]
51,090,743
1
null
null
0
25
Is it possible to programm an app that runs in the background and get the information when you open an app, checks if its a special app (f.ex. youtube) and then get a popup/ push? Or does this already exists?
Popup when opening an app
CC BY-SA 4.0
null
2018-06-28T20:25:43.673
2018-06-28T20:25:43.673
null
null
9,871,686
[ "java", "android", "android-studio", "mobile-development" ]
51,275,913
1
51,275,946
null
1
485
I am getting started on Android development and I've had trouble finding answers since I may not know how to word things properly. What I am trying to do is setting all buttons invisible once I click on any button. The easy way out of it is this: ``` Button button1 = findViewById(R.id.button1); Button button2 = findViewById(R.id.button2); Button button3 = findViewById(R.id.button3); Button button4 = findViewById(R.id.button4); setInvisible(button1); setInvisible(button2); setInvisible(button3); setInvisible(button4); ``` However I feel like this goes against the DRY principle of programming. I mean what if there were 100 buttons? After doing some thinking, I imagine I can use a loop and have i be the place holder for the numbers of each button. That way it would loop through every single one. However I am not sure on what methods to use.
How do I efficiently change a property to multiple views/buttons in Android Studio?
CC BY-SA 4.0
null
2018-07-11T01:17:18.857
2021-05-27T13:46:56.230
2021-05-27T13:46:56.230
3,824,919
10,061,975
[ "java", "android", "view", "mobile-development" ]
51,343,567
1
51,343,869
null
6
21,394
I am new to Dart and Flutter and try to append a new item to my ListView. I created a button that increments `this.value` but nothing happens. Am I missing an update call on the UI and is this even the correct approach? Since I return the value of `ListView.builder` directly to the caller of `build` I am not sure how to get the list to add more items. Thanks a lot! ``` class MyList extends State<MyList> { ... int value = 2; @override Widget build(BuildContext context) { return ListView.builder( itemCount: this.value, itemBuilder: (context, index) => this._buildRow(index) ); ``` Is calling `setState` the correct way to trigger an UI update?
Append items dynamically to ListView
CC BY-SA 4.0
null
2018-07-14T21:36:33.157
2018-07-14T22:43:19.457
2018-07-14T21:48:52.610
10,050,942
10,050,942
[ "mobile", "dart", "flutter", "mobile-development" ]
51,347,652
1
null
null
-2
78
Is there any way how to create my own custom keyboard only for my application (not system keyboard), without the need for the user to change the keyboards in settings and without the need for me to specify for every `EditText` to use the keyboard? Basically what I am trying to find is a way how to tell my application to use the custom keyboard by default.
How to create a custom keyboard to use by default on all inputs in the application?
CC BY-SA 4.0
null
2018-07-15T10:49:55.197
2018-07-15T11:31:28.237
2018-07-15T11:31:28.237
2,649,012
872,755
[ "java", "android", "mobile", "mobile-development" ]
51,350,006
1
51,350,041
null
2
455
Can someone explain me where I should define a scroll controller? I have chat list view which is the body of a scrollable view. I want to be able to control the scrolling behaviour from `MainView` but don't know how to pass the controller down to `_ChatListView`. Any ideas? ``` class MainView extends StatelessWidget { ... // is this the correct place? final ScrollController scrollController = ScrollController(); @override Widget build(BuildContext context) { return new Scaffold( body: new ChatListView() ); } } ``` ``` class ChatListView extends StatefulWidget { @override _ChatListView createState() => _ChatListView(); } class _ChatListView extends State< ChatListView > { Widget build(BuildContext context) { return ListView.builder( controller: scrollController, ); } } ```
Scrollable Listview in Flutter with Dart
CC BY-SA 4.0
0
2018-07-15T16:04:54.267
2018-07-15T16:10:43.480
null
null
10,050,942
[ "dart", "flutter", "mobile-development" ]
51,351,415
1
51,351,522
null
1
126
Could someone help me with the following issue? I am not sure if this is a bug or intended behaviour. I have the following layout: ``` Column( Flexible( ListView[..] ) Row( Flexible( TextField(..) <-- input field ), Container(Icon[]) <-- button ) ``` Scrolling very very quickly makes the content of my ListView getting drawn over the Row in the other container? Could this be a bug in Flutters drawing engine or did I miss to set some boundaries for my ListView? --- # Normal / expected layout: [](https://i.stack.imgur.com/VjBqr.png) --- # After scrolling very quickly: [](https://i.stack.imgur.com/IgnIl.png)
Content of Listview gets drawn over UI elements below in Flutter
CC BY-SA 4.0
null
2018-07-15T19:13:16.600
2018-07-15T19:26:35.460
2018-07-15T19:19:37.067
10,050,942
10,050,942
[ "mobile", "dart", "flutter", "mobile-development", "drawingcontext" ]
51,399,011
1
51,421,551
null
0
246
I have been implementing GOOGLE CONTACT API v3 (below is the link)([https://developers.google.com/contacts/v3/](https://developers.google.com/contacts/v3/)) I have followed the documentation and added all supported required Libraries into my app and all dependencies error have gone from my code But when I tried run/building, it shows me this error > Program type already present: com.google.gdata.client.Query$CategoryFilter Message{kind=ERROR, text=Program type already present: com.google.gdata.client.Query$CategoryFilter, sources=[Unknown source file], tool name=Optional.of(D8)} I tried googleing but didnt found exact error solution but I have noticed that most fix for this kind of issue is to up/downgrade build version So, i was building on api 28 so I downgraded to 27.1.1 but same error this is how my build.gradle looks ``` apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.murtaza.contactsync" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation files('libs/gdata-core-1.0.jar') implementation files('libs/gdata-client-1.0.jar') implementation files('libs/gdata-contacts-3.0.jar') implementation files('libs/guava-11.0.2.jar') } ``` and this are all the import ``` import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.google.gdata.client.*; import com.google.gdata.client.contacts.*; import com.google.gdata.data.*; import com.google.gdata.data.contacts.*; import com.google.gdata.data.extensions.*; import com.google.gdata.util.*; import java.io.IOException; import java.net.URL; ``` please guide me where and what Im doing wrong or How to fix this issue so that I can implement google contact api v3 I have used exact documented code for this please help me here
Program type already present: com.google.gdata.client.Query$CategoryFilter
CC BY-SA 4.0
null
2018-07-18T09:56:13.543
2018-07-19T11:29:44.290
null
null
null
[ "android", "google-contacts-api", "mobile-development" ]
51,414,238
1
51,414,958
null
-3
121
I got small `containerView` with `UILabel` on main app screen. I got `UIButton` on main `UIViewController`. I want to change text of `label` that belongs to `containerView` class by clicking button in `UIViewController`. I try to make it with delegation, but for some reason i got a mistake (Unwraping optional)... I try to make it with Protocol, bud method "addText" in ContView dont works(((((( ``` class ViewController: UIViewController { var delegate: DelegateProtocol? override func viewDidLoad() { super.viewDidLoad() } @IBAction func button(_ sender: Any) { delegate?.addText(String2: "123") }} ``` /////////////////////////////////////////////////////////////////////// ``` protocol DelegateProtocol { func addText(String2: String) } ``` ////////////////////////////////////////////////////////////////////// ``` class ContViewController: UIViewController, DelegateProtocol { override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "con" { let vc = segue.destination as! ViewController vc.delegate = self } } func addText(String2: String) { label.text = String2 } @IBOutlet weak var label: UILabel! override func viewDidLoad() { super.viewDidLoad() } } ```
Change Label text in a ContainerView on click of a button from other class (Uiviewcontroller)
CC BY-SA 4.0
null
2018-07-19T04:12:29.137
2018-07-21T08:54:45.623
2018-07-21T08:54:45.623
9,217,143
9,217,143
[ "ios", "swift", "mobile-development" ]
51,593,523
1
null
null
0
64
Designed a new template for my website but navigation bar (Menu) in mobile not scrolling. Site menu is working on Hover function. Site menu is working fine in laptop desktop but when we are checking in smartphone then after open mega menu its not scrolling to see all submenu. When we are trying to scroll menu then its scrolling page not menu. Please suggest me if we are missing any code. Site is here [http://rsseosolution.com/newsite/](http://rsseosolution.com/newsite/)
In Smart phones navigation bar (Menu) or my new design not scrolling
CC BY-SA 4.0
null
2018-07-30T12:00:29.857
2018-07-30T17:33:14.997
2018-07-30T17:31:34.863
472,495
6,861,670
[ "html", "css", "mobile-development" ]
51,814,635
1
51,815,923
null
1
700
I want to take advantage of dependency injection in my Xamarin project but can't get constructor injection to work in C# classes behind XAML views. Is there any way to do it ? I've seen guides how to setup dependency injections in View Models, to later use them as repositories but that doesn't work for me. So far I tried Ninject and Unity. Code: This is the service I want to use inside of my PCL project: ``` public class MyService : IMyService { public void Add(string myNote) { //Add Note logic } } ``` Interface: ``` public interface IMyService { void Add(string myNote); } ``` Unity setup in App.Xaml: ``` public App () { InitializeComponent(); var unityContainer = new UnityContainer(); unityContainer.RegisterType<IMyService, MyService>(); var unityServiceLocator = new UnityServiceLocator(unityContainer); ServiceLocator.SetLocatorProvider(() => unityServiceLocator); MainPage = new MainMasterMenu(); //<-- feel that I'm missing something here as I shouldn't be creating class instances with DI, right ? } ``` Usage that I'd like to see. This is .CS file behind a XAML starting page: ``` [XamlCompilation(XamlCompilationOptions.Compile)] public partial class MainMasterMenu : MasterDetailPage { private IMyService _myService; public MainMasterMenu(IMyService myService) { _myService = myService } private void SomeFormControlClickEvent(object sender, ItemChangedEventArgs e) { _myService.Add("hi"); } } ```
Constructor Injection in Xamarin Froms .xaml.cs file classes
CC BY-SA 4.0
null
2018-08-13T02:55:17.413
2018-08-13T05:54:58.740
null
null
1,193,841
[ "c#", "xamarin", "dependency-injection", "xamarin.forms", "mobile-development" ]
51,827,387
1
51,828,089
null
1
1,592
In Xamarin forms I want to use an image ( png file ) I created as background for a side "hamburger" menu. For example, here is some menu: [](https://i.stack.imgur.com/Ca88U.png) Two questions: 1) What's the best image size to use for the menu background 2) How do I put a ListView that contains my menu options on top of the background image ? I tried using the grid but wasn't successful at stacking them. Code below is a quick summary of how the MasterDetailPage is structured. ``` //Menu <MasterDetailPage.Master> <ContentPage> <ContentPpage.Content> <AbsoluteLayout> //Also tried FlexLayout and RelativeLayout <Image Source="blah" Aspect="Fill"/> <Grid> <ListView/> </Grid> </AbsoluteLayout> </ContentPpage.Content> <ContentPage> </MasterDetailPage.Master> //Page content <MasterDetailPage.Detail> <ContentPage> ///Page content </ContentPage> </MasterDetailPage.Detail> ``` The goal is to get the side menu looking something like this: [](https://i.stack.imgur.com/0Szl9.jpg)
Set navigation side menu background image in Xamarin Forms
CC BY-SA 4.0
0
2018-08-13T17:09:08.533
2018-08-13T18:01:00.520
null
null
1,193,841
[ "c#", "user-interface", "xamarin", "xamarin.forms", "mobile-development" ]
51,926,190
1
null
null
0
60
I have followed all instruction as in docs, but couldn't start my first react native app.Node -v v8.11.4, npm 4.6.1, react-native-cli 2.0.1 See Error Image Here: [](https://i.stack.imgur.com/Nlmmc.png) Thanks in advance!
React Native Configuration Return Error 500, Followed React Native Docs
CC BY-SA 4.0
null
2018-08-20T07:46:42.037
2019-08-01T08:50:56.520
2019-08-01T08:50:56.520
8,235,971
9,497,778
[ "react-native", "mobile-development", "react-native-cli" ]
51,995,961
1
53,342,988
null
2
1,223
Displaying videos in ionic 3 issue
CC BY-SA 4.0
null
2018-08-24T00:29:34.523
2018-11-16T17:49:29.690
null
null
10,098,981
[ "html", "ionic-framework", "ionic3", "mobile-development" ]
52,108,821
1
52,108,994
null
0
52
I am learning to program in `apache-cordova`. If I create a platform independent mobile application in `apache cordova`, does my Android or iPhone require to download any special packages to run the cordova app? Can all Android/iPhone devices run a cordova app naturally with out having to download any extra plugins/packages? Or will my clients have to download anything to their Android/iPhone devices to run my cordova app? Thank you all in advance for the help or answers. UPDATE : some body has negative voted my question.. So everybody please positive vote my question to give me more positive votes. Thank you
Can all Android/iPhone devices run any Cordova app by default?
CC BY-SA 4.0
0
2018-08-31T05:13:45.487
2021-12-12T15:52:02.033
2021-12-12T15:52:02.033
10,298,339
10,298,339
[ "android", "iphone", "cordova", "mobile-development" ]
52,209,104
1
52,209,881
null
3
3,677
I'm very new to react native and somehow I was able to display a map and some markers on it. But I need to read set of locations (coordinates) from a remote server and display on map. In other words, makers need to be change their locations. I tried a few difference ways, but any of those didn't help. If anyone has previous experience please help. Following is my existing code. ``` import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View} from 'react-native'; import MapView, {PROVIDER_GOOGLE} from 'react-native-maps'; import {Container, Header, Content, Footer, FooterTab, Title, Button, Icon} from 'native-base'; export default class App extends Component<Props> { constructor(props) { super(props); this.state = { latitude: 6.9212768, longitude: 79.9610316, error: null, friends: [], }; } componentDidMount() { navigator.geolocation.watchPosition( (position) => { console.log("wokeeey"); console.log(position); this.setState({ latitude: position.coords.latitude, longitude: position.coords.longitude, error: null, }); //TODO: send user location to server }, (error) => this.setState({error: error.message}), {enableHighAccuracy: false, timeout: 200000, maximumAge: 1000}, ); //API call to get friends this.setState({ friends: [ { latitude: 6.9243768, longitude: 79.9612316, key: "friend 1" }, { latitude: 6.9213768, longitude: 79.9641316, key: "friend 2" } ], }); } render() { contents = this.state.friends.map((item) => { return ( <MapView.Marker key={item.key} coordinate={{"latitude": item.latitude, "longitude": item.longitude}} title={item.key}/> ); }); return ( <Container> <MapView provider={PROVIDER_GOOGLE} style={styles.container} showsUserLocation={true} showsMyLocationButton={true} zoomEnabled={true} followsUserLocation={true} initialRegion={{ latitude: this.state.latitude, longitude: this.state.longitude, latitudeDelta: 0.0158, longitudeDelta: 0.0070 }} > {!!this.state.latitude && !!this.state.longitude && <MapView.Marker coordinate={{"latitude": this.state.latitude, "longitude": this.state.longitude}} title={"You're here"} pinColor={'#3498db'} />} <View>{contents}</View> </MapView> </Container> ); } } ```
react-native-maps: How to update user location recieved from remote server periodically
CC BY-SA 4.0
0
2018-09-06T17:08:25.417
2018-09-07T01:33:43.180
2018-09-06T21:13:49.130
6,569,224
3,310,923
[ "android", "react-native", "react-native-maps", "mobile-development" ]
52,265,061
1
null
null
0
45
I am currently making an app with interstitial ads. I have setup everything, but when I tested the ads (in test mode) I got nothing even after waiting for a week. Now, the thing is, that Google's provided Test Ads (in their documentation) work perfectly fine. So my code has to be right as well. So I have to have misconfigured something... The thing is, I don't know what. I have added my payment options, gotten an "your account is activated" email, used the right id and my ad is active. Any advice? PS: I have got an Email from Google AdWords which wants me to call Google in order to complete the AdWord Setup, but that hasn't anything to do with AdMob, now has it?
AdMob - Example Ads work, my own Interstitial doesn't
CC BY-SA 4.0
null
2018-09-10T20:31:57.720
2018-09-10T20:31:57.720
null
null
10,233,170
[ "android", "interstitial", "admob", "mobile-development" ]
52,297,099
1
null
null
0
50
I want to detect offline mobile phones in a specific area, they are offline no GPS and no internet. I have an application and it should take an action when it detects that it is in the area. the area may be a floor on a building or even a room. Can I set a repeater device and wait for its signal to show up then to take an action based on the Cell Id? knowing that I don't need the mobile phone to connect the repeater. is there a better approach?
Do Cell Phone Repeaters have CID and LAC?
CC BY-SA 4.0
null
2018-09-12T14:04:39.863
2018-09-24T10:34:30.667
null
null
4,688,694
[ "mobile-development", "telecommunication" ]
52,522,602
1
52,523,594
null
3
5,018
I am getting an error 'linker command failed with exit code 1' when I try to build my mobile app in Xcode for the iPhone. In looking up solutions to fix this I came across this advice: "the suprojects should be removed, which is everything under Libraries inside Xcode." (solution found here) [https://github.com/auth0/react-native-lock/issues/3](https://github.com/auth0/react-native-lock/issues/3) But I cannot find an Xcode folder on mac that contains a Libraries folder within it. Does anyone know where this is located at??
Where is the libraries folder in Xcode?
CC BY-SA 4.0
null
2018-09-26T16:46:16.233
2018-12-29T17:11:50.803
2018-09-26T17:50:31.440
1,226,380
1,226,380
[ "ios", "xcode", "react-native", "mobile-development" ]
52,669,467
1
54,171,212
null
22
4,655
I am "a bit" confused in understanding of what of those two services are capable for and what are the core differences between of them. In general, I understand what they provide, and separately I used them both earlier (VSTS as issue tracker, mostly), and AppCenter for the sources to be built and deployed. However: `building``publishing`. In DevOps has the option of setting up the Pipeline: [](https://i.stack.imgur.com/Yr58v.png) Same way as AppCenter has mostly the same: [](https://i.stack.imgur.com/t7BzD.png) `Tests`. . AppCenter - with "Stores" section, and DevOps with [this plugin](https://blogs.msdn.microsoft.com/devops/2016/08/25/continuous-delivery-of-ios-applications-with-team-services/) (at least). They both also have some specific features (like AppCenter has PushNotifications functionality and Azure DevOps has issue tracking), however, . So, which of them should be used for what particular tasks? Or this is just one the modern "marketing" feature of Microsoft, when there is mostly no difference, but those are just two similar thing wrapped with different-colored envelope?
What's the principal difference between MS AppCenter and Azure DevOps (former VSTS)?
CC BY-SA 4.0
0
2018-10-05T16:00:41.303
2019-01-13T17:07:51.500
2018-10-05T16:17:09.333
4,044,696
691,660
[ "azure-devops", "app-store", "mobile-development", "visual-studio-app-center" ]
52,679,493
1
52,732,850
null
0
266
I am working on a xamarin forms project which have a carousel page container, and content pages as its children are created dynamically on different condition checks. (Minimum 8 children in my case) Let's take the mentioned minimum case. I enter some values in entry/picker controls in the 1st child and then navigate/swipe pages till 5th child. When I came back to the first child page, the values I entered/selected are now vanished/refreshed. I have noticed that carousel page saves only in it. i.e. (Left Page, and the Right Page). And Tabbed page saves . I want the values to stay in the child page where I entered whether I navigate to the last most page or in the middle and navigate back to that page. I have googled via the letters as "" etc. but unable to find something useful. So, I need to know the etc. by which xamarin forms setting the limit of carousel page as 3 and tabbed page as 4. Waiting for your response. Thanks.
Xamarin Forms: Values vanished/refreshed on swiping more than four content pages inside carousel page or tabbed page
CC BY-SA 4.0
0
2018-10-06T13:22:19.537
2022-03-17T12:55:42.627
null
null
10,042,055
[ "xamarin", "xamarin.forms", "carousel", "mobile-development", "tabbedpage" ]
52,696,766
1
null
null
0
35
I have a React Native app and such a confusing case. Let's say, my app is an online food delivery app. I would like to create an order. When I create an order, I call API request to the server. While waiting to create the order, my app shows a loader. And suddenly, my app goes offline (bad internet connection). And I use apisauce library, which I put timeout for API request. Because of my app is offline, I can't receive the response and eventually the request timeout. The app shows up unable to create order prompt. But in the server, the order is created. Is there any way out, to solve this ? If the app suddenly offline, can I terminate the request ? Or can I receive any response whenever my app is getting back online ? Please give me any suggestions, whether I should modify my app or the backend server to handle this issue. Thank you
How can I terminate mobile app order transaction?
CC BY-SA 4.0
null
2018-10-08T06:46:09.860
2018-10-08T06:46:09.860
null
null
8,673,809
[ "android", "ios", "react-native", "backend", "mobile-development" ]
52,753,992
1
null
null
1
1,112
Apple has rejected the iOS application uploaded to the App Store. I have developed an application which installs the signed configuration profile (.mobileconfig) in the iOS device. I am unable to figure out which public API I have used in an unapproved manner. 1. Is it the HTTP requests which downloads configuration profile from the server and then prompt the user to install it? 2. I am validating whether the profile has been installed in the iOS device or not using Security Framework (SecCertificate, SecPolicy, SecTrust etc.). I am not sure if this is the problem. 3. What else should I look for figure out that particular Public API? Additionally, your app uses public APIs in an unapproved manner, which does not comply with guideline 2.5.1 of the App Store Review Guidelines. Since there is no accurate way of predicting how an API may be modified and what effects those modifications may have, Apple does not permit unapproved uses of public APIs in App Store apps. Please revise your app to ensure that documented APIs are used in the manner prescribed by Apple.
Binary Rejected: Your app uses public APIs in an unapproved manner
CC BY-SA 4.0
0
2018-10-11T06:53:27.367
2019-04-29T04:59:46.040
2018-10-11T09:29:49.147
2,227,743
4,910,796
[ "ios", "iphone", "mobile-development", "configuration-profile" ]
52,757,354
1
null
null
0
903
I am getting the data from the user in a new user registration screen. After clicking the register button, the data are getting saved in the database. I am using an input field called promocode, to check for the user's promo code. Here's what I need: I am having a set of promocodes already in a database table. If the user types a promocode, and if the particular code exists in my database table, it can allow the user to register in my app. Suppose if the user is typing a promocode that is not in my database table, it should display toast message as invalid promocode and so that the user is not allowed to register. This promocode validation should happened after the user fill all the details and after clicking the submit button. Here's what I have tried so far: In my HTML: ``` <ion-item> <ion-icon name="ios-hand" class="iconstyle" item-left></ion-icon> <ion-label color = "textcolor" floating>Reseller Promo Code</ion-label> <ion-input type="text" class="textcolor" [(ngModel)] = "vm.promocode" formControlName = "promocode" maxlength = "15" tabindex="2" (keyup)="moveFocus($event,query, false)" > </ion-input> </ion-item> ``` In my ts file: ``` import { Component } from '@angular/core'; import {IonicPage, NavController, NavParams } from 'ionic-angular'; import {SignupService} from '../../services/signup.service'; import { MessageService } from '../../services/message.service'; import { BroadCastService } from '../../services/broadcast.service'; import { isNullOrUndefined } from 'util'; import { Signup } from '../../models/signup'; import { FormGroup, FormControl, Validators, AbstractControl} from '@angular/forms'; import { LoginPage } from '../login/login'; @IonicPage() @Component({ selector: 'page-signup', templateUrl: 'signup.html', providers: [SignupService] }) export class SignupPage{ formsignup: FormGroup; submit(){ if (this.formsignup.valid) { this.signupservice.savesignup(this.vm).subscribe(res=>{ console.log(res); this.message.alert("Your account has been created successfully"); this.resetForm(this.formsignup); this.navCtrl.push(LoginPage); }); } else{ this.validateFormControl(this.formsignup); } } ``` This is my service.ts file where I am posting the user details to the server and saving it in the database. ``` import { Injectable } from "@angular/core"; import { DataService } from "./data.service"; @Injectable() export class SignupService { constructor(private dataservice: DataService) { } savesignup(formdetails:any){ return this.dataservice.post('/api/Login/Register', formdetails); } } ``` In my model class I have used this promocode as follows: signup.ts: ``` export class Signup{ promocode: string; ``` Now everything is working fine. All my data are saving in the database and I can able to login with the registered account. But I don't know how to implement this functionality. I am new to Ionic.
How can I check for valid promo code in my Ionic 3 Angular app against the database table?
CC BY-SA 4.0
null
2018-10-11T10:03:05.903
2019-03-12T19:35:08.780
2019-03-12T19:35:08.780
472,495
10,176,134
[ "angular", "ionic-framework", "ionic3", "hybrid", "mobile-development" ]
53,166,281
1
53,166,431
null
1
698
Can one show an interstitial ad when the user clicks a button and if the user cancel the ad, he/she would be directed to a website. So, is the adMob's policy been broken: Interstitial ad should not be shown as the user exits the app. Clearly here, the user was not intended to actually 'exit' the app, but it's a implicit feature of the app. I researched a lot but there was no one similar to my problem, I even posted this problem on quora, Google's adMob sdk help forums and even in gmail help forums, but there were no replies. Thank you for answering.
Showing interstitial adMob ad when the user exits the app but not by intention
CC BY-SA 4.0
null
2018-11-06T05:36:21.650
2018-11-06T08:05:23.793
null
null
10,081,385
[ "android", "admob", "interstitial", "mobile-development" ]
53,172,160
1
53,179,808
null
0
104
So my app have been successfully developed and I have had a good experience with the admob test ads. But then just now I tried to view how real ads look like on my app and I started testing with real ads(banners+Interstitial) with keeping in mind: not to click them! The impressions gets to be 6 and match rate 100%, will this cause me any trouble?? I am new to adMob but I did followed all policies correcty, though I don't know if self impressions are a big deal or not. Please reply. Thanks.
Can testing with real adMob ads after the app's development results in adMob's policy violation?
CC BY-SA 4.0
0
2018-11-06T12:42:47.867
2018-11-06T20:50:04.413
null
null
10,081,385
[ "android", "admob", "mobile-development" ]
53,248,555
1
null
null
0
41
I'm totally new to Java and Android Studio. I wanted to know how to create a box dialogue or whatever the correct term is to create a box where the user can type and whatever he writes will be stored under a variable? Context: I'm creating a home security device. The purpose of the app would be for the user to insert their phone number so they could get SMS notifications on the state of their doors that is monitored by external sensors on a Raspberry Pi. Once I know how to take in user input in Android studio and save it under a variable I can then save it to a file and using Python read from that file and then do whatever I need to with the phone number. Ideally, I understand this would have been done in just Java but learning another language with my novice understanding at this stage is too slow to make this project happen on time, hope you understand and ignore my lack of knowledge in this area. Thanks ahead!
How to create a box for user input and then store it as a variable in Android Studio
CC BY-SA 4.0
null
2018-11-11T12:05:22.673
2018-11-11T16:55:49.043
2018-11-11T16:55:49.043
5,455,156
9,467,648
[ "java", "android", "android-studio", "raspberry-pi3", "mobile-development" ]
53,370,179
1
null
null
0
38
How can I draw a line on a map to detect a live location on that line. but the line won't be on a road (street), it is a well known line on the map using google map API.
Draw a line on a map but the line not a road
CC BY-SA 4.0
null
2018-11-19T07:36:59.833
2018-11-21T15:03:10.680
null
null
3,034,358
[ "android", "mobile-development" ]
53,378,308
1
null
null
-1
906
whenever I run "ionic cordova run android" and deploy the apk in the real device, I got error message: Access to XMLHttpRequest at '[http://XXXX/mobile/data/1/XXXX](http://XXXX/mobile/data/1/XXXX)' from origin '[http://localhost:8080](http://localhost:8080)' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. (this works in the ionic simulator by adding the proxy in config file, but not the real device). Does anyone face this problem as well? here is my ionic info: ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0 Cordova: cordova (Cordova CLI) : 8.1.2 ([email protected]) Cordova Platforms : android 7.1.2 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.3, (and 8 other plugins) System: NodeJS : v8.12.0 (/usr/local/bin/node) npm : 6.4.1 OS : macOS High Sierra
ionic run with CORS problem on mobile device
CC BY-SA 4.0
null
2018-11-19T15:53:37.587
2023-01-23T19:43:44.863
null
null
1,156,202
[ "cordova", "ionic-framework", "cors", "ionic4", "mobile-development" ]
53,860,459
1
null
null
1
281
We are working on a requirement which includes creating an "Admin Panel" to send announcements/push notifications to different user populations of a mobile application for things such as: Application Updates, System Outages, Service Announcements, etc, based on certain user parameters such as roles and other properties. We are currently sending as this user properties to our Firebase project from Android and iOS versions of a mobile application. The solution of sending push notifications to different user segments and specially the flexibility of segmenting users with relational operators over the user properties is a fundamental requirement for which we though of using Analitycs user segments to target specific notifications dynamically. See source: [https://firebase.googleblog.com/2017/03/updates-to-firebase-notifications-reach.html](https://firebase.googleblog.com/2017/03/updates-to-firebase-notifications-reach.html) Some of the user properties we send to Firebase and we would like to leverage to segment the push notifications are not static and could change in a short time period which may not be reflected in the mobile application immediately, however we did not find a way of updating user properties from the server side (i.e: from a process driven from the data source systems) and relying on users using the mobile app to push/update their user properties updates to Firebase will not suffice to keep the segments up to date and audiences accurate (users may take some time to come back and open the mobile app long after a user property changed). Is this limitation of user properties not being manageable through REST endpoints or any other way from the server intentional? Is there any other product or alternative that could help achieving the objective described above? Any recommendations out there? We discarded using Firebase topics due to the dynamic nature of the filtering requirements for segments. Maintaining topics up to date with the right population of users would have performance costs and serious scalability issues. AWS Pinpoint was evaluated too although the integration with Firebase doesn't seem to be working very well hence we discarded it.
Will it ever be possible to update Firebase user properties from the server side?
CC BY-SA 4.0
null
2018-12-19T23:13:14.807
2018-12-19T23:13:14.807
null
null
10,761,077
[ "firebase", "push-notification", "firebase-cloud-messaging", "mobile-development", "mobile-devices" ]
53,971,138
1
53,971,613
null
6
7,541
my app should have a login screen, with Google, so when signed in it goes to the menu screen. in order to not go back to the login screen when pressing the back button, after getting to the menu screen after the authentication. I've separated the stacks one for the login and one for the other screens in App.js: ``` const AuthStack = createStackNavigator({ LoginSplashScreen: LoginSplashScreen }); const AppStack = createStackNavigator({ MenuScreen:MenuScreen, DetailsScreen: DetailsScreen, PhotoScreen: PhotoScreen, DocumentScreen: DocumentScreen, AudioScreen: AudioScreen, ScheduleScreen: ScheduleScreen, SettingsScreen: SettingsScreen, FilesScreen: FilesScreen, GalleryScreen: GalleryScreen }); const Root= createAppContainer(createSwitchNavigator( { AuthStack:AuthStack, AppStack:AppStack }, { initialRouteName: 'AuthStack', } )); export default class App extends React.Component { render() { return ( <Root/> ) } } ``` so in the LoginSplashScreen after authenticating I used this code to navigate: ``` this.props.navigation.navigate('AppStack', { signedIn: true, name: result.user.name, photoUrl: result.user.photoUrl }); ``` the navigation works great, but the parameters 'name','signedIn','photoUrl' do not pass in fact, when alerting ``` Alert.alert('',JSON.stringify(this.props.navigation.state.params)) ``` on the menu screen(second stack), it is empty I managed to solve this specific problem with setting a global parameter with: ``` global.param= result.param; ``` but, I still need an answer for passing between 2 separated stacks
pass parameters between two stacks - React Native
CC BY-SA 4.0
0
2018-12-29T16:06:11.470
2021-03-16T15:09:53.747
2018-12-29T16:21:22.497
9,615,185
9,615,185
[ "android", "react-native", "mobile-development" ]
54,129,884
1
55,079,405
null
5
8,736
[](https://i.stack.imgur.com/GHW4L.png) How could I achieve this layout in Flutter?
How can I float text around an image in Flutter?
CC BY-SA 4.0
0
2019-01-10T13:34:46.627
2019-03-09T16:24:23.143
null
null
4,457,867
[ "dart", "flutter", "mobile-development" ]
54,156,247
1
null
null
0
351
I'm trying to get a DropdownButton to display inside a ListView. Although the ListView code is in another file, this button is a direct child of that ListView. Trying to add the widget directly did not work, giving this error: ``` I/flutter (22767): RenderIndexedStack object was given an infinite size during layout. I/flutter (22767): This probably means that it is a render object that tries to be as big as possible, but it was put I/flutter (22767): inside another render object that allows its children to pick their own size. ``` So I attempted to put it inside a simple Column/Flexible combination with nothing else added, as that's what I saw recommended from Google. ``` widgets.add(Column(children: [Flexible(child: subdropdown)],)); ``` This gave me this error: ``` I/flutter (22767): RenderFlex children have non-zero flex but incoming height constraints are unbounded. I/flutter (22767): When a column is in a parent that does not provide a finite height constraint, for example if it is I/flutter (22767): in a vertical scrollable, it will try to shrink-wrap its children along the vertical axis. Setting a I/flutter (22767): flex on a child (e.g. using Expanded) indicates that the child is to expand to fill the remaining I/flutter (22767): space in the vertical direction. I/flutter (22767): These two directives are mutually exclusive. If a parent is to shrink-wrap its child, the child I/flutter (22767): cannot simultaneously expand to fit its parent. I/flutter (22767): Consider setting mainAxisSize to MainAxisSize.min and using FlexFit.loose fits for the flexible I/flutter (22767): children (using Flexible rather than Expanded). This will allow the flexible children to size I/flutter (22767): themselves to less than the infinite remaining space they would otherwise be forced to take, and I/flutter (22767): then will cause the RenderFlex to shrink-wrap the children rather than expanding to fit the maximum I/flutter (22767): constraints provided by the parent. ``` Then I tried following these instructions, and setting the `mainAxisSize` and the `FlexFit` just brought back the original error. ``` widgets.add(Column(mainAxisSize: MainAxisSize.min, children: [Flexible(child: subdropdown, fit: FlexFit.loose)],)); ``` I looked at [this](https://stackoverflow.com/questions/47032262/flutter-dropdownbutton-overflow-in-listview) thread, but that one has the dropdown rendering , it's just rendering incorrectly. The errors I'm getting interrupts the rendering, so it doesn't show anything at all.
DropdownButton in ListView/Column causing a rendering error
CC BY-SA 4.0
null
2019-01-12T02:14:13.437
2019-01-12T02:14:13.437
null
null
4,457,867
[ "dart", "flutter", "mobile-development" ]
54,274,836
1
null
null
0
237
Here I am trying to expand view size with single finger `onTouchevent`. Almost it's working for long length strings but it's not working for small words like "Just" or "Know", complete view is getting shaking, sometimes the view dimensions increasing unexpectedly and the view getting rotating. It would be helpful if some one helps me to correct my code. Here I am adding my expected output screen image [](https://i.stack.imgur.com/kbm4i.jpg) ``` <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <FrameLayout android:id="@+id/frmBorder" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="8dp" android:background="@drawable/rounded_border_tv"> <TextView android:id="@+id/tvPhotoEditorText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="4dp" android:textColor="#000000" android:textSize="18sp" tools:text="Burhanuddin" tools:textColor="@android:color/black" /> </FrameLayout> <ImageView android:id="@+id/imgPhotoEditorClose" android:layout_width="25dp" android:layout_height="25dp" android:layout_gravity="top|start" android:elevation="1dp" android:src="@drawable/ic_remove" /> <ImageView android:id="@+id/imgPhotoEditorRotate" android:layout_width="15dp" android:layout_height="15dp" android:layout_gravity="bottom|end" android:elevation="1dp" android:src="@drawable/ic_remove" /> </FrameLayout> ``` ``` final View textRootView = getLayout(ViewType.TEXT); final ImageView imgRotate = textRootView.findViewById(R.id.imgPhotoEditorRotate); SingleTouchListener singleTouchListener= new SingleTouchListener( textRootView, parentView, this.imageView); imgRotate.setOnTouchListener(singleTouchListener); ``` ``` public boolean onTouch(View view, MotionEvent event) { int action = event.getAction(); float x = event.getX(); float y = event.getY(); float mx = view.getX(); float my = view.getY(); switch (action) { case MotionEvent.ACTION_DOWN: last_x=x; last_y=y; textRootView.bringToFront(); break; case MotionEvent.ACTION_MOVE: float dx = x - last_x; float dy = y - last_y; updateRotateAndScale(dx, dy,mx,my); textRootView.setScaleX(mScale); textRootView.setScaleY(mScale); float rotation = adjustAngle(textRootView.getRotation() + mRotateAngle); textRootView.setRotation(rotation); last_x = x; last_y = y; break; case MotionEvent.ACTION_UP: if (onSingleTouchListener!=null) onSingleTouchListener.onRemoveViewListener(view); resetView(); break; } return true; } public void updateRotateAndScale(final float dx, final float dy, float mx, float my) { float Frame_c_x = textRootView.getPivotX()/2; // frame layout center position, for to perform animation and scale. float Frame_c_y = textRootView.getPivotY()/2; float x = mx; // view last x , y position float y = my; float n_x = x + dx; // extended view float n_y = y + dy; float xa = x - Frame_c_x; // Off of the previous view float ya = y - Frame_c_y; float xb = n_x - Frame_c_x; float yb = n_y - Frame_c_y; float srcLen = (float) Math.sqrt(xa * xa + ya * ya); float curLen = (float) Math.sqrt(xb * xb + yb * yb); float scale = curLen / srcLen; mScale *= scale; float newWidth = textRootView.getWidth() * mScale; if (newWidth < 70) { mScale /= scale; return; } double cos = (xa * xb + ya * yb) / (srcLen * curLen); if (cos > 1 || cos < -1) return; float angle = (float) Math.toDegrees(Math.acos(cos)); float calMatrix = xa * yb - xb * ya; int flag = calMatrix > 0 ? 1 : -1; angle = flag * angle; mRotateAngle += angle; } public void resetView() { mRotateAngle = 0; mScale = 1; } ```
Unable to resize and rotate view with setScaleX and setScaleY in onTouch event
CC BY-SA 4.0
null
2019-01-20T08:41:40.390
2019-01-20T10:33:34.427
2019-01-20T10:33:34.427
3,705,788
2,807,103
[ "java", "android", "image", "mobile-development" ]
54,315,102
1
54,315,233
null
-1
268
I want to build a windows app and I would like to be able to send and receive communication to and from the windows desktop app and mobile devices. For instance I would like to be able to scan the wifi network, see my app (from the mobile device and I would build in security measures) and then be able to change a slide for instance, or change text on the screen... so a remote control for a presentation for example. Would it be best to build a web service in the windows app and have the mobile app scan for that service and send POST and GET commands? Is there a framework that would help with this already out there? I am using Visual Studio 2017 and C# and looking to NOT use Powerpoint
Building a Windows App with iPhone/Android remote control
CC BY-SA 4.0
0
2019-01-22T19:23:39.257
2019-01-23T03:22:50.013
2019-01-23T03:22:50.013
1,472,835
1,472,835
[ "c#", "winforms", "slideshow", "mobile-development" ]
54,382,554
1
54,385,951
null
1
1,658
I'm building an e commerce app with React Native. I'm stuck with an issue. In the "Basket" Page, I want to show the total price of the items. I have a state totalPrice set to 0 at the beginning and the when I display each item in a flatlist, i want to update totalPrice (totalPrice = totalPrice + item price * quantity) My code: ``` class Basket extends Component { constructor(props) { super(props); this.state = { isLoading: true, totalPrice: 0, } } componentDidMount(){ return fetch(...) .then((response) => response.json()) .then((responseJson) => { this.setState({ isLoading: false, dataSource: responseJson.records, }, function(){ }); }) .catch((error) =>{ console.error(error); }); } render() { if(this.state.isLoading){ return( <View> <ActivityIndicator/> </View> ) } return ( <View style={{ flex: 1}}> <ScrollView> <FlatList data={this.state.dataSource} numColumns={1} renderItem={({item}) => //displaying the items //below i want to update totalPrice but it didn't work this.setState({ totalPrice : this.state.totalPrice + item.quantity * item.price, }); } /> </ScrollView> <View> <Text> {this.state.totalPrice} </Text> </View> </View> ); } } ```
React Native update state in FlatList
CC BY-SA 4.0
null
2019-01-26T20:43:30.307
2019-01-27T07:22:52.677
null
null
10,897,000
[ "reactjs", "react-native", "reactive-programming", "expo", "mobile-development" ]
54,430,720
1
null
null
0
26
I am building an app which will contain a large number of photos (200+) and about 100 descriptions of text. I need to be able to fetch and retrieve the photos and text and display them in my app however my client wants the app to be able to run offline without having to connect to the internet. I'm assuming I will have to embed the images and text data into my app itself. But I'm still new to this and was wondering what are my approaches to this and what kind of Backend I will need. The Images are in a form of png, and the text can be given in any form (pdf, docx, csv, it doesn't matter as I can always convert it). Sorry if I am not being to specific, I'm still new and trying to figure out how to implement the data into my app. Thank you so much!
How should I approach being able to retrieve images and description data in my React Native App offline?
CC BY-SA 4.0
null
2019-01-29T22:41:49.283
2019-01-29T23:01:37.633
null
null
10,830,268
[ "android", "react-native", "mobile", "mobile-development" ]
54,432,336
1
null
null
1
941
I need compare feature between "rn-fetch-blob" and "axios" which one the best between "rn-fetch-blob" and "axios" for fetching data ?
rn-fetch-blob Vs axios for fetching data API
CC BY-SA 4.0
null
2019-01-30T01:59:22.133
2019-01-30T01:59:22.133
null
null
10,866,069
[ "javascript", "react-native", "hybrid-mobile-app", "mobile-development" ]
54,516,290
1
null
null
0
473
Are apps made with cordova mobile development framework already 64-bit ready and compatible? Since we are developing in non-native code (Cordova), is the requirement related to us?
Apps ready for the 64-bit requirement by August 1, 2019
CC BY-SA 4.0
null
2019-02-04T12:37:26.003
2019-02-06T01:10:28.440
2019-02-04T12:52:01.917
11,012,427
11,012,427
[ "cordova", "32bit-64bit", "mobile-development" ]
54,602,487
1
54,602,542
null
0
56
I used AppBarLayout & ToolBar to replace the default ActionBar. I have six activities which are supposed to use my custom ActionBar. But I don't want to paste the same code in onCreate() function for each activity. How can I do the same settings just for once? I am new to Android, thanks for your help!
How to set the same ToolBar in different activities if I don't want to paste the same code?
CC BY-SA 4.0
null
2019-02-09T02:04:56.680
2019-02-09T05:07:22.880
null
null
9,478,153
[ "java", "android", "mobile-development" ]
54,665,597
1
54,665,801
null
0
71
I use function `drawCircle(int diameter)` to return `ShapeDrawable` object, which is an OvalShape. Then I use `ImageView.setImageDrawable()` to set the OvalShape. But the `ImageViews` are still empty. How to do it correctly? Function `drawCircle()`: ``` public ShapeDrawable drawCircle (int diameter) { OvalShape ovalShape = new OvalShape(); ShapeDrawable drawable = new ShapeDrawable(ovalShape); drawable.getPaint().setColor(getResources().getColor(R.color.textColorHint)); drawable.getPaint().setStyle(Paint.Style.FILL_AND_STROKE); drawable.getPaint().setStrokeWidth((float)2); drawable.setBounds(0 ,0, diameter, diameter); return drawable; } ``` Set `ImageView`: ``` one_img.setImageDrawable(drawCircle(selector_one_diameter)); two_img.setImageDrawable(drawCircle(selector_two_diameter)); ``` Above all, I tried using `.xml` file to describe oval shapes. But since values in `dimens.xml` cannot be re-written in Java code, I can't dynamically change the size of oval shapes. It couldn't be better if you can suggest another way!
How to dynamically set drawable resource to ImageView?
CC BY-SA 4.0
null
2019-02-13T08:29:00.563
2019-02-13T08:42:01.027
2019-02-13T08:37:35.017
9,844,646
9,478,153
[ "android", "mobile-development" ]
54,760,904
1
null
null
1
109
I am practicing with working with DynamoDB and other serverless tools offered by AWS. I am used to working with relational databases like MySQL so with with Dynamo has been a little bit of a challenge for me. Basically I was looking at doing something similar to what already exists with Facebook, Instagram, Youtube, and other popular sites are doing. And that's creating a platform that allows for Users to sign up, follow others, and post media (videos and pictures) that can be liked, and commented on. For items that could be growing, like Followers, or Likes, I originally stored as Lists in their respective tables; however, I realize that may not be the best approach as DynamoDB does have a data limit. For example, if someone like Kobe Bryant joined the app, and immediately got millions of followers, the list approach may not be best. Like this, Media: - MediaID - UserID - MediaType - Size - S3_URL - Likes: { ... ... } - Comments: { ... ... } Would it be better to store things like this in separate tables? Or am I now thinking back to relational databases? For example, Media: - MediaID - UserID - MediaType - Size - S3_URL Media_Likes: - LikeID - MediaID - UserID - DateLiked Media_Comments: - CommentID - MediaID - UserID - Text - DateCommented Or what else would be the best way to design something like this?
DynamoDB Schema Advice
CC BY-SA 4.0
null
2019-02-19T07:34:07.357
2019-02-19T07:34:07.357
null
null
8,448,916
[ "amazon-web-services", "api", "amazon-dynamodb", "serverless", "mobile-development" ]
54,810,329
1
null
null
6
2,668
I'm trying to test our web app on iPhone. During the lifecycle our app is doing a call to a third-party api which allows calls only with a header 'origin: localhost' On desktop it's not a problem. On Android I can set up [port forwarding](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3#port-forwarding). Can I do anything similar on iPhone? Is it possible? I found [this answer](https://stackoverflow.com/questions/12657651/connect-device-to-mac-localhost-server). but it describes a way to use url like `[your pc name].local` which isn't what I need
iPhone testing: port forwarding and localhost
CC BY-SA 4.0
null
2019-02-21T15:12:29.177
2020-04-22T10:42:14.003
null
null
1,907,902
[ "ios", "iphone", "mobile-safari", "mobile-development" ]
54,838,472
1
null
null
0
55
Can someone point me in the right direction on how I could go about writing a piece of code for react native that takes an input from the user (username and password) and then logins into a website with in. Also any react native web scraping libraries anyone could recommend (I was thinking about using Cheerio) Thanks in Advance :)
React Native Logging in to Web Page
CC BY-SA 4.0
null
2019-02-23T05:17:28.473
2021-02-10T17:34:37.257
2021-02-10T17:34:37.257
2,318,649
11,104,665
[ "react-native", "mobile-development" ]
54,843,077
1
null
null
0
947
I know you can use dpm to set an app as a device owner via a runtime exec command, but my big question is can you also use the dpm to remove an app as device owner? Such as with a password run the code to remove the app from device ownership? I am new to android development and I am learning as much as possible. The company I work for owns the devices and wants to keep employees from removing the app. For security reasons, rooting is not feasible. However at the same time they would like to be able to remove the app at a future date if necessary. At least point me in the right direction for further research.
Using DPM to set Device owner
CC BY-SA 4.0
null
2019-02-23T15:22:29.723
2019-03-04T10:24:43.223
null
null
7,238,878
[ "java", "android", "mobile-development", "device-admin", "dpm" ]
54,952,298
1
null
null
0
52
This is my first post on here so I might not have the lingo down, go easy on me! I've been doing a lot of personal research into website accessibility over the past few months and I've gotten a pretty good grasp of by now. There are lots of resources in that department. I can't seem to find any good resources on accessibility in the context of mobile app development be it Android, iOS, or windows. Tl;Dr: anyone know good resources to learn accessibility in Mobile app development?
Learning mobile accessibility
CC BY-SA 4.0
0
2019-03-01T21:06:47.783
2019-03-02T00:34:17.040
null
null
1,828,967
[ "accessibility", "mobile-development" ]
55,011,082
1
null
null
2
210
We have few different enterprise mobile applications being built with NativeScript. Are there any NativeScript plugins that can be used to share data among those apps. For example: 1) App1 might store some JSON 2) App2, App3 would be able to retrieve the stored JSON upon their open. Thank you, Kumar.
Ways to share data among NativeScript mobile applications
CC BY-SA 4.0
0
2019-03-05T20:31:17.697
2019-03-05T21:13:19.240
null
null
8,756,451
[ "nativescript", "hybrid-mobile-app", "nativescript-angular", "mobile-development", "nativescript-plugin" ]
55,033,471
1
55,033,752
null
0
103
I've never made an app before and am looking to get into it. I also need to upgrade my phone because it's really old. I've heard people say that it is best to test your app on stock android. But I really wanted to buy a Huawei, which might be running an older version of android not stock. What extra benefit would I get by spending the extra $500 to buy a Google Pixel phone for testing. Or is it fine, if I go ahead and test my app on a Huawei? What would be the pros and cons?
What are the benefits of testing your app on stock android?
CC BY-SA 4.0
null
2019-03-06T22:52:01.013
2019-03-06T23:21:46.857
null
null
8,156,599
[ "android", "mobile-development" ]
55,055,742
1
null
null
1
3,183
I'm trying to make an animation of sorting algorithms in flutter. So far I've coded the algorithm and managed to get some sort of animation by iterating once at a time instead of the whole sorting process but you have to keep tapping the button to sort, one item at a time. I've been trying to look for a way to animate this process. Here's my code: ``` import 'package:flutter/material.dart'; import 'dart:math'; List<double> rectHeights = new List<double>(); int n = 2; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Sorting', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key}) : super(key: key); @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateMixin { int _selectedIndex = 0; final _widgetOptions = [ Text('Index 0: Sort'), Text('Index 1: Shuffle'), ]; @override void initState() { super.initState(); Random random = new Random(); for (int i = 0; i < 35; i++) { double ranNum = random.nextDouble() * 600; rectHeights.add(ranNum); } } @override Widget build(BuildContext context) { return Scaffold( body: Padding( padding: EdgeInsets.all(8.0), child: Center( child: Row( children: rectangles(), ), ), ), bottomNavigationBar: BottomNavigationBar( iconSize: 50.0, items: <BottomNavigationBarItem>[ BottomNavigationBarItem(icon: Icon(Icons.sort), title: Text('Sort', style: TextStyle(fontSize: 20.0),)), BottomNavigationBarItem(icon: Icon(Icons.shuffle), title: Text('Shuffle', style: TextStyle(fontSize: 20.0),)), ], currentIndex: _selectedIndex, fixedColor: Colors.blue, onTap: _onItemTapped, ), ); } void _onItemTapped(int index) { setState(() { _selectedIndex = index; }); switch(_selectedIndex) { case 0: setState(() { insertSortOnce(rectHeights, 1); }); break; case 1: setState(() { shuffle(rectHeights); n = 2; }); } } } List<Widget> rectangles() { List<Widget> rects = new List<Widget>(); for (double height in rectHeights) { var rect = Padding( padding: EdgeInsets.symmetric(horizontal: 1.0), child: Container( width: 8.0, height: height, decoration: BoxDecoration( shape: BoxShape.rectangle, color: Colors.blue ), ), ); rects.add(rect); } return rects; } void insertSort(values, choice) { int i, j; double key, temp; for (i = 1; i < values.length; i++) { key = values[i]; j = i - 1; switch (choice) { case 1: while (j >= 0 && key < values[j]) { temp = values[j]; values[j] = values[j + 1]; values[j + 1] = temp; j--; } break; case 2: while (j >= 0 && key > values[j]) { temp = values[j]; values[j] = values[j + 1]; values[j + 1] = temp; j--; } break; } } } void insertSortOnce(values, choice) { int i, j; double key, temp; for (i = 1; i < n; i++) { key = values[i]; j = i - 1; switch (choice) { case 1: while (j >= 0 && key < values[j]) { temp = values[j]; values[j] = values[j + 1]; values[j + 1] = temp; j--; } break; case 2: while (j >= 0 && key > values[j]) { temp = values[j]; values[j] = values[j + 1]; values[j + 1] = temp; j--; } break; } } n++; } List shuffle(List items) { var random = new Random(); // Go through all elements. for (var i = items.length - 1; i > 0; i--) { // Pick a pseudorandom number according to the list length var n = random.nextInt(i + 1); var temp = items[i]; items[i] = items[n]; items[n] = temp; } return items; } ```
Animating a Loop in Flutter
CC BY-SA 4.0
0
2019-03-08T02:09:02.920
2019-03-09T05:49:19.820
null
null
11,168,512
[ "animation", "dart", "flutter", "mobile-development", "flutter-animation" ]
55,087,033
1
null
null
-2
302
I'd like to create a Layout like this. [](https://i.stack.imgur.com/FqjPZ.png) What is the best way to perform this?
Tips to create a layout
CC BY-SA 4.0
null
2019-03-10T11:06:56.060
2019-03-10T14:02:49.380
2019-03-10T14:02:49.380
2,649,012
9,181,998
[ "android", "android-layout", "mobile-development" ]
55,093,883
1
55,094,256
null
0
210
So, My Friend who is in University wanted me to check out his Application, He sent me the Project File and When I tried to Run it I was greeted with an Error Message that Detailed. ``` Could not Find com.android.tools.build:aapt2:3.3.2-5309881. ``` Any Help would be Highly Appreciated (: Required by: project: app [](https://i.stack.imgur.com/oJUur.png)
Android Studio Error : Could not find Android Buld Tools
CC BY-SA 4.0
null
2019-03-11T00:46:48.683
2019-03-11T01:50:48.890
2019-03-11T01:01:20.333
3,145,960
10,693,743
[ "java", "android", "dependencies", "mobile-development" ]
55,119,393
1
57,714,519
null
10
9,007
I need to know if there is any way or plugin to run dart code on Xcode for flutter app development. If there is any mention here, every time I searched on internet it only shows me flutter commands for terminal to run app on iOS. I want my IDE to be XCODE for flutter development. here is what flutter official documentations says when I ask same question [Flutter Documentation about MacOS](https://flutter.dev/docs/get-started/install/macos) Thanks in advance.
How to install flutter and dart in Xcode macosx?
CC BY-SA 4.0
0
2019-03-12T10:35:31.250
2019-09-07T07:12:54.890
2019-03-12T10:37:31.873
217,408
9,250,384
[ "xcode", "flutter", "ide", "mobile-development" ]
55,153,552
1
null
null
0
2,156
I'm trying to clone the timer of the app I use when I workout: Strong. So far, I've managed to implement all the main features and animations (which aren't many). I know my code is messy and there's probably better ways to implement what I'm trying to do if there are any suggestions on that they're also appreciated. I'm having two problems with my application. 1. When the timer starts I get the following error: ``` flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ flutter: The following NoSuchMethodError was thrown building Peinture(dirty, state: _PeintureState#82e34): flutter: The getter 'inMilliseconds' was called on null. flutter: Receiver: null flutter: Tried calling: inMilliseconds flutter: flutter: When the exception was thrown, this was the stack: flutter: #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5) flutter: #1 _PeintureState.build (package:workout_timer/main.dart:241:72) flutter: #2 StatefulElement.build (package:flutter/src/widgets/framework.dart:3809:27) flutter: #3 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3721:15) flutter: #4 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #5 StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5) flutter: #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #7 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14) flutter: #8 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #9 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #10 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #11 ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5) flutter: #12 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #14 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #15 StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5) flutter: #16 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #17 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4585:32) flutter: #18 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4975:17) flutter: #19 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #21 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #22 ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5) flutter: #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #24 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #25 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #26 ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5) flutter: #27 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #28 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4585:32) flutter: #29 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4975:17) flutter: #30 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #31 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #32 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #33 StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5) flutter: #34 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #35 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #36 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #37 ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5) flutter: #38 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #39 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #40 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #41 StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5) flutter: #42 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #43 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14) flutter: #44 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #45 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #46 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #47 StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5) flutter: #48 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #49 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14) flutter: #50 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #51 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #52 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #53 StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5) flutter: #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #55 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #56 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #57 StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5) flutter: #58 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #59 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #60 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #61 ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5) flutter: #62 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #63 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #64 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #65 ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5) flutter: #66 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #67 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #68 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #69 StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5) flutter: #70 Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15) flutter: #71 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16) flutter: #72 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5) flutter: #73 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2286:33) flutter: #74 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:676:20) flutter: #75 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5) flutter: #76 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15) flutter: #77 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9) flutter: #78 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5) flutter: #79 _invoke (dart:ui/hooks.dart:154:13) flutter: #80 _drawFrame (dart:ui/hooks.dart:143:3) flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════ ``` Which I've made sure to check I'm not getting anything null but I still get it. And the second. When the timer finishes I get the following error: ``` [VERBOSE-2:shell.cc(184)] Dart Error: Unhandled exception: setState() called after dispose(): _TimeState#10749(lifecycle state: defunct, not mounted) This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback. The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree. This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose(). #0 State.setState.<anonymous closure> (package:flutter/src/widgets/framewo<…> ``` And when I try to start a timer again I get this: ``` flutter: Another exception was thrown: NoSuchMethodError: The getter 'inMilliseconds' was called on null. ``` Here's is my code: ``` import 'dart:async'; import 'dart:math'; import 'package:flutter/material.dart'; import 'package:fluttery/layout.dart'; Duration time; Duration previousTime; Duration currentTime; AnimationController timeController, circleController; bool reverse = false; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin { Stopwatch stopwatch = new Stopwatch(); @override void initState() { super.initState(); timeController = new AnimationController( duration: const Duration(milliseconds: 250), vsync: this, ); timeController.addListener(() { setState(() {}); }); } @override void dispose() { timeController.dispose(); circleController.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( body: Stack( children: <Widget>[ Center( child: Opacity( opacity: timeController.value != null ? 1.0 - timeController.value : 1.0, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new FlatButton( onPressed: () { setState(() { previousTime = Duration(minutes: 1); time = previousTime; timeController.forward(); stopwatch.start(); circleController = new AnimationController( duration: Duration(milliseconds: time.inMilliseconds), vsync: this, ); circleController.addListener(() { setState(() {}); }); circleController.forward(); }); }, child: Text("1:00", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16.0)), ), new FlatButton( onPressed: () { setState(() { previousTime = Duration(minutes: 2); time = previousTime; timeController.forward(); stopwatch.start(); circleController = new AnimationController( duration: Duration(milliseconds: time.inMilliseconds), vsync: this, ); circleController.addListener(() { setState(() {}); }); circleController.forward(); }); }, child: Text("2:00", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16.0)), ), new FlatButton( onPressed: () { setState(() { previousTime = Duration(minutes: 3); time = previousTime; timeController.forward(); stopwatch.start(); circleController = new AnimationController( duration: Duration(milliseconds: time.inMilliseconds), vsync: this, ); circleController.addListener(() { setState(() {}); }); circleController.forward(); }); }, child: Text("3:00", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16.0)), ), new FlatButton( onPressed: () { setState(() { previousTime = Duration(minutes: 5); time = previousTime; timeController.forward(); stopwatch.start(); circleController = new AnimationController( duration: Duration(milliseconds: time.inMilliseconds), vsync: this, ); circleController.addListener(() { setState(() {}); }); circleController.forward(); }); }, child: Text("5:00", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 16.0)), ), ], ), ), ), Center( child: Opacity( opacity: timeController.value != null ? 0.0 + timeController.value : 0.0, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: time != null ? buildTimes(stopwatch, time, previousTime) : [] ), ), ), CenterAbout( position: Offset(MediaQuery.of(context).size.width / 2, MediaQuery.of(context).size.height / 2), child: Peinture(color: Color.fromRGBO(224, 245, 255, 1.0), animate: false) ), CenterAbout( position: Offset(MediaQuery.of(context).size.width / 2, MediaQuery.of(context).size.height / 2), child: Peinture(color: Colors.blue, animate: true) ) ], ), ); } } List<Widget> buildTimes(stopwatch, time, previousTime) { return [ Time(stopwatch: stopwatch, time: time), Text( previousTime != null ? previousTime.toString().substring(3, 7) : "", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 30.0, color: Colors.black54), ), ]; } class Peinture extends StatefulWidget { final Color color; final bool animate; Peinture({this.color, this.animate}); @override _PeintureState createState() => _PeintureState(color: color, animate: animate); } class _PeintureState extends State<Peinture> { Timer timer; Color color; bool animate; _PeintureState({this.color, this.animate}) { timer = Timer.periodic(Duration(milliseconds: 1), callback); } void callback(Timer timer) { setState(() { if (currentTime != null) { print(currentTime.inMilliseconds); if (currentTime.inMilliseconds <= 0) { reverse = true; timeController.reverse(); previousTime = null; time = previousTime; currentTime = time; reverse = false; } } }); } @override Widget build(BuildContext context) { return Opacity( opacity: reverse == false ? 1.0 : timeController.value, child: CustomPaint( painter: CirclePainter( radius: 150.0, thickness: 8.0, color: color, startAngle: -pi / 2, endAngle: time != null && animate ? -pi / 2 + (((currentTime.inMilliseconds - circleController.value)) / 60000) * (2*pi) : -pi / 2 + (2 * pi) - (0 / (2*pi)), ), ), ); } } class CirclePainter extends CustomPainter { final double radius; final double thickness; final Color color; final double startAngle; final double endAngle; final Paint circlePaint; CirclePainter({this.radius, this.thickness, this.color, this.startAngle, this.endAngle}) : circlePaint = new Paint() ..color = color ..strokeWidth = thickness ..style = PaintingStyle.stroke ..strokeCap = StrokeCap.round; @override void paint(Canvas canvas, Size size) { canvas.drawArc(Rect.fromLTWH(-radius, -radius, radius * 2, radius * 2), startAngle, endAngle - startAngle, false, circlePaint); } @override bool shouldRepaint(CustomPainter oldDelegate) { return true; } } class Time extends StatefulWidget { final Duration time; final Stopwatch stopwatch; Time({this.stopwatch, this.time}); @override _TimeState createState() => _TimeState(stopwatch: stopwatch, time: time); } class _TimeState extends State<Time> { Timer timer; Duration time; Stopwatch stopwatch; _TimeState({this.time, this.stopwatch}) { timer = new Timer.periodic(new Duration(milliseconds: 1), callback); } void callback(Timer timer) { if (stopwatch.isRunning) { setState(() { currentTime = time - stopwatch.elapsed; }); } } @override Widget build(BuildContext context) { return Text( currentTime != null ? currentTime.toString().substring(3, 7) : "", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 60.0, color: Colors.black87), ); } } ``` Thanks for the help and again any suggestions as to how you'd go about it would be appreciated.
Repeating Animation and Adjustments in Flutter
CC BY-SA 4.0
null
2019-03-14T01:21:42.520
2019-03-14T04:52:20.463
null
null
11,168,512
[ "animation", "dart", "flutter", "mobile-development", "flutter-animation" ]
55,847,266
1
55,847,509
null
0
1,652
I'm trying to build a react-native component using styled components. Here is the snippet ``` import { View } from 'react-native' import styled from 'styled-components' const StyledPromocode = styled(View)` border-bottom-width: 1, borderColor: #CCCCCC, borderStyle: solid ` ``` But if I use this component in my render method I always get an error > Invariant Violation: Invalid prop `borderBottomWidth` of type `string` supplied to `StyleSheet generated`, expected `number`. StyleSheet generated: { "borderBottomWidth": "1,", "borderColor": "#CCCCCC,", "borderStyle": "solid" } As you can see from the code above, border-bottom-width equals 1, which is a number value. Do styled-components convert all values to a string under the hood? I know that I can use StyleSheet.create to get what I need, but I also would like to know if there is any way to define properties like border-bottom-width, height, width and etc via styled-components. If not, then does it mean that it doesn't make sense to use styled-components in react-native, because, obviously, errors like this would appear all the time?
Define numeric style properties (border-bottom-width, height, width and etc.) in react-native via styled components
CC BY-SA 4.0
null
2019-04-25T10:33:17.433
2021-07-24T17:15:28.520
2019-04-25T10:40:33.863
2,440,268
2,440,268
[ "javascript", "react-native", "frontend", "styled-components", "mobile-development" ]
56,034,095
1
null
null
1
3,672
Is there any way to change default navigation animation in react native. in IOS its swipe right to left. android bottom to top. can we make this constance for both platforms? Many thanks
How to change default navigation animation in react native
CC BY-SA 4.0
null
2019-05-08T05:30:22.753
2019-05-08T07:28:40.810
null
null
8,591,045
[ "javascript", "react-native", "hybrid-mobile-app", "mobile-development" ]
56,039,718
1
null
null
1
1,123
One of the biggest school has its own Android tablets which distributed among several branches and it's already with the students a long time ago. We need to develop an app and put it in the play store normally and all the students have to download the app but this time we need the app to run as a system app and take the full control of the devices ( without rooting the device ) we need to prevent some malware apps from installing, access the wifi, mic, and camera, etc so we make sure the students use the tablets in studying and exams only. We search a lot and found that most of the answers are for android 5 and earlier. but there are many apps in the play store doing so. So how to develop the app to run as a system app without rooting the device and without installing a custom ROM?
How to convert an app to be a system app in android +5.0 without rooting the device?
CC BY-SA 4.0
null
2019-05-08T11:26:37.997
2019-05-08T12:47:51.633
2019-05-08T12:24:57.963
11,469,510
11,469,510
[ "android", "mobile-development" ]
56,144,019
1
null
null
0
228
I have to make an app which retrieve call from sim to the application which is installed on other user. for e.g User A calling from his Sim and User B received that call without containing any sim card on his phone. Is that possible???
Is there a way to call from sim to app in android
CC BY-SA 4.0
null
2019-05-15T07:42:33.420
2019-05-15T08:47:49.920
2019-05-15T07:58:49.660
7,034,513
10,025,278
[ "java", "android", "mobile-development" ]
56,316,332
1
56,316,958
null
0
39
Below is the screenshot with incorrect layout: ![Screenshot for reference](https://tets-bxgzdurfnk.now.sh/) As you can see above, a column inside a row is pushing other children down. I have removed the column from the row and the layout was displaying as expected. However, I need that column to be part of the row. ``` class TitleSection extends StatelessWidget{ @override Widget build(BuildContext context) { // TODO: implement build return Container( padding: EdgeInsets.all(32), child: Row( children: <Widget>[ Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Text("Kratos",style: TextStyle( fontWeight: FontWeight.bold, fontSize: 20 )), Text("The God Of War", style: TextStyle( color: Colors.grey[500] ), ), ], ), ), Icon( Icons.star, color: Colors.red, ), Text("143") ], ) ); } ``` }
Can anyone help me out in aligning the layout in flutter?
CC BY-SA 4.0
null
2019-05-26T18:34:22.017
2019-05-26T22:59:11.090
2019-05-26T22:59:11.090
1,722,709
10,884,560
[ "flutter", "flutter-layout", "mobile-development" ]
56,391,137
1
56,391,583
null
2
6,108
I have installed expo with this command - `npm install expo-cli -g` but when I am writing expo in command line, is writing that expo in not found. I have tried to install with yarn and it was installed successful but is writing that expo in not found. I have tried to export `PATH` to `~/.profile` but this did not help me. What do I need to do to make my expo project?
Expo command is not found ubuntu
CC BY-SA 4.0
null
2019-05-31T08:07:37.927
2021-07-21T15:22:14.860
2021-07-21T15:22:14.860
10,607,772
10,529,782
[ "react-native", "expo", "mobile-development" ]
56,607,537
1
null
null
0
230
I am making an e-commerce app using flutter for frontend, and have decided to choose node js for making API, my doubt is should I use AWS Rds (environment to run MySQL database), or should I use MongoDB atlas? I am not able to understand which is better, as both MongoDB cloud and AWS Rds are also paid I am unable to decide which one to choose. According, to what I searched and found, MongoDB is cheaper than AWS Rds, but MongoDB requires more maintenance. How much maintenance is actually required and which is better? Please help !! Also, what are the other options for backend storage if I don't use the cloud??
aws mysql database(Amazon RDS) or mongodb?
CC BY-SA 4.0
null
2019-06-15T05:10:45.247
2019-06-15T15:57:52.880
2019-06-15T15:57:52.880
10,574,137
5,603,700
[ "mysql", "amazon-rds", "mobile-development", "mongodb-atlas" ]
56,643,722
1
null
null
0
394
I am new for react native development. I need to create custom header for both IOS/Android platforms using react native. Because this header bottom edge have rounded corners. please refer the given image. [](https://i.stack.imgur.com/SeqWS.jpg)
Create react native custom header style?
CC BY-SA 4.0
null
2019-06-18T07:21:20.680
2019-06-18T09:03:24.043
null
null
1,576,358
[ "android", "ios", "reactjs", "react-native", "mobile-development" ]
56,727,980
1
null
null
2
607
I am trying to do something similar to what Instagram has for their select video screen. Where a grid of local videos that can be uploaded and it'll kind of 'preview' the one that is currently selected above the grid itself. I'm using the react-native-community/cameraroll and this is the code I'm trying to get the Videos with. ``` CameraRoll.getPhotos({first: 20, assetType: "All"}) .then(r => this.setState({ videos: r.edges })) .catch((err) => { console.log('getVideosErr:' + err) }) ``` and I am trying to display the grid with some sample code I found and tried playing around with: ``` <ScrollView> {this.state.videos.map((p, i) => { return ( <Video key={i} style={{ width: 300, height: 100, }} source={{ uri: p.node.video.uri }} /> ; })} ``` I have one video on the simulator but I am getting an error saying "TypeError: Cannot read property 'uri' of undefined" everytime I try grabbing the video. Not so sure what the issue is right now, I followed the samples on the documentation for the cameraroll but haven't had any luck yet. Any advice/examples would be appreciated.
How to get list of local videos and display them in grid format in React Native?
CC BY-SA 4.0
null
2019-06-23T21:48:37.127
2019-06-24T04:42:55.690
null
null
8,448,916
[ "android", "ios", "react-native", "mobile-development", "camera-roll" ]
56,760,069
1
null
null
1
981
So I have a bottom navigation bar with three tabs: HomeView, UploadVideo and Messages. Basically, what I would like to do is when the user clicks on the UploadVideo tab, it will behave kind of the way Instagram does it. Where it will open up the image library, and allow the to select a media item and moves them to a screen where they can enter in their details. And if the user goes through the upload process entirely or cancels it will take them back to the page they were originally on before clicking the Upload tab/button. Currently, what I have is when the User clicks Upload Video it will open up a screen with the tab bar hidden with an icon to open the Image library and a form to enter in the video data. If the user clicks cancel it will take them back to the HomeView (programmed this way) regardless of where they were when they click on the UploadVideo tab. So basically I guess to summarize my question, how can I get a tab to act more as a button?
How to treat a bottom bar tab as a button in React Native?
CC BY-SA 4.0
null
2019-06-25T18:29:38.397
2019-06-26T07:07:18.597
null
null
8,448,916
[ "javascript", "react-native", "react-native-navigation", "mobile-development" ]
57,259,208
1
null
null
2
99
I have two screens, one list (Flatlist) and one filter screen where I want to be able to set some filters for the list. the list screen has the states "data" and "usedFilters". When I am switching to the filters screen, the states are set as navigation parameters for react navigation and then passed via navigation.navigate, together with the onChange function, as props to the filter screen. There they are read, and the filters screen class' state is set (usually with passed filters from the list screen, if no valid filters has been passed, some are initialized). After that the filters can be changed. If that happens, the state of the filter screen gets updated. If then the apply button is clicked the filter screens' state is passed to the onChange function and via that back to the list screen, the onChange function updates the state "usedFilters" state of the list screen. If the cancel button is pressed null is passed to the onChange function and there is no setState call. Setting new states for the list screen works perfectly fine. the problem is, that when i press the cancel button (or the back button automatically rendered by react navigation) the changes are kept nevertheless. That only happens if the state has been changed before. So if there has never been applied a change and hence the "usedFitlers" state of the list screen is null, this behavior does not occur. Only if I already made some changes and hence the "usedFitlers" state of the list screen has a valid value which is passed to the filters screen the cancel or go back buttons won't work as expected. I am using expo-cli 3 and tried on my android smartphone as well as the iOS simulator. Same behavior. I looked into it with chrome dev tools as well but i simply couldn't figure out where the "usedFitlers" state was updated. I am using react native 0.60 and react navigation 3.11.0 My best guess is that for some reason the two states share the same memory or one is pointer to the other or sth like that. (Had problems like that with python some time ago, not knowing the it uses pointers when assigning variables). Anyone got an idea? List Screen: ``` export default class ListScreen extends React.Component { state = { data: [], usedFilters: null }; static navigationOptions = ({ navigation }) => { let data = navigation.getParam('data') let changefilter = navigation.getParam('changeFilter') let currfilter = navigation.getParam('currFilter') return { headerTitle: <Text style={Styles.headerTitle}>{strings('List')}</Text>, headerRight: ( <TouchableOpacity onPress={() => navigation.navigate('FilterScreen', { dataset: data, onChange: changefilter, activeFilters: currfilter })} > <View paddingRight={16}> <Icon name="settings" size={24} color= {Colors.headerTintColor} /> </View> </TouchableOpacity> ), }; }; _onChangeFilter = (newFilter) => { if (newFilter) { this.setState({ usedFilters: newFilter }) this.props.navigation.setParams({ currFilter: newFilter }); } // added for debugging reasons else { this.forceUpdate(); let a = this.state.usedFilters; } } _fetchData() { this.setState({ data: fakedata.results }, () => this.props.navigation.setParams({ data: fakedata.results, changeFilter: this._onChangeFilter })); } componentDidMount() { this._fetchData(); } render() { return ( <ScrollView> <FlatList/> // Just data rendering, no problems here </ScrollView> ); } } ``` Filter Screen: ``` export default class FilterScreen extends React.Component { static navigationOptions = () => { return { headerTitle: <Text style={Styles.headerTitle}> {strings('filter')} </Text> }; }; state = { currentFilters: null } _onChange = (filter, idx) => { let tmp = this.state.currentFilters; tmp[idx] = filter; this.setState({ currentFilters: tmp }) } _initFilterElems() { const filters = this.props.navigation.getParam('activeFilters'); const dataset = this.props.navigation.getParam('dataset'); let filterA = []; let filterB = []; let filterC = []; if (filters) { // so some checks } else { // init filters } const filterElements = [filterA, filterB, filterC]; this.setState({ currentFilters: filterElements }) } componentDidMount() { this._initFilterElems() } render() { const onChange = this.props.navigation.getParam('onChange'); return ( <ScrollView style={Styles.screenView}> <FlatList data={this.state.currentFilters} // Listeneinträge keyExtractor={(item, index) => 'key' + index} renderItem={({ item, index }) => ( <FilterCategory filter={item} name={filterNames[index]} idx={index} onChange={this._onChange} /> )} ItemSeparatorComponent={() => <View style= {Styles.listSeperator} />} /> <View style={Layout.twoHorizontalButtons}> <TouchableOpacity onPress={() => { onChange(this.state.currentFilters); this.setState({ currentFilters: null }); this.props.navigation.goBack(); }}> <View style={Styles.smallButton}> <Text style={Styles.buttonText}>{strings('apply')} </Text> </View> </TouchableOpacity> <TouchableOpacity onPress={() => { onChange(null); this.setState({ currentFilters: null }); this.props.navigation.goBack(); }}> <View style={Styles.smallButton}> <Text style={Styles.buttonText}>{strings('cancel')} </Text> </View> </TouchableOpacity> </View> </ScrollView > ); } } ``` So when I press the cancel button, null is returned to the _onChangeFilter function of the list screen. This part works, and according to console.log and the debugger, the setState is not called. But if i set a breakpoint within the else part, i can see that this.state.usedFilters has changed.
React native updates state "on its own"
CC BY-SA 4.0
null
2019-07-29T18:03:08.783
2019-07-30T15:15:08.520
2019-07-30T08:18:10.110
11,853,345
11,853,345
[ "react-native", "react-navigation", "mobile-development" ]
57,348,777
1
57,351,268
null
1
2,579
I'm creating a project with React-Native, and currently when I try to compile my code I get an error saying `undefined is not an object (evaluating '_expo_.Asset.loadAsync')` I'm not entirely sure what had caused this, for I entered a lot of code prior to compiling the project. However, from what I gathered this may have something to do with the fonts I'm importing? currently this is what my code looks like for importing the font. ``` async componentDidMount() { await cacheFonts({ georgia: require('../assets/fonts/Georgia.ttf'), regular: require('../assets/fonts/Montserrat-Regular.ttf'), light: require('../assets/fonts/Montserrat-Light.ttf'), }); this.setState({ fontLoaded: true }); } ```
Undefined is not an object (evaluating '_expo.Asset.loadAsync')
CC BY-SA 4.0
null
2019-08-04T17:29:17.263
2019-08-05T08:35:57.320
null
null
4,652,123
[ "react-native", "expo", "mobile-development", "react-native-elements" ]
57,410,293
1
null
null
0
3,049
I want to show the Text Input field which should be shown when the drop-down item is selected in react native I use simple logic. I make a function with trying to pass the selected value to the function but the selected item is not found ``` export class ThirdPage extends Component{ static navigationOptions ={ title:"Register", header:null }; state = { // user:'', username: '', phn: '', address:'', password:'', // isLoggingIn: false, text:'' }; displayacoountForm = (text)=>{ if({text} === "user"){ return <TextInput style={[styles.input]} placeholder="Enter your phone number" // underlineColorAndroid="transparent" numberOfLines = {1} onChangeText={(phn) => this.setState({ phn })} /> } if({text} === "doctor"){ return <TextInput style={[styles.input]} placeholder="Enter your password" secureTextEntry={true} // underlineColorAndroid="transparent" numberOfLines = {1} onChangeText={(password) => this.setState({ password })} /> } if({text} === "clinic"){ <TextInput style={[styles.input]} placeholder="Enter your phone clinic" // underlineColorAndroid="transparent" numberOfLines = {1} onChangeText={(phn) => this.setState({ phn })} /> } } render(){ const data = [["user", "doctor", "clinic"]]; return( <View style={[styles.wholecontainer,styles.verticalFlex,styles.backgroundColor1]}> <Image style={[styles.container1,styles.backgroundColor1,styles.position1]} source={require('Finalapp/Images/createacc.png')} /> <Text style={[styles.headText,styles.position2]}>Create Your Account</Text> <ScrollView style={[styles.backgroundColor1]}> <View style={[styles.container2]}> <TextInput style={[styles.input]} placeholder="Enter your Name" // underlineColorAndroid="transparent" numberOfLines = {1} onChangeText={(username) => this.setState({ username })} /> <TextInput style={[styles.input]} placeholder="Enter your address" // underlineColorAndroid="transparent" numberOfLines = {1} onChangeText={(address) => this.setState({address})} /> <TextInput style={[styles.input]} placeholder="Enter your phone number" // underlineColorAndroid="transparent" numberOfLines = {1} onChangeText={(phn) => this.setState({ phn })} /> <TextInput style={[styles.input]} placeholder="Enter your password" secureTextEntry={true} // underlineColorAndroid="transparent" numberOfLines = {1} onChangeText={(password) => this.setState({ password })} /> <View style={[styles.container3]}> <DropdownMenu // style={[styles.container4]} bgColor={'white'} tintColor={'#666666'} activityTintColor={'green'} // arrowImg={} // checkImage={} // optionTextStyle={{color: '#333333'}} // titleStyle={{color: '#333333'}} // maxHeight={300} handler={(selection, row) => this.setState({text: data[selection][row]})} data={data} > <View style={[styles.backgroundColor1]}> {this.displayacoountForm({this.state.text})} </View> </DropdownMenu> </View> <View style={[styles.button2]}> <Button // class="button" onPress={()=>this.props.navigation.navigate('Login')} title="Submit" color="#29468f" /> </View> </View> </ScrollView> </View> )}; } ```
Show the Text Input field when the drop down item is selected in react native
CC BY-SA 4.0
null
2019-08-08T10:17:16.197
2019-08-08T10:30:41.330
2019-08-08T10:21:09.380
2,219,208
11,901,199
[ "android", "reactjs", "react-native", "mobile-development" ]
57,487,247
1
null
null
3
941
I'm developing Flutter application to display Images in a listView those images coming from the server, but when requesting them, and displaying them in a list, I searched for how to store them in a database, and I found that just like any normal image but in JPEG format for compression needs
Is there a flutter widget to display 360 degree Image?
CC BY-SA 4.0
0
2019-08-14T01:53:07.220
2021-09-20T15:37:14.267
null
null
8,297,657
[ "flutter", "mobile-development" ]
57,487,923
1
null
null
0
107
Do different colors effect the memory usage and CPU of an app ? For eg. A hello world application with red background, will it have more memory usage than a hello world application using black color as the background ?
Memory and CPU usage with different colors in android
CC BY-SA 4.0
null
2019-08-14T03:48:42.680
2019-08-14T03:48:42.680
null
null
5,723,787
[ "android", "memory", "cpu", "profiler", "mobile-development" ]
57,544,967
1
null
null
1
2,428
I am trying to implement JavaScript library to my mobile app that I am creating with React Native. This app should have flashcards with Chinese characters and its stroke order, but I dont know how to add this library to the react nor how to use it afterwards. Library: [https://github.com/chanind/hanzi-writer](https://github.com/chanind/hanzi-writer) I already try it in the browser, everything works as described in docs, but I cant find a way to implement it in my mobile app. In html I can do something like this to have a flashcard with one character ``` <html> <head> <title></title> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hanzi-writer.min.js"> </script> </head> <body> <div id="character-target-div"></div> <script type="application/javascript"> var writer = HanziWriter.create('character-target-div', '我', { width: 100, height: 100, padding: 5 }); writer.quiz(); </script> </body> </html> ```
How to import javascript library to React Native project?
CC BY-SA 4.0
null
2019-08-18T13:19:52.650
2020-05-15T02:53:55.747
null
null
11,942,709
[ "javascript", "react-native", "mobile-development" ]
57,770,998
1
57,771,447
null
1
499
I’m using TestFlight to test my build. I want to erase keychain data to test some behavior. How is this possible?
How do we erase keychain data in TestFlight apps?
CC BY-SA 4.0
null
2019-09-03T11:40:35.273
2019-09-03T12:06:50.577
null
null
3,195,156
[ "ios", "keychain", "mobile-development" ]
57,866,009
1
null
null
0
183
I'm looking to add a new property to a higher level (main level, I forget the terminology) of the json tree in my firebase real time database. I usually make my edits through the console. I've been able to add new properties at deeper levels but going up the json tree the console doesn't let me by saying: `Read-only & non-realtime mode activated in the data viewer to improve browser performance Select a key with fewer records to edit or view in realtime` I thought about exporting, adding, then importing again (I've done this before at lower levels) but this seems a little scary having to essentially reimport the database just to add a new property. I've read the docs and they suggest using set method. How is this normally done?
How to add another property to big JSON object in firebase real time database
CC BY-SA 4.0
null
2019-09-10T07:31:12.540
2019-09-10T21:09:57.163
null
null
5,184,956
[ "json", "firebase", "react-native", "firebase-realtime-database", "mobile-development" ]
57,906,567
1
57,907,801
null
0
488
I'm planning to make an application that uses barcode scanning to scan UPC barcodes and maybe other barcode standards, I will be using firebase for database, I would like to have suggestions on which framework/tool for Mobile Development that I should use? What I need in the framework is : 1. JS Libraries and packages support(NPM support would be Nice) 2. Community and tutorial Support(StackOverflow,github..etc) 3. CSS Libraries and icons support 4. Access to native features 5. I'll be developing for android but maybe I'll try to make it cross-platform later I know about a few frameworks/tools Like ionic3, React Native, Android studio but I'm not sure which I should use?
which framework is good for building barcode scanner mobile app?
CC BY-SA 4.0
null
2019-09-12T12:18:07.087
2019-09-12T13:27:38.253
null
null
10,066,387
[ "ionic-framework", "barcode", "barcode-scanner", "mobile-development" ]
57,935,243
1
null
null
0
47
I can't find a proper way to implement functionality of shared preference, to be clear I have added a "CheckBoxPreference" that will enable full screen mode/immersive mode, I know how to do it directly, but I don't know how to control its functionality. Here, I have made a separate class for shared preference: SharedPreferenceActivity.java ``` package com.nurujjamanpollob.website; import android.preference.PreferenceActivity; import android.os.Bundle; import android.preference.*; import android.content.*; import android.view.*; import android.os.*; import android.app.*; import java.util.prefs.*; import android.widget.*; import android.util.*; public class PreferenceActivity extends PreferenceActivity { SharedPreferences Preferences; CheckBoxPreference checkbox; @Override protected void onCreate(Bundle savedInstanceState { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); //set the default values we defined in the XML PreferenceManager.setDefaultValues(this, R.xml.preferences, false); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); } } ``` And here is my, "res/xml/preferences.xml ``` <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCatagory android:title="General Option <CheckBoxPreference android:key="immersive_mode" android:title="Full Screen Mode" android:summary="Enable Full Screen Mode" </PreferenceCatagory> </PreferenceScreen> ``` Or may I need to add something to main activity! How to implement its action when I checked and unchecked? Use a toast for introduce me Where to add my self code logic. Sorry for my bad English!
How to implement actions for CheckBoxPreference button?
CC BY-SA 4.0
null
2019-09-14T11:52:28.177
2019-09-15T02:21:12.743
2019-09-15T02:21:12.743
12,066,857
12,066,857
[ "android", "mobile-development" ]
58,211,296
1
58,212,887
null
0
214
I added a UIImageView on an ImageView, so i want to take screenshot of these two imageviews so that they look like one, any other recommendation is also appreciated. I made a button that helped me take a screen shot, I have added x-axis and y axis, ``` func takeScreenshot(_ shouldSave: Bool = true) -> UIImage { var screenshotImage :UIImage? let layer = UIApplication.shared.keyWindow!.layer let scale = UIScreen.main.scale UIGraphicsBeginImageContextWithOptions(CGSize(width: 20, height: 104), false, scale); guard let context = UIGraphicsGetCurrentContext() else {return screenshotImage ?? UIImage(imageLiteralResourceName: "loading")} layer.render(in:context) screenshotImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() if let image = screenshotImage, shouldSave { UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) } return screenshotImage ?? UIImage(named: "loading")! } ``` I expect that the screenshot taken, takes the screenshot of the imageview. Screenshot is attached,[enter image description here](https://i.stack.imgur.com/b8Vdy.png)
How can i pass both x and y axis along with height and width of Screen to take screenshot programmatically in swift
CC BY-SA 4.0
null
2019-10-03T01:41:19.637
2019-10-03T05:36:08.830
2019-10-03T04:29:23.280
4,305,676
11,081,150
[ "ios", "swift", "imageview", "customization", "mobile-development" ]
58,246,426
1
null
null
0
308
I want to use firebase in my flutter app and I'm following the instructions to use firebase and get that error. ``` Launching lib\main.dart on Google Nexus 5X, 8 0, API 26, 1080x1920 in debug mode... Initializing gradle... Resolving dependencies... Running Gradle task 'assembleDebug'... registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) ERROR: [TAG] Failed to resolve variable '${junit.version}' ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}' ``` FAILURE: Build failed with an exception. - What went wrong: Execution failed for task ':app:processDebugGoogleServices'.> No matching client found for package name 'com.technoscans.neolearn'- 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. - [https://help.gradle.org](https://help.gradle.org) BUILD FAILED in 2m 18s Finished with error: Gradle task assembleDebug failed with exit code 1 this is the build.gradle file ``` buildscript { ext.kotlin_version = '1.2.71' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.2.0' } } allprojects { repositories { google() jcenter() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir } ``` this is the app/build.gradle file ``` def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion 28 sourceSets { main.java.srcDirs += 'src/main/kotlin' } lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.technoscans.neolearn" minSdkVersion 19 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } } } flutter { source '../..' } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' } apply plugin: 'com.google.gms.google-services' ```
I'm using firebase in my flutter app and this error appeared to me
CC BY-SA 4.0
0
2019-10-05T07:52:15.287
2019-10-06T13:22:21.537
2019-10-06T13:22:21.537
3,396,821
6,121,632
[ "flutter", "mobile-development" ]
58,312,912
1
58,316,962
null
0
1,272
Hello I'm new in Java Android development and i was following a tutorial on how to fetch data from Imgur API. After I finished the tutorial i tired the app but i don't see any images or data on the emulator bc i think that i did some mistake in my code. If anyone can give me a sample how to implement the code or example. Thank you in advance Tutorial -> [https://progur.com/2016/11/create-imgur-client-android.html](https://progur.com/2016/11/create-imgur-client-android.html) My Code -> [https://www.codepile.net/pile/A6bkN9eW](https://www.codepile.net/pile/A6bkN9eW)
How to fetch images from Imgur API in Java
CC BY-SA 4.0
null
2019-10-09T22:06:39.937
2019-10-10T06:44:35.537
null
null
8,868,534
[ "java", "android", "api", "imgur", "mobile-development" ]
58,351,739
1
null
null
6
1,490
I want to implement a plugin architecture in Flutter Dart. The process will be as follows: 1. User downloads the app. 2. The user loads plugins from our site. 3. The apps look if the plugin implements an interface. 4. If the interface is implemented then load information and widgets from the plugin to the app. I've implemented the same process in C# using compiled DLL loading in runtime but unable to find it for Flutter. I've looked into some of the previous questions and resource available on the internet and the closest one I found was this, [https://pub.dev/packages/plugins](https://pub.dev/packages/plugins) but the plugin is not supported in Dart 2 and deprecated This was the code I implemented in C#. ``` int i = 0; if (Directory.Exists("Plugins")) { dllFileNames = Directory.GetFiles("Plugins", "*.dll"); ICollection<Assembly> assemblies = new List<Assembly>(dllFileNames.Length); foreach (string dllFile in dllFileNames) { AssemblyName an = AssemblyName.GetAssemblyName(dllFile); Assembly assembly = Assembly.Load(an); assemblies.Add(assembly); } Type pluginType = typeof(IPlugin); List<Type> pluginTypes = new List<Type>(); foreach (Assembly assembly in assemblies) { if (assembly != null) { Type[] types = assembly.GetTypes(); foreach (Type type in types) { if (type.IsInterface || type.IsAbstract) { continue; } else if (pluginType.IsAssignableFrom(type)) { pluginTypes.Add(type); } } } i++; } ICollection<IPlugin> plugins = new List<IPlugin>(pluginTypes.Count); foreach (Type type in pluginTypes) { IPlugin plugin = (IPlugin)Activator.CreateInstance(type); plugin.Initiate(); plugins.Add(plugin); } return plugins; } return null; ```
How to implement the Plugin Architecture in Flutter Dart
CC BY-SA 4.0
0
2019-10-12T07:06:30.483
2022-01-05T18:43:41.153
null
null
3,606,825
[ "flutter", "dart", "mobile-development", "plugin-architecture" ]
58,437,699
1
null
null
0
70
Is there any way we can force hide mobile browser's address bar and footer (navigation bar) so all the page content is visible on web app?
Hide address and browser footer on mobile jQuery
CC BY-SA 4.0
null
2019-10-17T17:14:17.593
2019-10-17T17:14:17.593
null
null
5,653,071
[ "jquery", "mobile-safari", "mobile-development" ]
58,573,202
1
null
null
0
253
My activity works fine but when I include this code it suddenly crashes: Does anyone know why this happens? Without this code it doesn't crash. It crashes as soon as the activity opens, even when i don't call any function. What I am missing here? I am using the latest version of Android Studio, and the .xml file doesn't have any errors, but the IDE doesn't detect any error on this code neither, could it be that the module is too old or something? Also the "Activity.java" have a ton of errors, but as I said before when i simply remove the code below it runs fine. I am probably just missing some command or something, does anyone know how to help me with this? It gives me the next error: ``` E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.sltoolset, PID: 8778 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.sltoolset/com.example.sltoolset.Notas}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3194) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:163) at android.view.ContextThemeWrapper.getTheme(ContextThemeWrapper.java:174) at android.content.Context.obtainStyledAttributes(Context.java:738) at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:692) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659) at androidx.appcompat.app.AppCompatDelegateImpl.findViewById(AppCompatDelegateImpl.java:479) at androidx.appcompat.app.AppCompatActivity.findViewById(AppCompatActivity.java:214) at com.example.sltoolset.Notas.<init>(Notas.java:26) at java.lang.Class.newInstance(Native Method) at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95) at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:41) at android.app.Instrumentation.newActivity(Instrumentation.java:1243) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3182) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7356)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)  I/Process: Sending signal. PID: 8778 SIG: 9 Process 8778 terminated. ``` My code: ``` public static final String TEXT = "text"; private EditText edt1 = (EditText) findViewById(R.id.editText); private String text; public void guardar(View view) { SharedPreferences sp = getSharedPreferences(TEXT, MODE_PRIVATE); SharedPreferences.Editor edt = sp.edit(); edt.putString(TEXT, edt1.getText().toString()); edt.apply(); Toast.makeText(this, "Se guardo el texto", Toast.LENGTH_SHORT).show(); } public void cargar() { SharedPreferences sp = getSharedPreferences(TEXT, MODE_PRIVATE); text = sp.getString(TEXT, ""); } ```
Activity crashes when I include Shared Preferences
CC BY-SA 4.0
null
2019-10-26T17:39:52.670
2019-10-28T21:15:49.127
2019-10-28T20:49:56.207
4,479,165
10,504,014
[ "java", "android", "android-studio-3.0", "mobile-development" ]
58,574,275
1
null
null
0
35
We can upload and download data from firebase using both the packages. Is there some benefits of using FirebaseDatabase.instance.reference(). to do the same in flutter
What is the difference between use of http and FirebaseDatabase.instance.reference() in flutter
CC BY-SA 4.0
null
2019-10-26T20:01:56.900
2019-10-26T23:27:17.380
null
null
12,273,354
[ "http", "firebase-realtime-database", "flutter", "mobile-development" ]
58,661,364
1
58,662,662
null
0
56
I created three Edit Text inputs and another set of inputs that should be added dynamically when you click on Add more button. I want to collect the data submitted from the second activity and separating them according to how many times the add more button is clicked My problem is when I click on the Submit button I can get the initial values of the static edit Text field in the second activity but I can't get the values of the dynamic edit Text. I will appreciate any assistance offered Thanks The XML layout ``` <ScrollView android:layout_width="match_parent" android:layout_height="480dp" android:paddingBottom="50dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="422dp" android:layout_margin="5dp" android:orientation="vertical"> <LinearLayout android:id="@+id/parent_linear_layout" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <EditText android:id="@+id/title_main" android:layout_width="match_parent" android:layout_height="46dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginTop="52dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:ems="10" android:hint="Enter product Title" android:inputType="text" android:paddingStart="20dp" android:paddingLeft="20dp" android:paddingTop="10dp" android:paddingEnd="10dp" android:paddingRight="10dp" android:paddingBottom="10dp" android:textSize="14sp" /> <EditText android:id="@+id/product_name_main" android:layout_width="match_parent" android:layout_height="55dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginTop="24dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:ems="10" android:hint="Product Name" android:inputType="text" android:paddingStart="20dp" android:paddingLeft="20dp" android:paddingTop="10dp" android:paddingEnd="10dp" android:paddingRight="10dp" android:paddingBottom="10dp" android:textSize="14sp" /> <EditText android:id="@+id/product_number_main" android:layout_width="match_parent" android:layout_height="55dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginTop="24dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:ems="10" android:hint="Product Number" android:inputType="number" android:paddingStart="20dp" android:paddingLeft="20dp" android:paddingTop="10dp" android:paddingEnd="10dp" android:paddingRight="10dp" android:paddingBottom="10dp" android:textSize="14sp" /> <Button android:id="@+id/add_field_button" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="#555" android:onClick="onAddField" android:paddingLeft="5dp" android:text="Add Field" android:textColor="#FFF" /> </LinearLayout> </LinearLayout> </ScrollView> <Button android:id="@+id/add_field_button" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="#555" android:onClick="onAddField" android:paddingLeft="5dp" android:text="Add Field" android:textColor="#FFF" /> </LinearLayout> ``` The dynamic Layout ``` android:layout_height="50dp" android:id="@+id/dynamic_layout" android:orientation="vertical" > <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:text="New Field" android:layout_marginTop="32dp" android:textAlignment="center" android:textStyle="bold" android:textSize="26dp"/> <EditText android:layout_width="match_parent" android:layout_height="46dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginTop="22dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:ems="10" android:hint="Enter product Title" android:inputType="text" android:paddingStart="20dp" android:paddingLeft="20dp" android:paddingTop="10dp" android:paddingEnd="10dp" android:paddingRight="10dp" android:paddingBottom="10dp" android:textSize="14sp" /> <EditText android:layout_width="match_parent" android:layout_height="55dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginTop="24dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:ems="10" android:hint="Product Name" android:inputType="text" android:paddingStart="20dp" android:paddingLeft="20dp" android:paddingTop="10dp" android:paddingEnd="10dp" android:paddingRight="10dp" android:paddingBottom="10dp" android:textSize="14sp" /> <EditText android:layout_width="match_parent" android:layout_height="55dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginTop="24dp" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:ems="10" android:hint="Product Number" android:inputType="number" android:paddingStart="20dp" android:paddingLeft="20dp" android:paddingTop="10dp" android:paddingEnd="10dp" android:paddingRight="10dp" android:paddingBottom="10dp" android:textSize="14sp" /> <Button android:id="@+id/delete_button" android:layout_width="36dp" android:layout_height="31dp" android:layout_marginStart="10dp" android:layout_marginLeft="10dp" android:background="@android:drawable/ic_delete" android:onClick="onDelete" /> ``` The Activity.java The add More button ``` public void onAddField(View v) { dynamicEditTexts = new ArrayList<EditText>();//added this LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); final View rowView = inflater.inflate(R.layout.field, null); // Add the new row before the add field button. parentLinearLayout.addView(rowView, parentLinearLayout.getChildCount() - 1); EditText dynamicText = new EditText(this);//added this // EditText dynamicText = rowView.findViewById(R.id.dynamic_layout); dynamicEditTexts.add(dynamicText); } ``` The Submit Button ``` public void getValue(View view) { Intent intent = new Intent(MainActivity.this, Output.class); titleM = findViewById(R.id.title_main); productNameM = findViewById(R.id.product_name_main); productNumberM = findViewById(R.id.product_number_main); //getting the texts String Title = titleM.getText().toString(); String PName = productNameM.getText().toString(); double PNumber = Double.parseDouble(productNumberM.getText().toString()); // ******** FOR THE DYNAMIC EDITEXT FIELDS ************ String[] inputItems = new String[dynamicEditTexts.size()]; String string = String.valueOf(dynamicEditTexts.size()); for(int j = 0; j <dynamicEditTexts.size(); j++){ inputItems[j] = dynamicEditTexts.get(j).getText().toString(); intent.putExtra("dynamicData", inputItems[j]); } intent.putExtra("title", Title); intent.putExtra("pname", PName); intent.putExtra("pnumber", PNumber); startActivity(intent); finish(); } ``` The Output.class ``` //GETTING ITEMS FROM THE MAIN ACTIVITY //for the static texts String StaticProductTitle = getIntent().getExtras().getString("title"); String StaticProductName = getIntent().getExtras().getString("pname"); double StaticProductNumber = getIntent().getExtras().getDouble("pnumber"); //getting for the dynamic results Intent collectDynamicData = getIntent(); ArrayList<String>alldynamicTexts = (ArrayList<String>) collectDynamicData.getSerializableExtra("dynamicData"); //FORMATING THE NUMBERS TO DISPLAY IN A NUMBER PATTERN DecimalFormat formate = new DecimalFormat();//"#,###,###" String FormateStaticNumber; String FormateDynamicNumber; FormateStaticNumber = formate.format(StaticProductNumber); FormateDynamicNumber = formate.format(alldynamicTexts); //Setting the Results to the Static OutPut StaticTitle.setText(StaticProductTitle); StaticPName.setText(StaticProductName); StaticPNumber.setText(FormateStaticNumber); //Setting the Result of The Dynamic Outputs DynamicPTitle.setText(FormateDynamicNumber); //DynamicPTitle.setText((CharSequence) alldynamicTexts); //DynamicPTitle.setText(array); //DynamicPName.setText(DynamicProductName); //DynamicPNumber.setText(FormateDynamicNumber); } ``` UPDATE ON THE OUTPUT ``` Intent collectDynamicData = getIntent(); String[] dynamicItems = collectDynamicData.getStringArrayExtra("dynamicData"); ArrayList<String> alldynamicTexts = new ArrayList<>(Arrays.asList(dynamicItems)); String newText = (String.valueOf(alldynamicTexts)); DynamicPTitle.setText(newText); ```
Collect and display separately the values of dynamic editTexts in second activity
CC BY-SA 4.0
null
2019-11-01T14:57:03.087
2019-11-04T13:27:14.807
2019-11-04T13:27:14.807
7,750,884
7,750,884
[ "java", "android", "mobile-development" ]
58,670,181
1
null
null
0
898
How can I check if a button is currently active in flutter? Below is the image for the button I am trying to create: [![Below is the image for the button I am trying to create:](https://i.stack.imgur.com/FktSt.png)]
How to check if a button is currently active in flutter?
CC BY-SA 4.0
null
2019-11-02T10:24:42.030
2019-11-02T13:39:32.177
2019-11-02T13:39:32.177
2,823,719
6,493,967
[ "android", "user-interface", "flutter", "mobile-development" ]
58,842,646
1
59,085,486
null
-1
603
I'm facing a serious issue and don't know how to fix it, i'm a c# developper but i'm new to mobile development using xamarin in visual studio, i've dowloaded the xamarin with all the installation package, then i went throught all the step to creating a xamarin form, i've downloaded all the android sdk down to Nougat version (7) But when to trying to run the app, it shows errors. I looked all over the internet but i got no correct answer. So if someone know a solution to this problem, please help me with this. [See the picture of the errors list window after i click on the emulator](https://i.stack.imgur.com/IRi6v.jpg) Please help me !!!!!!! ---------------------------------This part down is the message shown in the output window---------------------------------------- ``` 1>------ Début de la génération : Projet : App2, Configuration : Debug Any CPU ------ Detecting installed packages Detecting installed packages... Creating C:\Users\Aboubacar Traoré\AppData\Local\Xamarin.Android\Cache\Mono.Android.Platform.ApiLevel_28.apk Creating C:\Users\Aboubacar Traoré\AppData\Local\Xamarin.Android\Cache\Mono.Android.Platform.ApiLevel_28.apk Copying platform assemblies... Copying platform assemblies... Copying file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v4.4\Mono.Android.Export.dll Copying file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v4.4\OpenTK-1.0.dll Copying file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v9.0\Mono.Android.dll Copying platform assemblies... Creating: C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\AndroidManifest.xml Creating: C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\unsigned.apk Executing: C:\Program Files (x86)\Android\android-sdk\build-tools\28.0.3\aapt.exe package -f -0 .dll -0 .mdb -M "C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\AndroidManifest.xml" -I "C:\Program Files (x86)\Android\android-sdk\platforms\android-28\android.jar" -F "C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\unsigned.apk" -k "C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\r" Aapt C:\Program Files (x86)\Android\android-sdk\build-tools\28.0.3\aapt.exe exited with value: 0 Aapt Creating: C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\unaligned.jar Executing: C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25\bin\jarsigner.EXE -keystore "C:\Users\Aboubacar Traoré\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android -digestalg SHA1 -sigalg md5withRSA -signedjar "C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\unaligned.jar" "C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1\unsigned.apk" androiddebugkey jarsigner jarsigner error: java.lang.RuntimeException: keystore load: C:\Users\Aboubacar Traoré\AppData\Local\Xamarin\Mono for Android\debug.keystore (Le chemin d’accès spécifié est introuvable) C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25\bin\jarsigner.EXE exited with value: 1 jarsigner Removing temporary directory: C:\Users\Aboubacar Traoré\AppData\Local\Temp\rx4qphcd.nr1 Creating C:\Users\Aboubacar Traoré\AppData\Local\Xamarin.Android\Cache\Mono.Android.Platform.ApiLevel_28.apk 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\11\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\16\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\30\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\28\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\12\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\35\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\29\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\18\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). 1>C:\Users\Aboubacar Traor├®\source\repos\App2\App2\obj\Debug\90\lp\31\jl\res : error APT0000: failed to open directory: Le fichier sp├®cifi├® est introuvable. (2). ========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ========== ========== Déploiement : 0 a réussi, 0 a échoué, 0 a été ignoré ========== ```
How to proper setup for xamarin development as c# developper?
CC BY-SA 4.0
null
2019-11-13T17:36:43.897
2019-11-28T09:27:39.087
2019-11-14T07:52:57.073
1,000,551
11,621,476
[ "c#", "android", "xamarin", "android-sdk-tools", "mobile-development" ]